@org-design-system/components 0.1.9 → 0.1.11

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.
@@ -0,0 +1,122 @@
1
+ import * as React from "react"
2
+ import { Slot } from "radix-ui"
3
+
4
+ import { cn } from "../lib/utils"
5
+ import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
6
+
7
+ function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
8
+ return (
9
+ <nav
10
+ aria-label="breadcrumb"
11
+ data-slot="breadcrumb"
12
+ className={cn(className)}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
19
+ return (
20
+ <ol
21
+ data-slot="breadcrumb-list"
22
+ className={cn(
23
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
24
+ className
25
+ )}
26
+ {...props}
27
+ />
28
+ )
29
+ }
30
+
31
+ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
32
+ return (
33
+ <li
34
+ data-slot="breadcrumb-item"
35
+ className={cn("inline-flex items-center gap-1", className)}
36
+ {...props}
37
+ />
38
+ )
39
+ }
40
+
41
+ function BreadcrumbLink({
42
+ asChild,
43
+ className,
44
+ ...props
45
+ }: React.ComponentProps<"a"> & {
46
+ asChild?: boolean
47
+ }) {
48
+ const Comp = asChild ? Slot.Root : "a"
49
+
50
+ return (
51
+ <Comp
52
+ data-slot="breadcrumb-link"
53
+ className={cn("transition-colors hover:text-foreground", className)}
54
+ {...props}
55
+ />
56
+ )
57
+ }
58
+
59
+ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
60
+ return (
61
+ <span
62
+ data-slot="breadcrumb-page"
63
+ role="link"
64
+ aria-disabled="true"
65
+ aria-current="page"
66
+ className={cn("font-normal text-foreground", className)}
67
+ {...props}
68
+ />
69
+ )
70
+ }
71
+
72
+ function BreadcrumbSeparator({
73
+ children,
74
+ className,
75
+ ...props
76
+ }: React.ComponentProps<"li">) {
77
+ return (
78
+ <li
79
+ data-slot="breadcrumb-separator"
80
+ role="presentation"
81
+ aria-hidden="true"
82
+ className={cn("[&>svg]:size-3.5", className)}
83
+ {...props}
84
+ >
85
+ {children ?? (
86
+ <ChevronRightIcon />
87
+ )}
88
+ </li>
89
+ )
90
+ }
91
+
92
+ function BreadcrumbEllipsis({
93
+ className,
94
+ ...props
95
+ }: React.ComponentProps<"span">) {
96
+ return (
97
+ <span
98
+ data-slot="breadcrumb-ellipsis"
99
+ role="presentation"
100
+ aria-hidden="true"
101
+ className={cn(
102
+ "flex size-5 items-center justify-center [&>svg]:size-4",
103
+ className
104
+ )}
105
+ {...props}
106
+ >
107
+ <MoreHorizontalIcon
108
+ />
109
+ <span className="sr-only">More</span>
110
+ </span>
111
+ )
112
+ }
113
+
114
+ export {
115
+ Breadcrumb,
116
+ BreadcrumbList,
117
+ BreadcrumbItem,
118
+ BreadcrumbLink,
119
+ BreadcrumbPage,
120
+ BreadcrumbSeparator,
121
+ BreadcrumbEllipsis,
122
+ }
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  export * from './components/alert-dialog';
3
3
  export * from './components/avatar';
4
4
  export * from './components/badge';
5
+ export * from './components/breadcrumb';
5
6
  export * from './components/button';
6
7
  export * from './components/card';
7
8
  export * from './components/checkbox';
package/dist/index.css DELETED
@@ -1,30 +0,0 @@
1
- @import "tailwindcss";
2
- @import "@org-design-system/styles/index.css";
3
- @import "@org-design-system/styles/component.css";
4
-
5
- @source "./components/**/*.tsx";
6
-
7
- @theme {
8
- /* Mapping for shadcn components that expect these variables */
9
- --color-background: var(--color-surface-bg);
10
- --color-foreground: var(--color-text-primary);
11
-
12
- --color-primary: var(--color-green-9);
13
- --color-primary-foreground: var(--color-gray-1);
14
-
15
- --color-secondary: var(--color-gray-alpha-3);
16
- --color-secondary-foreground: var(--color-text-primary);
17
-
18
- --color-muted: var(--color-gray-alpha-2);
19
- --color-muted-foreground: var(--color-text-secondary);
20
-
21
- --color-accent: var(--color-green-alpha-2);
22
- --color-accent-foreground: var(--color-text-focus);
23
-
24
- --color-destructive: var(--color-red-9);
25
- --color-destructive-foreground: var(--color-gray-1);
26
-
27
- --color-border: var(--color-stroke-primary);
28
- --color-input: var(--color-stroke-primary);
29
- --color-ring: var(--color-surface-focus);
30
- }