@me1a/ui 2.1.6 → 2.1.7

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.
@@ -157,46 +157,188 @@ declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<Omit<React
157
157
  isActive?: boolean;
158
158
  }, "ref"> & React$1.RefAttributes<HTMLAnchorElement>>;
159
159
 
160
+ /**
161
+ * Context props for the Sidebar component that manages its state and behavior.
162
+ * This context provides the necessary state and methods to control the sidebar's
163
+ * expansion, collapse, and mobile responsiveness.
164
+ *
165
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
166
+ */
160
167
  type SidebarContextProps = {
168
+ /** Current state of the sidebar - either expanded or collapsed */
161
169
  state: "expanded" | "collapsed";
170
+ /** Whether the sidebar is currently open */
162
171
  open: boolean;
172
+ /** Function to control the sidebar's open state */
163
173
  setOpen: (open: boolean) => void;
174
+ /** Whether the mobile sidebar is currently open */
164
175
  openMobile: boolean;
176
+ /** Function to control the mobile sidebar's open state */
165
177
  setOpenMobile: (open: boolean) => void;
178
+ /** Whether the sidebar is being viewed on a mobile device */
166
179
  isMobile: boolean;
180
+ /** Function to toggle the sidebar's state */
167
181
  toggleSidebar: () => void;
168
182
  };
183
+ /**
184
+ * Props for the main Sidebar component.
185
+ * Extends the base div props and adds sidebar-specific configuration options.
186
+ *
187
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
188
+ *
189
+ * @example
190
+ * ```tsx
191
+ * <Sidebar
192
+ * side="left"
193
+ * variant="sidebar"
194
+ * collapsible="icon"
195
+ * >
196
+ * <SidebarContent>...</SidebarContent>
197
+ * </Sidebar>
198
+ * ```
199
+ */
169
200
  type SidebarProps = React$1.ComponentProps<"div"> & {
201
+ /** Position of the sidebar relative to the main content */
170
202
  side?: "left" | "right";
203
+ /** Visual style variant of the sidebar */
171
204
  variant?: "sidebar" | "floating" | "inset";
205
+ /** Collapse behavior of the sidebar */
172
206
  collapsible?: "offcanvas" | "icon" | "none";
173
207
  };
208
+ /**
209
+ * Props for the SidebarProvider component that manages sidebar state.
210
+ * Provides controlled and uncontrolled state management options.
211
+ *
212
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
213
+ *
214
+ * @example
215
+ * ```tsx
216
+ * <SidebarProvider defaultOpen={true}>
217
+ * <Sidebar>...</Sidebar>
218
+ * </SidebarProvider>
219
+ * ```
220
+ */
174
221
  type SidebarProviderProps = React$1.ComponentProps<"div"> & {
222
+ /** Initial open state for uncontrolled usage */
175
223
  defaultOpen?: boolean;
224
+ /** Controlled open state */
176
225
  open?: boolean;
226
+ /** Callback when open state changes */
177
227
  onOpenChange?: (open: boolean) => void;
178
228
  };
229
+ /**
230
+ * Props for the SidebarMenuButton component.
231
+ * Extends button props with additional styling and behavior options.
232
+ *
233
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
234
+ *
235
+ * @example
236
+ * ```tsx
237
+ * <SidebarMenuButton
238
+ * isActive={true}
239
+ * tooltip="Dashboard"
240
+ * >
241
+ * <DashboardIcon />
242
+ * </SidebarMenuButton>
243
+ * ```
244
+ */
179
245
  type SidebarMenuButtonProps = React$1.ComponentProps<"button"> & {
246
+ /** Whether to render as a child component */
180
247
  asChild?: boolean;
248
+ /** Whether the button is currently active */
181
249
  isActive?: boolean;
250
+ /** Tooltip content or configuration */
182
251
  tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
183
252
  } & VariantProps<typeof sidebarMenuButtonVariants>;
253
+ /**
254
+ * Props for the SidebarMenuAction component.
255
+ * Used for action buttons within the sidebar menu.
256
+ *
257
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
258
+ *
259
+ * @example
260
+ * ```tsx
261
+ * <SidebarMenuAction showOnHover>
262
+ * <PlusIcon />
263
+ * </SidebarMenuAction>
264
+ * ```
265
+ */
184
266
  type SidebarMenuActionProps = React$1.ComponentProps<"button"> & {
267
+ /** Whether to render as a child component */
185
268
  asChild?: boolean;
269
+ /** Whether to only show the action on hover */
186
270
  showOnHover?: boolean;
187
271
  };
272
+ /**
273
+ * Props for the SidebarMenuSubButton component.
274
+ * Used for secondary navigation items within the sidebar.
275
+ *
276
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
277
+ *
278
+ * @example
279
+ * ```tsx
280
+ * <SidebarMenuSubButton
281
+ * size="sm"
282
+ * isActive={true}
283
+ * href="/settings/profile"
284
+ * >
285
+ * Profile Settings
286
+ * </SidebarMenuSubButton>
287
+ * ```
288
+ */
188
289
  type SidebarMenuSubButtonProps = React$1.ComponentProps<"a"> & {
290
+ /** Whether to render as a child component */
189
291
  asChild?: boolean;
292
+ /** Size variant of the sub-button */
190
293
  size?: "sm" | "md";
294
+ /** Whether the sub-button is currently active */
191
295
  isActive?: boolean;
192
296
  };
297
+ /**
298
+ * Props for the SidebarMenuSkeleton component.
299
+ * Used to show loading states in the sidebar menu.
300
+ *
301
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
302
+ *
303
+ * @example
304
+ * ```tsx
305
+ * <SidebarMenuSkeleton showIcon />
306
+ * ```
307
+ */
193
308
  type SidebarMenuSkeletonProps = React$1.ComponentProps<"div"> & {
309
+ /** Whether to show an icon skeleton */
194
310
  showIcon?: boolean;
195
311
  };
312
+ /**
313
+ * Props for the SidebarGroupLabel component.
314
+ * Used to display section labels within the sidebar.
315
+ *
316
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
317
+ *
318
+ * @example
319
+ * ```tsx
320
+ * <SidebarGroupLabel>Navigation</SidebarGroupLabel>
321
+ * ```
322
+ */
196
323
  type SidebarGroupLabelProps = React$1.ComponentProps<"div"> & {
324
+ /** Whether to render as a child component */
197
325
  asChild?: boolean;
198
326
  };
327
+ /**
328
+ * Props for the SidebarGroupAction component.
329
+ * Used for action buttons within sidebar groups.
330
+ *
331
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
332
+ *
333
+ * @example
334
+ * ```tsx
335
+ * <SidebarGroupAction>
336
+ * <SettingsIcon />
337
+ * </SidebarGroupAction>
338
+ * ```
339
+ */
199
340
  type SidebarGroupActionProps = React$1.ComponentProps<"button"> & {
341
+ /** Whether to render as a child component */
200
342
  asChild?: boolean;
201
343
  };
202
344
 
@@ -157,46 +157,188 @@ declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<Omit<React
157
157
  isActive?: boolean;
158
158
  }, "ref"> & React$1.RefAttributes<HTMLAnchorElement>>;
159
159
 
160
+ /**
161
+ * Context props for the Sidebar component that manages its state and behavior.
162
+ * This context provides the necessary state and methods to control the sidebar's
163
+ * expansion, collapse, and mobile responsiveness.
164
+ *
165
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
166
+ */
160
167
  type SidebarContextProps = {
168
+ /** Current state of the sidebar - either expanded or collapsed */
161
169
  state: "expanded" | "collapsed";
170
+ /** Whether the sidebar is currently open */
162
171
  open: boolean;
172
+ /** Function to control the sidebar's open state */
163
173
  setOpen: (open: boolean) => void;
174
+ /** Whether the mobile sidebar is currently open */
164
175
  openMobile: boolean;
176
+ /** Function to control the mobile sidebar's open state */
165
177
  setOpenMobile: (open: boolean) => void;
178
+ /** Whether the sidebar is being viewed on a mobile device */
166
179
  isMobile: boolean;
180
+ /** Function to toggle the sidebar's state */
167
181
  toggleSidebar: () => void;
168
182
  };
183
+ /**
184
+ * Props for the main Sidebar component.
185
+ * Extends the base div props and adds sidebar-specific configuration options.
186
+ *
187
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
188
+ *
189
+ * @example
190
+ * ```tsx
191
+ * <Sidebar
192
+ * side="left"
193
+ * variant="sidebar"
194
+ * collapsible="icon"
195
+ * >
196
+ * <SidebarContent>...</SidebarContent>
197
+ * </Sidebar>
198
+ * ```
199
+ */
169
200
  type SidebarProps = React$1.ComponentProps<"div"> & {
201
+ /** Position of the sidebar relative to the main content */
170
202
  side?: "left" | "right";
203
+ /** Visual style variant of the sidebar */
171
204
  variant?: "sidebar" | "floating" | "inset";
205
+ /** Collapse behavior of the sidebar */
172
206
  collapsible?: "offcanvas" | "icon" | "none";
173
207
  };
208
+ /**
209
+ * Props for the SidebarProvider component that manages sidebar state.
210
+ * Provides controlled and uncontrolled state management options.
211
+ *
212
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
213
+ *
214
+ * @example
215
+ * ```tsx
216
+ * <SidebarProvider defaultOpen={true}>
217
+ * <Sidebar>...</Sidebar>
218
+ * </SidebarProvider>
219
+ * ```
220
+ */
174
221
  type SidebarProviderProps = React$1.ComponentProps<"div"> & {
222
+ /** Initial open state for uncontrolled usage */
175
223
  defaultOpen?: boolean;
224
+ /** Controlled open state */
176
225
  open?: boolean;
226
+ /** Callback when open state changes */
177
227
  onOpenChange?: (open: boolean) => void;
178
228
  };
229
+ /**
230
+ * Props for the SidebarMenuButton component.
231
+ * Extends button props with additional styling and behavior options.
232
+ *
233
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
234
+ *
235
+ * @example
236
+ * ```tsx
237
+ * <SidebarMenuButton
238
+ * isActive={true}
239
+ * tooltip="Dashboard"
240
+ * >
241
+ * <DashboardIcon />
242
+ * </SidebarMenuButton>
243
+ * ```
244
+ */
179
245
  type SidebarMenuButtonProps = React$1.ComponentProps<"button"> & {
246
+ /** Whether to render as a child component */
180
247
  asChild?: boolean;
248
+ /** Whether the button is currently active */
181
249
  isActive?: boolean;
250
+ /** Tooltip content or configuration */
182
251
  tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
183
252
  } & VariantProps<typeof sidebarMenuButtonVariants>;
253
+ /**
254
+ * Props for the SidebarMenuAction component.
255
+ * Used for action buttons within the sidebar menu.
256
+ *
257
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
258
+ *
259
+ * @example
260
+ * ```tsx
261
+ * <SidebarMenuAction showOnHover>
262
+ * <PlusIcon />
263
+ * </SidebarMenuAction>
264
+ * ```
265
+ */
184
266
  type SidebarMenuActionProps = React$1.ComponentProps<"button"> & {
267
+ /** Whether to render as a child component */
185
268
  asChild?: boolean;
269
+ /** Whether to only show the action on hover */
186
270
  showOnHover?: boolean;
187
271
  };
272
+ /**
273
+ * Props for the SidebarMenuSubButton component.
274
+ * Used for secondary navigation items within the sidebar.
275
+ *
276
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
277
+ *
278
+ * @example
279
+ * ```tsx
280
+ * <SidebarMenuSubButton
281
+ * size="sm"
282
+ * isActive={true}
283
+ * href="/settings/profile"
284
+ * >
285
+ * Profile Settings
286
+ * </SidebarMenuSubButton>
287
+ * ```
288
+ */
188
289
  type SidebarMenuSubButtonProps = React$1.ComponentProps<"a"> & {
290
+ /** Whether to render as a child component */
189
291
  asChild?: boolean;
292
+ /** Size variant of the sub-button */
190
293
  size?: "sm" | "md";
294
+ /** Whether the sub-button is currently active */
191
295
  isActive?: boolean;
192
296
  };
297
+ /**
298
+ * Props for the SidebarMenuSkeleton component.
299
+ * Used to show loading states in the sidebar menu.
300
+ *
301
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
302
+ *
303
+ * @example
304
+ * ```tsx
305
+ * <SidebarMenuSkeleton showIcon />
306
+ * ```
307
+ */
193
308
  type SidebarMenuSkeletonProps = React$1.ComponentProps<"div"> & {
309
+ /** Whether to show an icon skeleton */
194
310
  showIcon?: boolean;
195
311
  };
312
+ /**
313
+ * Props for the SidebarGroupLabel component.
314
+ * Used to display section labels within the sidebar.
315
+ *
316
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
317
+ *
318
+ * @example
319
+ * ```tsx
320
+ * <SidebarGroupLabel>Navigation</SidebarGroupLabel>
321
+ * ```
322
+ */
196
323
  type SidebarGroupLabelProps = React$1.ComponentProps<"div"> & {
324
+ /** Whether to render as a child component */
197
325
  asChild?: boolean;
198
326
  };
327
+ /**
328
+ * Props for the SidebarGroupAction component.
329
+ * Used for action buttons within sidebar groups.
330
+ *
331
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
332
+ *
333
+ * @example
334
+ * ```tsx
335
+ * <SidebarGroupAction>
336
+ * <SettingsIcon />
337
+ * </SidebarGroupAction>
338
+ * ```
339
+ */
199
340
  type SidebarGroupActionProps = React$1.ComponentProps<"button"> & {
341
+ /** Whether to render as a child component */
200
342
  asChild?: boolean;
201
343
  };
202
344
 
@@ -1,2 +1,2 @@
1
- export{a as Drawer,d as DrawerClose,f as DrawerContent,j as DrawerDescription,h as DrawerFooter,g as DrawerHeader,e as DrawerOverlay,c as DrawerPortal,i as DrawerTitle,b as DrawerTrigger,J as DropdownMenu,T as DropdownMenuCheckboxItem,R as DropdownMenuContent,L as DropdownMenuGroup,S as DropdownMenuItem,V as DropdownMenuLabel,M as DropdownMenuPortal,O as DropdownMenuRadioGroup,U as DropdownMenuRadioItem,W as DropdownMenuSeparator,X as DropdownMenuShortcut,N as DropdownMenuSub,Q as DropdownMenuSubContent,P as DropdownMenuSubTrigger,K as DropdownMenuTrigger,m as Sidebar,u as SidebarContent,s as SidebarFooter,v as SidebarGroup,x as SidebarGroupAction,y as SidebarGroupContent,w as SidebarGroupLabel,r as SidebarHeader,q as SidebarInput,p as SidebarInset,z as SidebarMenu,D as SidebarMenuAction,E as SidebarMenuBadge,C as SidebarMenuButton,A as SidebarMenuItem,F as SidebarMenuSkeleton,G as SidebarMenuSub,I as SidebarMenuSubButton,H as SidebarMenuSubItem,l as SidebarProvider,o as SidebarRail,t as SidebarSeparator,n as SidebarTrigger,B as sidebarMenuButtonVariants,k as useSidebar}from'./chunk-LEUTYD7G.esm.js';import'./chunk-M4S5YZ56.esm.js';import'./chunk-3HTFCAYW.esm.js';import'./chunk-EBPUGBUT.esm.js';import'./chunk-C26U3FL4.esm.js';//# sourceMappingURL=organisms.esm.js.map
1
+ export{a as Drawer,d as DrawerClose,f as DrawerContent,j as DrawerDescription,h as DrawerFooter,g as DrawerHeader,e as DrawerOverlay,c as DrawerPortal,i as DrawerTitle,b as DrawerTrigger,J as DropdownMenu,T as DropdownMenuCheckboxItem,R as DropdownMenuContent,L as DropdownMenuGroup,S as DropdownMenuItem,V as DropdownMenuLabel,M as DropdownMenuPortal,O as DropdownMenuRadioGroup,U as DropdownMenuRadioItem,W as DropdownMenuSeparator,X as DropdownMenuShortcut,N as DropdownMenuSub,Q as DropdownMenuSubContent,P as DropdownMenuSubTrigger,K as DropdownMenuTrigger,m as Sidebar,u as SidebarContent,s as SidebarFooter,v as SidebarGroup,x as SidebarGroupAction,y as SidebarGroupContent,w as SidebarGroupLabel,r as SidebarHeader,q as SidebarInput,p as SidebarInset,z as SidebarMenu,D as SidebarMenuAction,E as SidebarMenuBadge,C as SidebarMenuButton,A as SidebarMenuItem,F as SidebarMenuSkeleton,G as SidebarMenuSub,I as SidebarMenuSubButton,H as SidebarMenuSubItem,l as SidebarProvider,o as SidebarRail,t as SidebarSeparator,n as SidebarTrigger,B as sidebarMenuButtonVariants,k as useSidebar}from'./chunk-XJKHGY2A.esm.js';import'./chunk-M4S5YZ56.esm.js';import'./chunk-3HTFCAYW.esm.js';import'./chunk-EBPUGBUT.esm.js';import'./chunk-C26U3FL4.esm.js';//# sourceMappingURL=organisms.esm.js.map
2
2
  //# sourceMappingURL=organisms.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@me1a/ui",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "private": false,
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",