@nubitio/ui 0.5.8 → 0.5.10

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.cjs CHANGED
@@ -2413,7 +2413,8 @@ function TimelineItem({ status, title, timestamp, dateTime, tone = "default", ch
2413
2413
  })]
2414
2414
  });
2415
2415
  }
2416
- function Timeline({ variant = "stepper", title, description, children, className, "aria-label": ariaLabel }) {
2416
+ function Timeline({ variant = "stepper", orientation = "vertical", title, description, children, className, "aria-label": ariaLabel }) {
2417
+ const resolvedOrientation = variant === "log" ? "vertical" : orientation;
2417
2418
  const panelClasses = [
2418
2419
  "nb-timeline-panel",
2419
2420
  (title != null || description != null) && "nb-timeline-panel--card",
@@ -2433,7 +2434,7 @@ function Timeline({ variant = "stepper", title, description, children, className
2433
2434
  children: description
2434
2435
  })]
2435
2436
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
2436
- className: `nb-timeline nb-timeline--${variant}`,
2437
+ className: `nb-timeline nb-timeline--${variant} nb-timeline--${resolvedOrientation}`,
2437
2438
  role: "list",
2438
2439
  "aria-label": ariaLabel,
2439
2440
  children
package/dist/index.d.cts CHANGED
@@ -718,11 +718,18 @@ declare const Drawer: React$1.FC<DrawerProps>;
718
718
  //#endregion
719
719
  //#region packages/ui/Timeline.d.ts
720
720
  type TimelineVariant = 'stepper' | 'log';
721
+ type TimelineOrientation = 'vertical' | 'horizontal';
721
722
  type TimelineItemStatus = 'complete' | 'current' | 'pending' | 'error';
722
723
  type TimelineItemTone = 'default' | 'success' | 'info' | 'danger' | 'warning';
723
724
  interface TimelineProps {
724
725
  /** `stepper` — workflow stages with checkmarks; `log` — chronological event log. */
725
726
  variant?: TimelineVariant;
727
+ /**
728
+ * `horizontal` lays the steps in a row (wizard/checkout style: 1 → 2 → 3)
729
+ * with labels under the markers. Stepper only — the log variant is
730
+ * inherently vertical and ignores it.
731
+ */
732
+ orientation?: TimelineOrientation;
726
733
  title?: ReactNode;
727
734
  description?: ReactNode;
728
735
  children: ReactNode;
@@ -750,6 +757,7 @@ declare function TimelineItem({
750
757
  }: TimelineItemProps): React$1.JSX.Element;
751
758
  declare function Timeline({
752
759
  variant,
760
+ orientation,
753
761
  title,
754
762
  description,
755
763
  children,
@@ -818,4 +826,4 @@ interface UiStringsProviderProps {
818
826
  declare const UiStringsProvider: React$1.FC<UiStringsProviderProps>;
819
827
  declare const useUiStrings: () => UiStrings;
820
828
  //#endregion
821
- export { ACCENT_PRESETS, type AccentPreset, AppDialog, type AppDialogProps, AppDropdown, type AppDropdownOption, type AppDropdownProps, type AppDropdownVariant, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Chip, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type Density, DensityContext, type DensityContextValue, DensityProvider, Drawer, type DrawerProps, type DrawerSide, EN_UI_STRINGS, ES_UI_STRINGS, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, Popover, type PopoverAlign, type PopoverProps, SelectField, type SelectFieldProps, SettingsPanel, type SettingsPanelProps, Skeleton, type SkeletonProps, StatCard, type StatCardProps, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type Theme, ThemeContext, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeSwitcher, type ThemeSwitcherProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemStatus, type TimelineItemTone, type TimelineProps, type TimelineVariant, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
829
+ export { ACCENT_PRESETS, type AccentPreset, AppDialog, type AppDialogProps, AppDropdown, type AppDropdownOption, type AppDropdownProps, type AppDropdownVariant, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Chip, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type Density, DensityContext, type DensityContextValue, DensityProvider, Drawer, type DrawerProps, type DrawerSide, EN_UI_STRINGS, ES_UI_STRINGS, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, Popover, type PopoverAlign, type PopoverProps, SelectField, type SelectFieldProps, SettingsPanel, type SettingsPanelProps, Skeleton, type SkeletonProps, StatCard, type StatCardProps, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type Theme, ThemeContext, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeSwitcher, type ThemeSwitcherProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemStatus, type TimelineItemTone, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
package/dist/index.d.mts CHANGED
@@ -718,11 +718,18 @@ declare const Drawer: React$1.FC<DrawerProps>;
718
718
  //#endregion
719
719
  //#region packages/ui/Timeline.d.ts
720
720
  type TimelineVariant = 'stepper' | 'log';
721
+ type TimelineOrientation = 'vertical' | 'horizontal';
721
722
  type TimelineItemStatus = 'complete' | 'current' | 'pending' | 'error';
722
723
  type TimelineItemTone = 'default' | 'success' | 'info' | 'danger' | 'warning';
723
724
  interface TimelineProps {
724
725
  /** `stepper` — workflow stages with checkmarks; `log` — chronological event log. */
725
726
  variant?: TimelineVariant;
727
+ /**
728
+ * `horizontal` lays the steps in a row (wizard/checkout style: 1 → 2 → 3)
729
+ * with labels under the markers. Stepper only — the log variant is
730
+ * inherently vertical and ignores it.
731
+ */
732
+ orientation?: TimelineOrientation;
726
733
  title?: ReactNode;
727
734
  description?: ReactNode;
728
735
  children: ReactNode;
@@ -750,6 +757,7 @@ declare function TimelineItem({
750
757
  }: TimelineItemProps): React$1.JSX.Element;
751
758
  declare function Timeline({
752
759
  variant,
760
+ orientation,
753
761
  title,
754
762
  description,
755
763
  children,
@@ -818,4 +826,4 @@ interface UiStringsProviderProps {
818
826
  declare const UiStringsProvider: React$1.FC<UiStringsProviderProps>;
819
827
  declare const useUiStrings: () => UiStrings;
820
828
  //#endregion
821
- export { ACCENT_PRESETS, type AccentPreset, AppDialog, type AppDialogProps, AppDropdown, type AppDropdownOption, type AppDropdownProps, type AppDropdownVariant, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Chip, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type Density, DensityContext, type DensityContextValue, DensityProvider, Drawer, type DrawerProps, type DrawerSide, EN_UI_STRINGS, ES_UI_STRINGS, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, Popover, type PopoverAlign, type PopoverProps, SelectField, type SelectFieldProps, SettingsPanel, type SettingsPanelProps, Skeleton, type SkeletonProps, StatCard, type StatCardProps, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type Theme, ThemeContext, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeSwitcher, type ThemeSwitcherProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemStatus, type TimelineItemTone, type TimelineProps, type TimelineVariant, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
829
+ export { ACCENT_PRESETS, type AccentPreset, AppDialog, type AppDialogProps, AppDropdown, type AppDropdownOption, type AppDropdownProps, type AppDropdownVariant, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Chip, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type Density, DensityContext, type DensityContextValue, DensityProvider, Drawer, type DrawerProps, type DrawerSide, EN_UI_STRINGS, ES_UI_STRINGS, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, Popover, type PopoverAlign, type PopoverProps, SelectField, type SelectFieldProps, SettingsPanel, type SettingsPanelProps, Skeleton, type SkeletonProps, StatCard, type StatCardProps, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type Theme, ThemeContext, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeSwitcher, type ThemeSwitcherProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineItemStatus, type TimelineItemTone, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
package/dist/index.mjs CHANGED
@@ -2389,7 +2389,8 @@ function TimelineItem({ status, title, timestamp, dateTime, tone = "default", ch
2389
2389
  })]
2390
2390
  });
2391
2391
  }
2392
- function Timeline({ variant = "stepper", title, description, children, className, "aria-label": ariaLabel }) {
2392
+ function Timeline({ variant = "stepper", orientation = "vertical", title, description, children, className, "aria-label": ariaLabel }) {
2393
+ const resolvedOrientation = variant === "log" ? "vertical" : orientation;
2393
2394
  const panelClasses = [
2394
2395
  "nb-timeline-panel",
2395
2396
  (title != null || description != null) && "nb-timeline-panel--card",
@@ -2409,7 +2410,7 @@ function Timeline({ variant = "stepper", title, description, children, className
2409
2410
  children: description
2410
2411
  })]
2411
2412
  }), /* @__PURE__ */ jsx("ol", {
2412
- className: `nb-timeline nb-timeline--${variant}`,
2413
+ className: `nb-timeline nb-timeline--${variant} nb-timeline--${resolvedOrientation}`,
2413
2414
  role: "list",
2414
2415
  "aria-label": ariaLabel,
2415
2416
  children
package/dist/style.css CHANGED
@@ -2728,7 +2728,7 @@ html[data-density=compact] .nb-drawer__footer {
2728
2728
  content: "";
2729
2729
  left: 11px;
2730
2730
  position: absolute;
2731
- top: 24px;
2731
+ top: 22px;
2732
2732
  width: 2px;
2733
2733
  }
2734
2734
  .nb-timeline__item--complete:not(:last-child)::before {
@@ -2755,19 +2755,25 @@ html[data-density=compact] .nb-drawer__footer {
2755
2755
  .nb-timeline--log .nb-timeline__item:last-child {
2756
2756
  padding-bottom: 0;
2757
2757
  }
2758
- .nb-timeline--log .nb-timeline__item::before {
2759
- display: none;
2758
+ .nb-timeline--log .nb-timeline__item:not(:last-child)::before {
2759
+ background: var(--border-color);
2760
+ left: 7px;
2761
+ top: 18px;
2760
2762
  }
2761
2763
 
2762
2764
  .nb-timeline__marker-col {
2763
- align-items: flex-start;
2765
+ align-items: center;
2764
2766
  display: flex;
2767
+ height: 20px;
2765
2768
  justify-content: center;
2766
- padding-top: 2px;
2767
2769
  position: relative;
2768
2770
  z-index: 1;
2769
2771
  }
2770
2772
 
2773
+ .nb-timeline--log .nb-timeline__marker-col {
2774
+ height: 18px;
2775
+ }
2776
+
2771
2777
  .nb-timeline__marker {
2772
2778
  align-items: center;
2773
2779
  border-radius: 50%;
@@ -2855,6 +2861,8 @@ html[data-density=compact] .nb-drawer__footer {
2855
2861
  display: flex;
2856
2862
  flex-direction: column;
2857
2863
  gap: var(--space-1);
2864
+ justify-content: center;
2865
+ min-height: 20px;
2858
2866
  }
2859
2867
 
2860
2868
  .nb-timeline--log .nb-timeline__heading {
@@ -2862,6 +2870,7 @@ html[data-density=compact] .nb-drawer__footer {
2862
2870
  flex-wrap: wrap;
2863
2871
  align-items: center;
2864
2872
  gap: var(--space-2);
2873
+ min-height: 18px;
2865
2874
  }
2866
2875
 
2867
2876
  .nb-timeline__label {
@@ -2877,3 +2886,33 @@ html[data-density=compact] .nb-drawer__footer {
2877
2886
  font-variant-numeric: tabular-nums;
2878
2887
  line-height: var(--line-height-normal);
2879
2888
  }
2889
+
2890
+ .nb-timeline--horizontal {
2891
+ flex-direction: row;
2892
+ align-items: flex-start;
2893
+ }
2894
+ .nb-timeline--horizontal .nb-timeline__item {
2895
+ align-items: center;
2896
+ display: flex;
2897
+ flex: 1;
2898
+ flex-direction: column;
2899
+ gap: var(--space-2);
2900
+ min-width: 0;
2901
+ padding-bottom: 0;
2902
+ text-align: center;
2903
+ }
2904
+ .nb-timeline--horizontal .nb-timeline__item:not(:last-child)::before {
2905
+ bottom: auto;
2906
+ height: 2px;
2907
+ left: calc(50% + 14px);
2908
+ right: calc(-50% + 14px);
2909
+ top: 9px;
2910
+ width: auto;
2911
+ }
2912
+ .nb-timeline--horizontal .nb-timeline__content {
2913
+ align-items: center;
2914
+ }
2915
+ .nb-timeline--horizontal .nb-timeline__heading {
2916
+ align-items: center;
2917
+ min-height: 0;
2918
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubitio/ui",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "type": "module",
5
5
  "description": "Visual primitives and theme system for the Nubit admin stack (dialogs, cards, toolbar, light/dark theme).",
6
6
  "license": "MIT",