@olwiba/ui 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React from 'react';
4
- import { ReactNode } from 'react';
4
+ import React__default, { ReactNode } from 'react';
5
5
  import { ButtonProps as ButtonProps$1, CardProps as CardProps$1, BadgeProps as BadgeProps$1, InputProps as InputProps$1, TextareaProps as TextareaProps$1, CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1 } from '@olwiba/cn';
6
6
  export { CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@olwiba/cn';
7
7
  import { LucideIcon } from 'lucide-react';
@@ -60,6 +60,68 @@ declare const Switch: React.ForwardRefExoticComponent<SwitchProps$1 & {
60
60
  mode?: "default" | "playful" | "smooth";
61
61
  } & React.RefAttributes<HTMLButtonElement>>;
62
62
 
63
+ declare const gapMap$1: {
64
+ none: string;
65
+ xs: string;
66
+ sm: string;
67
+ md: string;
68
+ lg: string;
69
+ xl: string;
70
+ };
71
+ interface GridProps extends React__default.HTMLAttributes<HTMLDivElement> {
72
+ columns?: 1 | 2 | 3 | 4 | 5 | 6 | 12;
73
+ gap?: keyof typeof gapMap$1;
74
+ }
75
+ declare function Grid({ columns, gap, className, children, ...props }: GridProps): react_jsx_runtime.JSX.Element;
76
+ interface GridItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
77
+ span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
78
+ rowSpan?: 1 | 2 | 3 | 4;
79
+ }
80
+ declare function GridItem({ span, rowSpan, className, children, ...props }: GridItemProps): react_jsx_runtime.JSX.Element;
81
+
82
+ declare const gapMap: {
83
+ none: string;
84
+ xs: string;
85
+ sm: string;
86
+ md: string;
87
+ lg: string;
88
+ xl: string;
89
+ };
90
+ declare const alignMap: {
91
+ start: string;
92
+ center: string;
93
+ end: string;
94
+ stretch: string;
95
+ };
96
+ declare const justifyMap: {
97
+ start: string;
98
+ center: string;
99
+ end: string;
100
+ between: string;
101
+ around: string;
102
+ };
103
+ interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
104
+ direction?: 'col' | 'row';
105
+ gap?: keyof typeof gapMap;
106
+ align?: keyof typeof alignMap;
107
+ justify?: keyof typeof justifyMap;
108
+ wrap?: boolean;
109
+ }
110
+ declare function Stack({ direction, gap, align, justify, wrap, className, children, ...props }: StackProps): react_jsx_runtime.JSX.Element;
111
+
112
+ declare const paddingMap: {
113
+ none: string;
114
+ sm: string;
115
+ md: string;
116
+ lg: string;
117
+ };
118
+ interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
119
+ title?: string;
120
+ description?: string;
121
+ padding?: keyof typeof paddingMap;
122
+ }
123
+ declare function Section({ title, description, padding, className, children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
124
+
63
125
  interface AppNavItem {
64
126
  icon: LucideIcon;
65
127
  label: string;
@@ -894,4 +956,4 @@ interface UsePaginationReturn {
894
956
  }
895
957
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
896
958
 
897
- export { type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, ChangelogCard, type ChangelogCardProps, ChangelogList, type ChangelogListProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, 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, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
959
+ export { type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, ChangelogCard, type ChangelogCardProps, ChangelogList, type ChangelogListProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, Grid, GridItem, type GridItemProps, type GridProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, Section, type SectionProps, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, Stack, type StackProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, 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, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
package/dist/index.js CHANGED
@@ -73,6 +73,119 @@ var Switch = React25.forwardRef(({ mode: _mode, ...props }, ref) => {
73
73
  return /* @__PURE__ */ jsx(Switch$1, { ...props, ref });
74
74
  });
75
75
  Switch.displayName = "Switch";
76
+ var colsMap = {
77
+ 1: "grid-cols-1",
78
+ 2: "grid-cols-2",
79
+ 3: "grid-cols-3",
80
+ 4: "grid-cols-4",
81
+ 5: "grid-cols-5",
82
+ 6: "grid-cols-6",
83
+ 12: "grid-cols-12"
84
+ };
85
+ var gapMap = {
86
+ none: "gap-0",
87
+ xs: "gap-2",
88
+ sm: "gap-3",
89
+ md: "gap-4",
90
+ lg: "gap-6",
91
+ xl: "gap-8"
92
+ };
93
+ var spanMap = {
94
+ 1: "col-span-1",
95
+ 2: "col-span-2",
96
+ 3: "col-span-3",
97
+ 4: "col-span-4",
98
+ 5: "col-span-5",
99
+ 6: "col-span-6",
100
+ 7: "col-span-7",
101
+ 8: "col-span-8",
102
+ 9: "col-span-9",
103
+ 10: "col-span-10",
104
+ 11: "col-span-11",
105
+ 12: "col-span-12"
106
+ };
107
+ var rowSpanMap = {
108
+ 1: "row-span-1",
109
+ 2: "row-span-2",
110
+ 3: "row-span-3",
111
+ 4: "row-span-4"
112
+ };
113
+ function Grid({ columns = 3, gap = "md", className, children, ...props }) {
114
+ return /* @__PURE__ */ jsx("div", { className: cn("grid", colsMap[columns], gapMap[gap], className), ...props, children });
115
+ }
116
+ function GridItem({ span = 1, rowSpan, className, children, ...props }) {
117
+ return /* @__PURE__ */ jsx(
118
+ "div",
119
+ {
120
+ className: cn(spanMap[span], rowSpan != null && rowSpanMap[rowSpan], className),
121
+ ...props,
122
+ children
123
+ }
124
+ );
125
+ }
126
+ var gapMap2 = {
127
+ none: "gap-0",
128
+ xs: "gap-2",
129
+ sm: "gap-3",
130
+ md: "gap-4",
131
+ lg: "gap-6",
132
+ xl: "gap-8"
133
+ };
134
+ var alignMap = {
135
+ start: "items-start",
136
+ center: "items-center",
137
+ end: "items-end",
138
+ stretch: "items-stretch"
139
+ };
140
+ var justifyMap = {
141
+ start: "justify-start",
142
+ center: "justify-center",
143
+ end: "justify-end",
144
+ between: "justify-between",
145
+ around: "justify-around"
146
+ };
147
+ function Stack({
148
+ direction = "col",
149
+ gap = "md",
150
+ align = "stretch",
151
+ justify = "start",
152
+ wrap = false,
153
+ className,
154
+ children,
155
+ ...props
156
+ }) {
157
+ return /* @__PURE__ */ jsx(
158
+ "div",
159
+ {
160
+ className: cn(
161
+ "flex",
162
+ direction === "col" ? "flex-col" : "flex-row",
163
+ gapMap2[gap],
164
+ alignMap[align],
165
+ justifyMap[justify],
166
+ wrap && "flex-wrap",
167
+ className
168
+ ),
169
+ ...props,
170
+ children
171
+ }
172
+ );
173
+ }
174
+ var paddingMap = {
175
+ none: "",
176
+ sm: "py-4",
177
+ md: "py-8",
178
+ lg: "py-16"
179
+ };
180
+ function Section({ title, description, padding = "md", className, children, ...props }) {
181
+ return /* @__PURE__ */ jsxs("section", { className: cn("w-full", paddingMap[padding], className), ...props, children: [
182
+ (title || description) && /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
183
+ title && /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-foreground", children: title }),
184
+ description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
185
+ ] }),
186
+ children
187
+ ] });
188
+ }
76
189
  function NavUser({ user }) {
77
190
  const { isMobile } = useSidebar();
78
191
  const uiMode = useUIMode();
@@ -2398,6 +2511,6 @@ function usePagination(total, pageSize) {
2398
2511
  return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
2399
2512
  }
2400
2513
 
2401
- export { AppScreen, AppShell, AuthSection, Badge, Button, Card, ChangelogCard, ChangelogList, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, SectionTitle, Spotlight, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2514
+ export { AppScreen, AppShell, AuthSection, Badge, Button, Card, ChangelogCard, ChangelogList, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, Grid, GridItem, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, Section, SectionTitle, Spotlight, Stack, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2402
2515
  //# sourceMappingURL=index.js.map
2403
2516
  //# sourceMappingURL=index.js.map