@mostrom/app-shell 0.1.1 → 0.1.3

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.
@@ -19,6 +19,10 @@ const buttonVariants = cva(
19
19
  ghost:
20
20
  "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
21
21
  link: "text-primary underline-offset-4 hover:underline",
22
+ // Semantic variants
23
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
24
+ normal:
25
+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
22
26
  },
23
27
  size: {
24
28
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
@@ -43,10 +47,12 @@ function Button({
43
47
  variant = "default",
44
48
  size = "default",
45
49
  asChild = false,
50
+ fullWidth = false,
46
51
  ...props
47
52
  }: React.ComponentProps<"button"> &
48
53
  VariantProps<typeof buttonVariants> & {
49
54
  asChild?: boolean
55
+ fullWidth?: boolean
50
56
  }) {
51
57
  const Comp = asChild ? Slot.Root : "button"
52
58
 
@@ -55,7 +61,7 @@ function Button({
55
61
  data-slot="button"
56
62
  data-variant={variant}
57
63
  data-size={size}
58
- className={cn(buttonVariants({ variant, size, className }))}
64
+ className={cn(buttonVariants({ variant, size, className }), fullWidth && "w-full")}
59
65
  {...props}
60
66
  />
61
67
  )
@@ -1,5 +1,6 @@
1
1
  // UI Components (shadcn/ui + reui)
2
2
  export * from "./avatar";
3
+ export * from "./badge";
3
4
  export * from "./breadcrumb";
4
5
  export * from "./button";
5
6
  export * from "./button-group";
@@ -24,6 +25,7 @@ export * from "./scroll-area";
24
25
  export * from "./select";
25
26
  export * from "./separator";
26
27
  export * from "./sheet";
28
+ export * from "./space-between";
27
29
  export * from "./sidebar";
28
30
  export * from "./skeleton";
29
31
  export * from "./sonner";
@@ -0,0 +1,59 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cn } from "@/lib/utils"
4
+
5
+ const spaceBetweenVariants = cva("flex", {
6
+ variants: {
7
+ direction: {
8
+ vertical: "flex-col",
9
+ horizontal: "flex-row",
10
+ },
11
+ size: {
12
+ xxxs: "gap-0.5", // 2px
13
+ xxs: "gap-1", // 4px
14
+ xs: "gap-2", // 8px
15
+ s: "gap-3", // 12px
16
+ m: "gap-4", // 16px
17
+ l: "gap-6", // 24px
18
+ xl: "gap-8", // 32px
19
+ xxl: "gap-10", // 40px
20
+ },
21
+ alignItems: {
22
+ center: "items-center",
23
+ start: "items-start",
24
+ end: "items-end",
25
+ baseline: "items-baseline",
26
+ stretch: "items-stretch",
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ direction: "vertical",
31
+ size: "m",
32
+ alignItems: "stretch",
33
+ },
34
+ })
35
+
36
+ export interface SpaceBetweenProps
37
+ extends React.HTMLAttributes<HTMLDivElement>,
38
+ VariantProps<typeof spaceBetweenVariants> {}
39
+
40
+ function SpaceBetween({
41
+ className,
42
+ direction,
43
+ size,
44
+ alignItems,
45
+ children,
46
+ ...props
47
+ }: SpaceBetweenProps) {
48
+ return (
49
+ <div
50
+ data-slot="space-between"
51
+ className={cn(spaceBetweenVariants({ direction, size, alignItems }), className)}
52
+ {...props}
53
+ >
54
+ {children}
55
+ </div>
56
+ )
57
+ }
58
+
59
+ export { SpaceBetween, spaceBetweenVariants }
package/src/index.ts CHANGED
@@ -39,7 +39,7 @@ export type {
39
39
  export { AppLayout } from "./components/layout/AppLayout";
40
40
  export type { AppLayoutProps } from "./components/layout/AppLayout";
41
41
 
42
- // Flashbar components (replaces Cloudscape Flashbar)
42
+ // Flashbar components
43
43
  export { AppFlashbar } from "./components/layout/AppFlashbar";
44
44
  export type { AppFlashbarProps, FlashbarMessage } from "./components/layout/AppFlashbar";
45
45