@kamod-ch/ui 1.0.1 → 1.1.0

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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/kamod-ch/kamod-ui/main/.github/assets/logo-kamod-ui-dark.svg#gh-light-mode-only" alt="kamod | UI" width="280" />
3
- <img src="https://raw.githubusercontent.com/kamod-ch/kamod-ui/main/.github/assets/logo-kamod-ui-light.svg#gh-dark-mode-only" alt="kamod | UI" width="280" />
2
+ <img src="https://raw.githubusercontent.com/kamod-ch/kamod-ui/main/.github/assets/logo-kamod-ui-dark.svg#gh-light-mode-only" alt="Kamod UI" width="280" />
3
+ <img src="https://raw.githubusercontent.com/kamod-ch/kamod-ui/main/.github/assets/logo-kamod-ui-light.svg#gh-dark-mode-only" alt="Kamod UI" width="280" />
4
4
  </p>
5
5
 
6
- <h1 align="center">Kamod UI</h1>
6
+ # Kamod UI
7
7
 
8
8
  Lightweight UI components for **Preact** and **Tailwind**: composable primitives you can customize, extend, and ship without a heavy runtime. Open source; source is meant to be read and adapted.
9
9
 
@@ -0,0 +1,160 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import { JSX, ComponentChildren } from 'preact';
4
+ import { a as InputProps } from './Input-Cem05el9.js';
5
+ import { a as SeparatorProps } from './Separator-DCQYrnpB.js';
6
+
7
+ type SidebarMenuProps = JSX.HTMLAttributes<HTMLUListElement> & {
8
+ children?: ComponentChildren;
9
+ };
10
+ declare const SidebarMenu: ({ class: className, children, ...rest }: SidebarMenuProps) => JSX.Element;
11
+ type SidebarMenuItemProps = JSX.HTMLAttributes<HTMLLIElement> & {
12
+ children?: ComponentChildren;
13
+ };
14
+ declare const SidebarMenuItem: ({ class: className, children, ...rest }: SidebarMenuItemProps) => JSX.Element;
15
+ declare const sidebarMenuButton: tailwind_variants.TVReturnType<{
16
+ variant: {
17
+ default: string;
18
+ outline: string;
19
+ };
20
+ size: {
21
+ default: string;
22
+ sm: string;
23
+ lg: string;
24
+ };
25
+ }, undefined, string[], {
26
+ variant: {
27
+ default: string;
28
+ outline: string;
29
+ };
30
+ size: {
31
+ default: string;
32
+ sm: string;
33
+ lg: string;
34
+ };
35
+ }, undefined, tailwind_variants.TVReturnType<{
36
+ variant: {
37
+ default: string;
38
+ outline: string;
39
+ };
40
+ size: {
41
+ default: string;
42
+ sm: string;
43
+ lg: string;
44
+ };
45
+ }, undefined, string[], unknown, unknown, undefined>>;
46
+ type SidebarMenuButtonProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof sidebarMenuButton> & {
47
+ asChild?: boolean;
48
+ isActive?: boolean;
49
+ tooltip?: string | JSX.HTMLAttributes<HTMLDivElement>;
50
+ children?: ComponentChildren;
51
+ };
52
+ declare const SidebarMenuButton: ({ asChild, isActive, variant, size, tooltip, class: className, children, ...rest }: SidebarMenuButtonProps) => JSX.Element;
53
+ type SidebarMenuActionProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
54
+ asChild?: boolean;
55
+ showOnHover?: boolean;
56
+ children?: ComponentChildren;
57
+ };
58
+ declare const SidebarMenuAction: ({ class: className, asChild, showOnHover, children, ...rest }: SidebarMenuActionProps) => JSX.Element;
59
+ type SidebarMenuBadgeProps = JSX.HTMLAttributes<HTMLDivElement> & {
60
+ children?: ComponentChildren;
61
+ };
62
+ declare const SidebarMenuBadge: ({ class: className, children, ...rest }: SidebarMenuBadgeProps) => JSX.Element;
63
+ type SidebarMenuSkeletonProps = JSX.HTMLAttributes<HTMLDivElement> & {
64
+ showIcon?: boolean;
65
+ };
66
+ declare const SidebarMenuSkeleton: ({ class: className, showIcon, ...rest }: SidebarMenuSkeletonProps) => JSX.Element;
67
+ type SidebarMenuSubProps = JSX.HTMLAttributes<HTMLUListElement> & {
68
+ children?: ComponentChildren;
69
+ };
70
+ declare const SidebarMenuSub: ({ class: className, children, ...rest }: SidebarMenuSubProps) => JSX.Element;
71
+ type SidebarMenuSubItemProps = JSX.HTMLAttributes<HTMLLIElement> & {
72
+ children?: ComponentChildren;
73
+ };
74
+ declare const SidebarMenuSubItem: ({ class: className, children, ...rest }: SidebarMenuSubItemProps) => JSX.Element;
75
+ type SidebarMenuSubButtonProps = JSX.AnchorHTMLAttributes<HTMLAnchorElement> & {
76
+ asChild?: boolean;
77
+ size?: "sm" | "md";
78
+ isActive?: boolean;
79
+ children?: ComponentChildren;
80
+ };
81
+ declare const SidebarMenuSubButton: ({ asChild, size, isActive, class: className, children, ...rest }: SidebarMenuSubButtonProps) => JSX.Element;
82
+
83
+ type SidebarInputProps = InputProps;
84
+ declare const SidebarInput: ({ class: className, ...rest }: SidebarInputProps) => JSX.Element;
85
+ type SidebarSeparatorProps = SeparatorProps;
86
+ declare const SidebarSeparator: ({ class: className, ...rest }: SidebarSeparatorProps) => JSX.Element;
87
+ type SidebarGroupProps = JSX.HTMLAttributes<HTMLDivElement> & {
88
+ children?: ComponentChildren;
89
+ };
90
+ declare const SidebarGroup: ({ class: className, children, ...rest }: SidebarGroupProps) => JSX.Element;
91
+ type SidebarGroupLabelProps = JSX.HTMLAttributes<HTMLDivElement> & {
92
+ asChild?: boolean;
93
+ children?: ComponentChildren;
94
+ };
95
+ declare const SidebarGroupLabel: ({ class: className, asChild, children, ...rest }: SidebarGroupLabelProps) => JSX.Element;
96
+ type SidebarGroupActionProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
97
+ asChild?: boolean;
98
+ children?: ComponentChildren;
99
+ };
100
+ declare const SidebarGroupAction: ({ class: className, asChild, children, ...rest }: SidebarGroupActionProps) => JSX.Element;
101
+ type SidebarGroupContentProps = JSX.HTMLAttributes<HTMLDivElement> & {
102
+ children?: ComponentChildren;
103
+ };
104
+ declare const SidebarGroupContent: ({ class: className, children, ...rest }: SidebarGroupContentProps) => JSX.Element;
105
+
106
+ type SidebarRailProps = JSX.ButtonHTMLAttributes<HTMLButtonElement>;
107
+ declare const SidebarRail: ({ class: className, ...rest }: SidebarRailProps) => JSX.Element;
108
+
109
+ type SidebarInsetProps = JSX.HTMLAttributes<HTMLElement> & {
110
+ children?: ComponentChildren;
111
+ };
112
+ declare const SidebarInset: ({ class: className, children, ...rest }: SidebarInsetProps) => JSX.Element;
113
+
114
+ type SidebarFooterProps = JSX.HTMLAttributes<HTMLDivElement> & {
115
+ children?: ComponentChildren;
116
+ };
117
+ declare const SidebarFooter: ({ class: className, children, ...rest }: SidebarFooterProps) => JSX.Element;
118
+
119
+ type SidebarContentProps = JSX.HTMLAttributes<HTMLDivElement> & {
120
+ children?: ComponentChildren;
121
+ };
122
+ declare const SidebarContent: ({ class: className, children, ...rest }: SidebarContentProps) => JSX.Element;
123
+
124
+ type SidebarHeaderProps = JSX.HTMLAttributes<HTMLDivElement> & {
125
+ children?: ComponentChildren;
126
+ };
127
+ declare const SidebarHeader: ({ class: className, children, ...rest }: SidebarHeaderProps) => JSX.Element;
128
+
129
+ type SidebarTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & {
130
+ class?: string;
131
+ };
132
+ declare const SidebarTrigger: ({ class: className, onClick, ...rest }: SidebarTriggerProps) => JSX.Element;
133
+
134
+ type SidebarProps = JSX.HTMLAttributes<HTMLDivElement> & {
135
+ side?: "left" | "right";
136
+ variant?: "sidebar" | "floating" | "inset";
137
+ collapsible?: "offcanvas" | "icon" | "none";
138
+ children?: ComponentChildren;
139
+ };
140
+ declare const Sidebar: ({ side, variant, collapsible, class: className, children, ...rest }: SidebarProps) => JSX.Element;
141
+
142
+ type SidebarContextValue = {
143
+ state: "expanded" | "collapsed";
144
+ open: boolean;
145
+ setOpen: (open: boolean | ((prev: boolean) => boolean)) => void;
146
+ openMobile: boolean;
147
+ setOpenMobile: (open: boolean | ((prev: boolean) => boolean)) => void;
148
+ isMobile: boolean;
149
+ toggleSidebar: () => void;
150
+ };
151
+ declare const useSidebar: () => SidebarContextValue;
152
+ type SidebarProviderProps = JSX.HTMLAttributes<HTMLDivElement> & {
153
+ defaultOpen?: boolean;
154
+ open?: boolean;
155
+ onOpenChange?: (open: boolean) => void;
156
+ children?: ComponentChildren;
157
+ };
158
+ declare const SidebarProvider: ({ defaultOpen, open: openProp, onOpenChange: setOpenProp, class: className, style, children, ...rest }: SidebarProviderProps) => JSX.Element;
159
+
160
+ export { type SidebarHeaderProps as A, type SidebarContentProps as B, type SidebarFooterProps as C, type SidebarInsetProps as D, type SidebarRailProps as E, type SidebarGroupProps as F, type SidebarMenuProps as G, Sidebar as S, SidebarContent as a, SidebarFooter as b, SidebarGroup as c, SidebarGroupAction as d, SidebarGroupContent as e, SidebarGroupLabel as f, SidebarHeader as g, SidebarInput as h, SidebarInset as i, SidebarMenu as j, SidebarMenuAction as k, SidebarMenuBadge as l, SidebarMenuButton as m, SidebarMenuItem as n, SidebarMenuSkeleton as o, SidebarMenuSub as p, SidebarMenuSubButton as q, SidebarMenuSubItem as r, type SidebarProps as s, SidebarProvider as t, type SidebarProviderProps as u, SidebarRail as v, SidebarSeparator as w, SidebarTrigger as x, useSidebar as y, type SidebarTriggerProps as z };