@olwiba/ui 0.1.15 → 0.2.1
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 +149 -35
- package/dist/index.js +790 -408
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app/AuthSection.tsx +5 -4
- package/src/app/BillingPanel.tsx +18 -12
- package/src/app/OnboardingWizard.tsx +19 -6
- package/src/app/SettingsSection.tsx +1 -1
- package/src/app/TeamMembersPanel.tsx +47 -37
- package/src/components/ActivityFeed.tsx +82 -0
- package/src/components/Chart.tsx +245 -0
- package/src/components/CommandMenu.tsx +7 -1
- package/src/components/DataTable.tsx +23 -13
- package/src/components/FileUpload.tsx +24 -5
- package/src/components/NotificationsPopover.tsx +146 -0
- package/src/components/Notify.tsx +4 -2
- package/src/index.ts +7 -2
- package/src/marketing/ContactSection.tsx +13 -2
- package/src/marketing/CtaSection.tsx +93 -9
- package/src/marketing/FeaturesSection.tsx +27 -12
- package/src/marketing/HeroSection.tsx +5 -2
- package/src/marketing/NewsletterSection.tsx +12 -2
- package/src/marketing/TeamSection.tsx +10 -2
- package/src/mechanics/Carousel.tsx +112 -0
- package/src/mechanics/Sortable.tsx +128 -0
- package/src/marketing/CarouselSection.tsx +0 -126
- package/src/marketing/CtaCardSection.tsx +0 -95
package/dist/index.d.ts
CHANGED
|
@@ -317,7 +317,7 @@ interface SettingsSectionProps {
|
|
|
317
317
|
description?: string;
|
|
318
318
|
/** Form fields, buttons, or any content for the right-hand column — e.g. a `<form>`. */
|
|
319
319
|
children: React.ReactNode;
|
|
320
|
-
/**
|
|
320
|
+
/** Marks the section as a destructive action (e.g. "Delete account") — renders the title in the destructive color. @default false */
|
|
321
321
|
danger?: boolean;
|
|
322
322
|
className?: string;
|
|
323
323
|
}
|
|
@@ -531,8 +531,10 @@ interface FeaturesSectionProps {
|
|
|
531
531
|
description: string;
|
|
532
532
|
href?: string;
|
|
533
533
|
}>;
|
|
534
|
+
/** How the feature cards are arranged. @default 'grid' */
|
|
535
|
+
layout?: 'grid' | 'carousel';
|
|
534
536
|
}
|
|
535
|
-
declare function FeaturesSection({ title, description, badge, features, }: FeaturesSectionProps): react_jsx_runtime.JSX.Element;
|
|
537
|
+
declare function FeaturesSection({ title, description, badge, features, layout, }: FeaturesSectionProps): react_jsx_runtime.JSX.Element;
|
|
536
538
|
|
|
537
539
|
interface GroupedFeatureGroup {
|
|
538
540
|
label: string;
|
|
@@ -578,23 +580,6 @@ interface TechStackSectionProps {
|
|
|
578
580
|
}
|
|
579
581
|
declare function TechStackSection({ badge, title, description, items, }: TechStackSectionProps): react_jsx_runtime.JSX.Element;
|
|
580
582
|
|
|
581
|
-
interface CarouselSectionProps {
|
|
582
|
-
title?: string;
|
|
583
|
-
description?: string;
|
|
584
|
-
badge?: string;
|
|
585
|
-
features: Array<{
|
|
586
|
-
icon: LucideIcon;
|
|
587
|
-
title: string;
|
|
588
|
-
description: string;
|
|
589
|
-
href?: string;
|
|
590
|
-
}>;
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Horizontally scrolling card carousel for feature-style content.
|
|
594
|
-
* Scroll-snap based with prev/next controls — no carousel dependency.
|
|
595
|
-
*/
|
|
596
|
-
declare function CarouselSection({ title, description, badge, features, }: CarouselSectionProps): react_jsx_runtime.JSX.Element;
|
|
597
|
-
|
|
598
583
|
interface FeatureMarqueeItem {
|
|
599
584
|
icon: LucideIcon;
|
|
600
585
|
title: string;
|
|
@@ -615,7 +600,7 @@ declare function FeatureMarqueeSection({ badge, title, description, rows, speed,
|
|
|
615
600
|
|
|
616
601
|
interface CtaSectionProps {
|
|
617
602
|
heading: string;
|
|
618
|
-
description
|
|
603
|
+
description?: string;
|
|
619
604
|
primaryCta: {
|
|
620
605
|
label: string;
|
|
621
606
|
href: string;
|
|
@@ -625,22 +610,18 @@ interface CtaSectionProps {
|
|
|
625
610
|
href: string;
|
|
626
611
|
};
|
|
627
612
|
footnote?: string;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
label: string;
|
|
637
|
-
href: string;
|
|
638
|
-
};
|
|
639
|
-
footnote?: string;
|
|
613
|
+
/**
|
|
614
|
+
* Visual treatment of the section.
|
|
615
|
+
* - `'default'` — badge icon, radial glow, primary + secondary CTAs
|
|
616
|
+
* - `'showcase'` — large watermark icon with a scroll-reveal, single pill CTA
|
|
617
|
+
* @default 'default'
|
|
618
|
+
*/
|
|
619
|
+
variant?: 'default' | 'showcase';
|
|
620
|
+
/** (showcase) Watermark icon rendered behind the content. @default <Rocket /> */
|
|
640
621
|
icon?: React.ReactNode;
|
|
641
622
|
renderLink?: AppShellRenderLink;
|
|
642
623
|
}
|
|
643
|
-
declare function
|
|
624
|
+
declare function CtaSection(props: CtaSectionProps): react_jsx_runtime.JSX.Element;
|
|
644
625
|
|
|
645
626
|
interface PricingFeature {
|
|
646
627
|
label: string;
|
|
@@ -976,6 +957,45 @@ interface PageTransitionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
976
957
|
}
|
|
977
958
|
declare function PageTransition({ variant, duration, children, className, style, ...props }: PageTransitionProps): react_jsx_runtime.JSX.Element;
|
|
978
959
|
|
|
960
|
+
interface CarouselProps {
|
|
961
|
+
/** Items to scroll through — each child becomes one snap slide. */
|
|
962
|
+
children: React.ReactNode;
|
|
963
|
+
/** Width classes applied to each slide. @default 'w-[280px] sm:w-[320px]' */
|
|
964
|
+
itemClassName?: string;
|
|
965
|
+
/** Prev/next control placement. @default 'top-right' */
|
|
966
|
+
controls?: 'top-right' | 'none';
|
|
967
|
+
/** Accessible label for the scroll region. */
|
|
968
|
+
ariaLabel?: string;
|
|
969
|
+
className?: string;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Scroll-snap carousel behavior — wraps any children in a horizontally
|
|
973
|
+
* scrolling track with prev/next controls. A mechanic, not a section:
|
|
974
|
+
* feed it cards, images, or whole blocks. No carousel dependency.
|
|
975
|
+
*/
|
|
976
|
+
declare function Carousel({ children, itemClassName, controls, ariaLabel, className, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
977
|
+
|
|
978
|
+
interface SortableProps {
|
|
979
|
+
/** Item ids in render order — one per child, same order as `children`. */
|
|
980
|
+
items: string[];
|
|
981
|
+
/** Fired with the new id order after a drag completes. */
|
|
982
|
+
onReorder: (items: string[]) => void;
|
|
983
|
+
/** One element per id — pairing is by position, so keep orders aligned. */
|
|
984
|
+
children: React.ReactNode;
|
|
985
|
+
/** Layout of the sortable collection. @default 'vertical' */
|
|
986
|
+
direction?: 'vertical' | 'horizontal' | 'grid';
|
|
987
|
+
disabled?: boolean;
|
|
988
|
+
className?: string;
|
|
989
|
+
itemClassName?: string;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Drag-to-reorder behavior — wraps any children and makes them sortable by
|
|
993
|
+
* pointer or keyboard. A mechanic, not a list component: feed it cards, rows,
|
|
994
|
+
* or tiles. Controlled: pass `items` (ids in order) and apply the new order
|
|
995
|
+
* in `onReorder`.
|
|
996
|
+
*/
|
|
997
|
+
declare function Sortable({ items, onReorder, children, direction, disabled, className, itemClassName, }: SortableProps): react_jsx_runtime.JSX.Element;
|
|
998
|
+
|
|
979
999
|
interface SpotlightItem {
|
|
980
1000
|
id: string;
|
|
981
1001
|
label: string;
|
|
@@ -1127,6 +1147,41 @@ interface DataTableProps<TData> {
|
|
|
1127
1147
|
*/
|
|
1128
1148
|
declare function DataTable<TData>({ columns, data, searchKey, searchPlaceholder, selectable, onSelectionChange, pageSize, toolbar, onRowClick, emptyMessage, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1129
1149
|
|
|
1150
|
+
interface ChartSeries {
|
|
1151
|
+
/** Data key to plot. */
|
|
1152
|
+
key: string;
|
|
1153
|
+
/** Legend and tooltip label. @default key */
|
|
1154
|
+
label?: string;
|
|
1155
|
+
/** CSS color. @default theme tokens --chart-1..5 in fixed order */
|
|
1156
|
+
color?: string;
|
|
1157
|
+
}
|
|
1158
|
+
interface ChartProps {
|
|
1159
|
+
/** Chart form. @default 'line' */
|
|
1160
|
+
type?: 'line' | 'area' | 'bar' | 'donut';
|
|
1161
|
+
data: Array<Record<string, string | number>>;
|
|
1162
|
+
/** Key for x-axis categories (line/area/bar) or slice labels (donut). */
|
|
1163
|
+
xKey: string;
|
|
1164
|
+
/** Series to plot. Donut uses `series[0].key` as the slice value. */
|
|
1165
|
+
series: ChartSeries[];
|
|
1166
|
+
/** Chart height in px. @default 300 */
|
|
1167
|
+
height?: number;
|
|
1168
|
+
/** Horizontal grid lines. @default true (ignored for donut) */
|
|
1169
|
+
grid?: boolean;
|
|
1170
|
+
/** Legend. @default true for multiple series or donut, false for one series */
|
|
1171
|
+
legend?: boolean;
|
|
1172
|
+
/** Formats values in tooltips and the y-axis, e.g. `(v) => \`$${v}\``. */
|
|
1173
|
+
valueFormatter?: (value: number) => string;
|
|
1174
|
+
className?: string;
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Theme-aware chart — one component, `type` switches the form. Colors come
|
|
1178
|
+
* from the `--chart-1..5` theme tokens in fixed order (override per series
|
|
1179
|
+
* via `color`). Line and area for change-over-time, bar for magnitude
|
|
1180
|
+
* comparison, donut for part-of-whole identity. More than 5 donut slices:
|
|
1181
|
+
* fold the tail into an "Other" slice in your data instead of adding hues.
|
|
1182
|
+
*/
|
|
1183
|
+
declare function Chart({ type, data, xKey, series, height, grid, legend, valueFormatter, className, }: ChartProps): react_jsx_runtime.JSX.Element;
|
|
1184
|
+
|
|
1130
1185
|
interface FileUploadEntry {
|
|
1131
1186
|
id: string;
|
|
1132
1187
|
file: File;
|
|
@@ -1166,7 +1221,7 @@ interface NotifyAction {
|
|
|
1166
1221
|
onClick: () => void;
|
|
1167
1222
|
}
|
|
1168
1223
|
interface NotificationToastProps {
|
|
1169
|
-
variant?: 'success' | 'info' | 'message';
|
|
1224
|
+
variant?: 'success' | 'info' | 'warning' | 'error' | 'message';
|
|
1170
1225
|
title: string;
|
|
1171
1226
|
description?: string;
|
|
1172
1227
|
/** Avatar image — overrides the variant icon (e.g. for a message-from-a-person toast). */
|
|
@@ -1190,6 +1245,65 @@ interface NotifyOptions extends Omit<NotificationToastProps, 'onDismiss'> {
|
|
|
1190
1245
|
/** Fires a `NotificationToast` through sonner. Requires `<Toaster />` from `@olwiba/cn` mounted once in your app. */
|
|
1191
1246
|
declare function notify(options: NotifyOptions): string | number;
|
|
1192
1247
|
|
|
1248
|
+
interface NotificationItem {
|
|
1249
|
+
id: string;
|
|
1250
|
+
title: string;
|
|
1251
|
+
description?: string;
|
|
1252
|
+
/** Pre-formatted timestamp, e.g. "2h ago" or "Yesterday". */
|
|
1253
|
+
timestamp?: string;
|
|
1254
|
+
read?: boolean;
|
|
1255
|
+
/** Avatar image — takes precedence over `icon`. */
|
|
1256
|
+
avatar?: string;
|
|
1257
|
+
icon?: React.ReactNode;
|
|
1258
|
+
}
|
|
1259
|
+
interface NotificationsPopoverProps {
|
|
1260
|
+
notifications: NotificationItem[];
|
|
1261
|
+
onNotificationClick?: (notification: NotificationItem) => void;
|
|
1262
|
+
/** Shows a "Mark all read" action in the header when there are unread items. */
|
|
1263
|
+
onMarkAllRead?: () => void;
|
|
1264
|
+
title?: string;
|
|
1265
|
+
emptyMessage?: string;
|
|
1266
|
+
/** Popover alignment relative to the bell button. @default 'end' */
|
|
1267
|
+
align?: 'start' | 'center' | 'end';
|
|
1268
|
+
/** Controlled open state — omit to let the component manage it internally. */
|
|
1269
|
+
open?: boolean;
|
|
1270
|
+
onOpenChange?: (open: boolean) => void;
|
|
1271
|
+
className?: string;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Bell button + persistent notification inbox. Complements `notify()` toasts:
|
|
1275
|
+
* a toast announces an event as it happens, this popover holds the history.
|
|
1276
|
+
* Presentation-only — pass `notifications` from your own data layer and
|
|
1277
|
+
* persist read state via `onMarkAllRead`/`onNotificationClick`.
|
|
1278
|
+
*/
|
|
1279
|
+
declare function NotificationsPopover({ notifications, onNotificationClick, onMarkAllRead, title, emptyMessage, align, open, onOpenChange, className, }: NotificationsPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1280
|
+
|
|
1281
|
+
interface ActivityFeedItem {
|
|
1282
|
+
id: string;
|
|
1283
|
+
/** Main line — pass rich nodes for emphasis, e.g. <><b>Ana</b> deployed to production</>. */
|
|
1284
|
+
title: React.ReactNode;
|
|
1285
|
+
description?: string;
|
|
1286
|
+
/** Pre-formatted timestamp, e.g. "2h ago" or "Mar 4". */
|
|
1287
|
+
timestamp?: string;
|
|
1288
|
+
/** Avatar image — takes precedence over `icon`. */
|
|
1289
|
+
avatar?: string;
|
|
1290
|
+
/** Fallback initials when `avatar` is set but fails to load. */
|
|
1291
|
+
initials?: string;
|
|
1292
|
+
/** Icon node rendered in the timeline marker when there is no avatar. */
|
|
1293
|
+
icon?: React.ReactNode;
|
|
1294
|
+
}
|
|
1295
|
+
interface ActivityFeedProps {
|
|
1296
|
+
items: ActivityFeedItem[];
|
|
1297
|
+
emptyMessage?: string;
|
|
1298
|
+
className?: string;
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Vertical activity timeline — avatar or icon markers connected by a rail,
|
|
1302
|
+
* one row per event. Presentation-only: pass pre-formatted timestamps and
|
|
1303
|
+
* rich `title` nodes from your own data layer.
|
|
1304
|
+
*/
|
|
1305
|
+
declare function ActivityFeed({ items, emptyMessage, className, }: ActivityFeedProps): react_jsx_runtime.JSX.Element;
|
|
1306
|
+
|
|
1193
1307
|
declare const sizes: {
|
|
1194
1308
|
readonly sm: {
|
|
1195
1309
|
readonly outer: "w-44";
|
|
@@ -1556,4 +1670,4 @@ interface UsePaginationReturn {
|
|
|
1556
1670
|
}
|
|
1557
1671
|
declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
|
|
1558
1672
|
|
|
1559
|
-
export { AnimatedPill, type AnimatedPillProps, AppContent, type AppContentProps, AppGrid, AppGridCell, type AppGridCellProps, type AppGridProps, type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, type BillingInvoice, BillingPanel, type BillingPanelProps, type BillingPaymentMethod, type BillingUsageMetric, BrandColorSwitchMinimal, Button, type ButtonProps, Card, type CardProps,
|
|
1673
|
+
export { ActivityFeed, type ActivityFeedItem, type ActivityFeedProps, AnimatedPill, type AnimatedPillProps, AppContent, type AppContentProps, AppGrid, AppGridCell, type AppGridCellProps, type AppGridProps, type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, type BillingInvoice, BillingPanel, type BillingPanelProps, type BillingPaymentMethod, type BillingUsageMetric, BrandColorSwitchMinimal, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, ChangelogCard, type ChangelogCardProps, type ChangelogHighlight, ChangelogList, type ChangelogListProps, type ChangelogReleaseType, Chart, type ChartProps, type ChartSeries, Checkbox, type CheckboxProps, CommandMenu, type CommandMenuGroup, type CommandMenuItem, type CommandMenuProps, type ComparisonColumn, ComparisonSection, type ComparisonSectionProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CountdownTimer, type CountdownTimerProps, CtaSection, type CtaSectionProps, DataTable, type DataTableProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, type FeatureMarqueeItem, type FeatureMarqueeRow, FeatureMarqueeSection, type FeatureMarqueeSectionProps, FeaturesSection, type FeaturesSectionProps, FileUpload, type FileUploadEntry, type FileUploadProps, FlowBracket, type FlowBracketProps, FlowConnector, type FlowConnectorProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, Grid, GridItem, type GridItemProps, type GridProps, type GroupedFeatureGroup, GroupedFeaturesSection, type GroupedFeaturesSectionProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, type MarketingSectionSpacing, ModeSwitchMinimal, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, type NotificationItem, NotificationToast, type NotificationToastProps, NotificationsPopover, type NotificationsPopoverProps, type NotifyAction, type NotifyOptions, OlwibaUIProvider, type OlwibaUIProviderProps, type OnboardingStep, OnboardingWizard, type OnboardingWizardProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, type PostAuthor, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, PublicPageFrame, type PublicPageFrameProps, type QualificationColumn, QualificationSection, type QualificationSectionProps, RegisterHotkeys, RootErrorFallback, Section, type SectionProps, SectionTitle, type SectionTitleProps, SettingsSection, type SettingsSectionProps, Sortable, type SortableProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, Stack, type StackProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, type StepItem, StepsSection, type StepsSectionProps, Suspensed, Switch, type SwitchProps, type TeamMember, type TeamMemberRecord, TeamMembersPanel, type TeamMembersPanelProps, TeamSection, type TeamSectionProps, type TechStackItem, TechStackSection, type TechStackSectionProps, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, VersionBanner, cn, marketingSectionSpacing, notify, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
|