@nubitio/ui 0.5.1 → 0.5.2
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 +91 -0
- package/dist/index.d.cts +42 -1
- package/dist/index.d.mts +42 -1
- package/dist/index.mjs +90 -1
- package/dist/style.css +206 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2353,6 +2353,95 @@ const Drawer = ({ isOpen, onClose, title, width, side = "right", scrim = "subtle
|
|
|
2353
2353
|
}), document.body);
|
|
2354
2354
|
};
|
|
2355
2355
|
//#endregion
|
|
2356
|
+
//#region packages/ui/Timeline.tsx
|
|
2357
|
+
const TimelineVariantContext = (0, react.createContext)("stepper");
|
|
2358
|
+
function useTimelineVariant() {
|
|
2359
|
+
return (0, react.useContext)(TimelineVariantContext);
|
|
2360
|
+
}
|
|
2361
|
+
function TimelineMarker({ status, variant }) {
|
|
2362
|
+
if (variant === "log") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2363
|
+
className: "nb-timeline__marker nb-timeline__marker--dot",
|
|
2364
|
+
"aria-hidden": "true"
|
|
2365
|
+
});
|
|
2366
|
+
if (status === "complete") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2367
|
+
className: "nb-timeline__marker nb-timeline__marker--complete",
|
|
2368
|
+
"aria-hidden": "true",
|
|
2369
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "ph ph-check" })
|
|
2370
|
+
});
|
|
2371
|
+
if (status === "current") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2372
|
+
className: "nb-timeline__marker nb-timeline__marker--current",
|
|
2373
|
+
"aria-hidden": "true"
|
|
2374
|
+
});
|
|
2375
|
+
if (status === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2376
|
+
className: "nb-timeline__marker nb-timeline__marker--error",
|
|
2377
|
+
"aria-hidden": "true",
|
|
2378
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "ph ph-x" })
|
|
2379
|
+
});
|
|
2380
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2381
|
+
className: "nb-timeline__marker nb-timeline__marker--pending",
|
|
2382
|
+
"aria-hidden": "true"
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
function TimelineItem({ status, title, timestamp, dateTime, tone = "default", children, className }) {
|
|
2386
|
+
const variant = useTimelineVariant();
|
|
2387
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
2388
|
+
className: [
|
|
2389
|
+
"nb-timeline__item",
|
|
2390
|
+
`nb-timeline__item--${status}`,
|
|
2391
|
+
variant === "log" && `nb-timeline__item--tone-${tone}`,
|
|
2392
|
+
className
|
|
2393
|
+
].filter(Boolean).join(" "),
|
|
2394
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2395
|
+
className: "nb-timeline__marker-col",
|
|
2396
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TimelineMarker, {
|
|
2397
|
+
status,
|
|
2398
|
+
variant
|
|
2399
|
+
})
|
|
2400
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2401
|
+
className: "nb-timeline__content",
|
|
2402
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2403
|
+
className: "nb-timeline__heading",
|
|
2404
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2405
|
+
className: "nb-timeline__label",
|
|
2406
|
+
children: title
|
|
2407
|
+
}), timestamp != null && timestamp !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", {
|
|
2408
|
+
className: "nb-timeline__timestamp",
|
|
2409
|
+
dateTime,
|
|
2410
|
+
children: timestamp
|
|
2411
|
+
})]
|
|
2412
|
+
}), children]
|
|
2413
|
+
})]
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
function Timeline({ variant = "stepper", title, description, children, className, "aria-label": ariaLabel }) {
|
|
2417
|
+
const panelClasses = [
|
|
2418
|
+
"nb-timeline-panel",
|
|
2419
|
+
(title != null || description != null) && "nb-timeline-panel--card",
|
|
2420
|
+
className
|
|
2421
|
+
].filter(Boolean).join(" ");
|
|
2422
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TimelineVariantContext.Provider, {
|
|
2423
|
+
value: variant,
|
|
2424
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2425
|
+
className: panelClasses,
|
|
2426
|
+
children: [(title != null || description != null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
2427
|
+
className: "nb-timeline-panel__header",
|
|
2428
|
+
children: [title != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
2429
|
+
className: "nb-timeline-panel__title",
|
|
2430
|
+
children: title
|
|
2431
|
+
}), description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2432
|
+
className: "nb-timeline-panel__description",
|
|
2433
|
+
children: description
|
|
2434
|
+
})]
|
|
2435
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
|
|
2436
|
+
className: `nb-timeline nb-timeline--${variant}`,
|
|
2437
|
+
role: "list",
|
|
2438
|
+
"aria-label": ariaLabel,
|
|
2439
|
+
children
|
|
2440
|
+
})]
|
|
2441
|
+
})
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
//#endregion
|
|
2356
2445
|
exports.ACCENT_PRESETS = ACCENT_PRESETS;
|
|
2357
2446
|
exports.AppDialog = AppDialog;
|
|
2358
2447
|
exports.AppDropdown = AppDropdown;
|
|
@@ -2385,6 +2474,8 @@ exports.TextField = TextField;
|
|
|
2385
2474
|
exports.ThemeContext = ThemeContext;
|
|
2386
2475
|
exports.ThemeProvider = ThemeProvider;
|
|
2387
2476
|
exports.ThemeSwitcher = ThemeSwitcher;
|
|
2477
|
+
exports.Timeline = Timeline;
|
|
2478
|
+
exports.TimelineItem = TimelineItem;
|
|
2388
2479
|
exports.Toggle = Toggle;
|
|
2389
2480
|
exports.UiStringsProvider = UiStringsProvider;
|
|
2390
2481
|
exports.getAvatarHue = getAvatarHue;
|
package/dist/index.d.cts
CHANGED
|
@@ -716,6 +716,47 @@ interface DrawerProps {
|
|
|
716
716
|
}
|
|
717
717
|
declare const Drawer: React$1.FC<DrawerProps>;
|
|
718
718
|
//#endregion
|
|
719
|
+
//#region packages/ui/Timeline.d.ts
|
|
720
|
+
type TimelineVariant = 'stepper' | 'log';
|
|
721
|
+
type TimelineItemStatus = 'complete' | 'current' | 'pending' | 'error';
|
|
722
|
+
type TimelineItemTone = 'default' | 'success' | 'info' | 'danger' | 'warning';
|
|
723
|
+
interface TimelineProps {
|
|
724
|
+
/** `stepper` — workflow stages with checkmarks; `log` — chronological event log. */
|
|
725
|
+
variant?: TimelineVariant;
|
|
726
|
+
title?: ReactNode;
|
|
727
|
+
description?: ReactNode;
|
|
728
|
+
children: ReactNode;
|
|
729
|
+
className?: string;
|
|
730
|
+
'aria-label'?: string;
|
|
731
|
+
}
|
|
732
|
+
interface TimelineItemProps {
|
|
733
|
+
status: TimelineItemStatus;
|
|
734
|
+
title: ReactNode;
|
|
735
|
+
timestamp?: ReactNode;
|
|
736
|
+
dateTime?: string;
|
|
737
|
+
/** Marker accent for the `log` variant. */
|
|
738
|
+
tone?: TimelineItemTone;
|
|
739
|
+
children?: ReactNode;
|
|
740
|
+
className?: string;
|
|
741
|
+
}
|
|
742
|
+
declare function TimelineItem({
|
|
743
|
+
status,
|
|
744
|
+
title,
|
|
745
|
+
timestamp,
|
|
746
|
+
dateTime,
|
|
747
|
+
tone,
|
|
748
|
+
children,
|
|
749
|
+
className
|
|
750
|
+
}: TimelineItemProps): React$1.JSX.Element;
|
|
751
|
+
declare function Timeline({
|
|
752
|
+
variant,
|
|
753
|
+
title,
|
|
754
|
+
description,
|
|
755
|
+
children,
|
|
756
|
+
className,
|
|
757
|
+
'aria-label': ariaLabel
|
|
758
|
+
}: TimelineProps): React$1.JSX.Element;
|
|
759
|
+
//#endregion
|
|
719
760
|
//#region packages/ui/UiStrings.d.ts
|
|
720
761
|
/**
|
|
721
762
|
* Built-in UI strings for @nubitio/ui components (aria-labels, tooltips).
|
|
@@ -777,4 +818,4 @@ interface UiStringsProviderProps {
|
|
|
777
818
|
declare const UiStringsProvider: React$1.FC<UiStringsProviderProps>;
|
|
778
819
|
declare const useUiStrings: () => UiStrings;
|
|
779
820
|
//#endregion
|
|
780
|
-
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, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -716,6 +716,47 @@ interface DrawerProps {
|
|
|
716
716
|
}
|
|
717
717
|
declare const Drawer: React$1.FC<DrawerProps>;
|
|
718
718
|
//#endregion
|
|
719
|
+
//#region packages/ui/Timeline.d.ts
|
|
720
|
+
type TimelineVariant = 'stepper' | 'log';
|
|
721
|
+
type TimelineItemStatus = 'complete' | 'current' | 'pending' | 'error';
|
|
722
|
+
type TimelineItemTone = 'default' | 'success' | 'info' | 'danger' | 'warning';
|
|
723
|
+
interface TimelineProps {
|
|
724
|
+
/** `stepper` — workflow stages with checkmarks; `log` — chronological event log. */
|
|
725
|
+
variant?: TimelineVariant;
|
|
726
|
+
title?: ReactNode;
|
|
727
|
+
description?: ReactNode;
|
|
728
|
+
children: ReactNode;
|
|
729
|
+
className?: string;
|
|
730
|
+
'aria-label'?: string;
|
|
731
|
+
}
|
|
732
|
+
interface TimelineItemProps {
|
|
733
|
+
status: TimelineItemStatus;
|
|
734
|
+
title: ReactNode;
|
|
735
|
+
timestamp?: ReactNode;
|
|
736
|
+
dateTime?: string;
|
|
737
|
+
/** Marker accent for the `log` variant. */
|
|
738
|
+
tone?: TimelineItemTone;
|
|
739
|
+
children?: ReactNode;
|
|
740
|
+
className?: string;
|
|
741
|
+
}
|
|
742
|
+
declare function TimelineItem({
|
|
743
|
+
status,
|
|
744
|
+
title,
|
|
745
|
+
timestamp,
|
|
746
|
+
dateTime,
|
|
747
|
+
tone,
|
|
748
|
+
children,
|
|
749
|
+
className
|
|
750
|
+
}: TimelineItemProps): React$1.JSX.Element;
|
|
751
|
+
declare function Timeline({
|
|
752
|
+
variant,
|
|
753
|
+
title,
|
|
754
|
+
description,
|
|
755
|
+
children,
|
|
756
|
+
className,
|
|
757
|
+
'aria-label': ariaLabel
|
|
758
|
+
}: TimelineProps): React$1.JSX.Element;
|
|
759
|
+
//#endregion
|
|
719
760
|
//#region packages/ui/UiStrings.d.ts
|
|
720
761
|
/**
|
|
721
762
|
* Built-in UI strings for @nubitio/ui components (aria-labels, tooltips).
|
|
@@ -777,4 +818,4 @@ interface UiStringsProviderProps {
|
|
|
777
818
|
declare const UiStringsProvider: React$1.FC<UiStringsProviderProps>;
|
|
778
819
|
declare const useUiStrings: () => UiStrings;
|
|
779
820
|
//#endregion
|
|
780
|
-
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, Toggle, type ToggleProps, type UiStrings, UiStringsProvider, type UiStringsProviderProps, type UseFloatingPanelOptions, type UseFloatingPanelResult, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -2329,4 +2329,93 @@ const Drawer = ({ isOpen, onClose, title, width, side = "right", scrim = "subtle
|
|
|
2329
2329
|
}), document.body);
|
|
2330
2330
|
};
|
|
2331
2331
|
//#endregion
|
|
2332
|
-
|
|
2332
|
+
//#region packages/ui/Timeline.tsx
|
|
2333
|
+
const TimelineVariantContext = createContext("stepper");
|
|
2334
|
+
function useTimelineVariant() {
|
|
2335
|
+
return useContext(TimelineVariantContext);
|
|
2336
|
+
}
|
|
2337
|
+
function TimelineMarker({ status, variant }) {
|
|
2338
|
+
if (variant === "log") return /* @__PURE__ */ jsx("span", {
|
|
2339
|
+
className: "nb-timeline__marker nb-timeline__marker--dot",
|
|
2340
|
+
"aria-hidden": "true"
|
|
2341
|
+
});
|
|
2342
|
+
if (status === "complete") return /* @__PURE__ */ jsx("span", {
|
|
2343
|
+
className: "nb-timeline__marker nb-timeline__marker--complete",
|
|
2344
|
+
"aria-hidden": "true",
|
|
2345
|
+
children: /* @__PURE__ */ jsx("i", { className: "ph ph-check" })
|
|
2346
|
+
});
|
|
2347
|
+
if (status === "current") return /* @__PURE__ */ jsx("span", {
|
|
2348
|
+
className: "nb-timeline__marker nb-timeline__marker--current",
|
|
2349
|
+
"aria-hidden": "true"
|
|
2350
|
+
});
|
|
2351
|
+
if (status === "error") return /* @__PURE__ */ jsx("span", {
|
|
2352
|
+
className: "nb-timeline__marker nb-timeline__marker--error",
|
|
2353
|
+
"aria-hidden": "true",
|
|
2354
|
+
children: /* @__PURE__ */ jsx("i", { className: "ph ph-x" })
|
|
2355
|
+
});
|
|
2356
|
+
return /* @__PURE__ */ jsx("span", {
|
|
2357
|
+
className: "nb-timeline__marker nb-timeline__marker--pending",
|
|
2358
|
+
"aria-hidden": "true"
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
function TimelineItem({ status, title, timestamp, dateTime, tone = "default", children, className }) {
|
|
2362
|
+
const variant = useTimelineVariant();
|
|
2363
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2364
|
+
className: [
|
|
2365
|
+
"nb-timeline__item",
|
|
2366
|
+
`nb-timeline__item--${status}`,
|
|
2367
|
+
variant === "log" && `nb-timeline__item--tone-${tone}`,
|
|
2368
|
+
className
|
|
2369
|
+
].filter(Boolean).join(" "),
|
|
2370
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
2371
|
+
className: "nb-timeline__marker-col",
|
|
2372
|
+
children: /* @__PURE__ */ jsx(TimelineMarker, {
|
|
2373
|
+
status,
|
|
2374
|
+
variant
|
|
2375
|
+
})
|
|
2376
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
2377
|
+
className: "nb-timeline__content",
|
|
2378
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2379
|
+
className: "nb-timeline__heading",
|
|
2380
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2381
|
+
className: "nb-timeline__label",
|
|
2382
|
+
children: title
|
|
2383
|
+
}), timestamp != null && timestamp !== "" && /* @__PURE__ */ jsx("time", {
|
|
2384
|
+
className: "nb-timeline__timestamp",
|
|
2385
|
+
dateTime,
|
|
2386
|
+
children: timestamp
|
|
2387
|
+
})]
|
|
2388
|
+
}), children]
|
|
2389
|
+
})]
|
|
2390
|
+
});
|
|
2391
|
+
}
|
|
2392
|
+
function Timeline({ variant = "stepper", title, description, children, className, "aria-label": ariaLabel }) {
|
|
2393
|
+
const panelClasses = [
|
|
2394
|
+
"nb-timeline-panel",
|
|
2395
|
+
(title != null || description != null) && "nb-timeline-panel--card",
|
|
2396
|
+
className
|
|
2397
|
+
].filter(Boolean).join(" ");
|
|
2398
|
+
return /* @__PURE__ */ jsx(TimelineVariantContext.Provider, {
|
|
2399
|
+
value: variant,
|
|
2400
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2401
|
+
className: panelClasses,
|
|
2402
|
+
children: [(title != null || description != null) && /* @__PURE__ */ jsxs("header", {
|
|
2403
|
+
className: "nb-timeline-panel__header",
|
|
2404
|
+
children: [title != null && /* @__PURE__ */ jsx("h3", {
|
|
2405
|
+
className: "nb-timeline-panel__title",
|
|
2406
|
+
children: title
|
|
2407
|
+
}), description != null && /* @__PURE__ */ jsx("p", {
|
|
2408
|
+
className: "nb-timeline-panel__description",
|
|
2409
|
+
children: description
|
|
2410
|
+
})]
|
|
2411
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
2412
|
+
className: `nb-timeline nb-timeline--${variant}`,
|
|
2413
|
+
role: "list",
|
|
2414
|
+
"aria-label": ariaLabel,
|
|
2415
|
+
children
|
|
2416
|
+
})]
|
|
2417
|
+
})
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2420
|
+
//#endregion
|
|
2421
|
+
export { ACCENT_PRESETS, AppDialog, AppDropdown, AppToolbar, Avatar, Badge, Button, Card, Chip, CollapsibleSection, ConfirmDialog, ContextMenu, DatePicker, DateRangePicker, DensityContext, DensityProvider, Drawer, EN_UI_STRINGS, ES_UI_STRINGS, EmptyState, FormField, IconButton, Popover, SelectField, SettingsPanel, Skeleton, StatCard, TextAreaField, TextField, ThemeContext, ThemeProvider, ThemeSwitcher, Timeline, TimelineItem, Toggle, UiStringsProvider, getAvatarHue, getAvatarInitials, useAccentColor, useDensity, useFloatingPanel, useTheme, useUiStrings };
|
package/dist/style.css
CHANGED
|
@@ -2667,3 +2667,209 @@ html[data-density=compact] .nb-drawer__footer {
|
|
|
2667
2667
|
width: 100vw !important;
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
2670
|
+
.nb-timeline-panel {
|
|
2671
|
+
display: flex;
|
|
2672
|
+
flex-direction: column;
|
|
2673
|
+
gap: var(--space-4);
|
|
2674
|
+
min-width: 0;
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
.nb-timeline-panel--card {
|
|
2678
|
+
background: var(--surface-1);
|
|
2679
|
+
border: 1px solid var(--border-color);
|
|
2680
|
+
border-radius: var(--radius-lg);
|
|
2681
|
+
box-shadow: var(--shadow-sm);
|
|
2682
|
+
padding: var(--space-5);
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
.nb-timeline-panel__header {
|
|
2686
|
+
display: flex;
|
|
2687
|
+
flex-direction: column;
|
|
2688
|
+
gap: var(--space-1);
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
.nb-timeline-panel__title {
|
|
2692
|
+
color: var(--text-primary);
|
|
2693
|
+
font-size: var(--font-size-md);
|
|
2694
|
+
font-weight: var(--font-weight-semibold);
|
|
2695
|
+
line-height: var(--line-height-tight);
|
|
2696
|
+
margin: 0;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
.nb-timeline-panel__description {
|
|
2700
|
+
color: var(--text-secondary);
|
|
2701
|
+
font-size: var(--font-size-sm);
|
|
2702
|
+
line-height: var(--line-height-normal);
|
|
2703
|
+
margin: 0;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
.nb-timeline {
|
|
2707
|
+
display: flex;
|
|
2708
|
+
flex-direction: column;
|
|
2709
|
+
gap: 0;
|
|
2710
|
+
list-style: none;
|
|
2711
|
+
margin: 0;
|
|
2712
|
+
padding: 0;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
.nb-timeline__item {
|
|
2716
|
+
display: grid;
|
|
2717
|
+
gap: var(--space-3);
|
|
2718
|
+
grid-template-columns: 24px 1fr;
|
|
2719
|
+
padding-bottom: var(--space-4);
|
|
2720
|
+
position: relative;
|
|
2721
|
+
}
|
|
2722
|
+
.nb-timeline__item:last-child {
|
|
2723
|
+
padding-bottom: 0;
|
|
2724
|
+
}
|
|
2725
|
+
.nb-timeline__item:not(:last-child)::before {
|
|
2726
|
+
background: var(--border-color);
|
|
2727
|
+
bottom: 0;
|
|
2728
|
+
content: "";
|
|
2729
|
+
left: 11px;
|
|
2730
|
+
position: absolute;
|
|
2731
|
+
top: 24px;
|
|
2732
|
+
width: 2px;
|
|
2733
|
+
}
|
|
2734
|
+
.nb-timeline__item--complete:not(:last-child)::before {
|
|
2735
|
+
background: var(--accent-color);
|
|
2736
|
+
}
|
|
2737
|
+
.nb-timeline__item--current:not(:last-child)::before {
|
|
2738
|
+
background: var(--border-color);
|
|
2739
|
+
}
|
|
2740
|
+
.nb-timeline__item--pending .nb-timeline__label {
|
|
2741
|
+
color: var(--text-tertiary);
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
.nb-timeline--log .nb-timeline__item {
|
|
2745
|
+
gap: var(--space-2);
|
|
2746
|
+
grid-template-columns: 16px 1fr;
|
|
2747
|
+
padding: var(--space-3) 0;
|
|
2748
|
+
}
|
|
2749
|
+
.nb-timeline--log .nb-timeline__item:not(:last-child) {
|
|
2750
|
+
border-bottom: 1px solid var(--border-color);
|
|
2751
|
+
padding-bottom: var(--space-3);
|
|
2752
|
+
}
|
|
2753
|
+
.nb-timeline--log .nb-timeline__item:not(:last-child)::before {
|
|
2754
|
+
left: 7px;
|
|
2755
|
+
top: 18px;
|
|
2756
|
+
}
|
|
2757
|
+
.nb-timeline--log .nb-timeline__item:last-child {
|
|
2758
|
+
padding-bottom: 0;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2761
|
+
.nb-timeline__marker-col {
|
|
2762
|
+
align-items: flex-start;
|
|
2763
|
+
display: flex;
|
|
2764
|
+
justify-content: center;
|
|
2765
|
+
padding-top: 2px;
|
|
2766
|
+
position: relative;
|
|
2767
|
+
z-index: 1;
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
.nb-timeline__marker {
|
|
2771
|
+
align-items: center;
|
|
2772
|
+
border-radius: 50%;
|
|
2773
|
+
display: inline-flex;
|
|
2774
|
+
flex: 0 0 auto;
|
|
2775
|
+
justify-content: center;
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2778
|
+
.nb-timeline__marker--complete {
|
|
2779
|
+
background: var(--accent-color);
|
|
2780
|
+
color: var(--surface-1);
|
|
2781
|
+
font-size: 11px;
|
|
2782
|
+
height: 20px;
|
|
2783
|
+
width: 20px;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
.nb-timeline__marker--current {
|
|
2787
|
+
background: var(--surface-1);
|
|
2788
|
+
border: 2px solid var(--accent-color);
|
|
2789
|
+
height: 20px;
|
|
2790
|
+
position: relative;
|
|
2791
|
+
width: 20px;
|
|
2792
|
+
}
|
|
2793
|
+
.nb-timeline__marker--current::after {
|
|
2794
|
+
background: var(--accent-color);
|
|
2795
|
+
border-radius: 50%;
|
|
2796
|
+
content: "";
|
|
2797
|
+
height: 8px;
|
|
2798
|
+
left: 50%;
|
|
2799
|
+
position: absolute;
|
|
2800
|
+
top: 50%;
|
|
2801
|
+
transform: translate(-50%, -50%);
|
|
2802
|
+
width: 8px;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
.nb-timeline__marker--pending {
|
|
2806
|
+
background: var(--surface-1);
|
|
2807
|
+
border: 2px solid var(--border-color);
|
|
2808
|
+
height: 20px;
|
|
2809
|
+
width: 20px;
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
.nb-timeline__marker--error {
|
|
2813
|
+
background: var(--danger-color);
|
|
2814
|
+
color: var(--surface-1);
|
|
2815
|
+
font-size: 11px;
|
|
2816
|
+
height: 20px;
|
|
2817
|
+
width: 20px;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
.nb-timeline__marker--dot {
|
|
2821
|
+
background: var(--surface-2);
|
|
2822
|
+
border: 2px solid var(--accent-color);
|
|
2823
|
+
height: 12px;
|
|
2824
|
+
width: 12px;
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
.nb-timeline__item--tone-success .nb-timeline__marker--dot {
|
|
2828
|
+
border-color: var(--success-color);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
.nb-timeline__item--tone-info .nb-timeline__marker--dot {
|
|
2832
|
+
border-color: var(--info-color, var(--accent-color));
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
.nb-timeline__item--tone-danger .nb-timeline__marker--dot {
|
|
2836
|
+
border-color: var(--danger-color);
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
.nb-timeline__item--tone-warning .nb-timeline__marker--dot {
|
|
2840
|
+
border-color: var(--warning-color);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
.nb-timeline__content {
|
|
2844
|
+
display: flex;
|
|
2845
|
+
flex-direction: column;
|
|
2846
|
+
gap: var(--space-2);
|
|
2847
|
+
min-width: 0;
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
.nb-timeline__heading {
|
|
2851
|
+
display: flex;
|
|
2852
|
+
flex-direction: column;
|
|
2853
|
+
gap: var(--space-1);
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
.nb-timeline--log .nb-timeline__heading {
|
|
2857
|
+
flex-direction: row;
|
|
2858
|
+
flex-wrap: wrap;
|
|
2859
|
+
align-items: center;
|
|
2860
|
+
gap: var(--space-2);
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
.nb-timeline__label {
|
|
2864
|
+
color: var(--text-primary);
|
|
2865
|
+
font-size: var(--font-size-sm);
|
|
2866
|
+
font-weight: var(--font-weight-semibold);
|
|
2867
|
+
line-height: var(--line-height-tight);
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
.nb-timeline__timestamp {
|
|
2871
|
+
color: var(--text-secondary);
|
|
2872
|
+
font-size: var(--font-size-xs);
|
|
2873
|
+
font-variant-numeric: tabular-nums;
|
|
2874
|
+
line-height: var(--line-height-normal);
|
|
2875
|
+
}
|