@me1a/ui 2.2.0 → 2.2.2
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/atoms/accordion.d.mts +94 -0
- package/dist/atoms/accordion.d.ts +94 -0
- package/dist/atoms/accordion.js +2 -0
- package/dist/atoms/accordion.js.map +1 -0
- package/dist/atoms/accordion.mjs +2 -0
- package/dist/atoms/accordion.mjs.map +1 -0
- package/dist/atoms/avatar.d.mts +34 -0
- package/dist/atoms/avatar.d.ts +34 -0
- package/dist/atoms/avatar.js +2 -0
- package/dist/atoms/avatar.js.map +1 -0
- package/dist/atoms/avatar.mjs +2 -0
- package/dist/atoms/avatar.mjs.map +1 -0
- package/dist/atoms/badge.d.mts +40 -0
- package/dist/atoms/badge.d.ts +40 -0
- package/dist/atoms/badge.js +2 -0
- package/dist/atoms/badge.js.map +1 -0
- package/dist/atoms/badge.mjs +2 -0
- package/dist/atoms/badge.mjs.map +1 -0
- package/dist/atoms/box.d.mts +50 -0
- package/dist/atoms/box.d.ts +50 -0
- package/dist/atoms/box.js +2 -0
- package/dist/atoms/box.js.map +1 -0
- package/dist/atoms/box.mjs +2 -0
- package/dist/atoms/box.mjs.map +1 -0
- package/dist/atoms/breadcrumb.d.mts +35 -0
- package/dist/atoms/breadcrumb.d.ts +35 -0
- package/dist/atoms/breadcrumb.js +2 -0
- package/dist/atoms/breadcrumb.js.map +1 -0
- package/dist/atoms/breadcrumb.mjs +2 -0
- package/dist/atoms/breadcrumb.mjs.map +1 -0
- package/dist/{tooltip-B4jzaurK.d.mts → atoms/button.d.mts} +1 -23
- package/dist/{tooltip-B4jzaurK.d.ts → atoms/button.d.ts} +1 -23
- package/dist/atoms/button.js +2 -0
- package/dist/atoms/button.js.map +1 -0
- package/dist/atoms/button.mjs +2 -0
- package/dist/atoms/button.mjs.map +1 -0
- package/dist/atoms/checkbox.d.mts +21 -0
- package/dist/atoms/checkbox.d.ts +21 -0
- package/dist/atoms/checkbox.js +2 -0
- package/dist/atoms/checkbox.js.map +1 -0
- package/dist/atoms/checkbox.mjs +2 -0
- package/dist/atoms/checkbox.mjs.map +1 -0
- package/dist/atoms/collapsible.d.mts +26 -0
- package/dist/atoms/collapsible.d.ts +26 -0
- package/dist/atoms/collapsible.js +2 -0
- package/dist/atoms/collapsible.js.map +1 -0
- package/dist/atoms/collapsible.mjs +2 -0
- package/dist/atoms/collapsible.mjs.map +1 -0
- package/dist/atoms/command.d.mts +122 -0
- package/dist/atoms/command.d.ts +122 -0
- package/dist/atoms/command.js +2 -0
- package/dist/atoms/command.js.map +1 -0
- package/dist/atoms/command.mjs +2 -0
- package/dist/atoms/command.mjs.map +1 -0
- package/dist/atoms/container.js +2 -0
- package/dist/atoms/container.js.map +1 -0
- package/dist/atoms/container.mjs +2 -0
- package/dist/atoms/container.mjs.map +1 -0
- package/dist/atoms/dialog.d.mts +35 -0
- package/dist/atoms/dialog.d.ts +35 -0
- package/dist/atoms/dialog.js +2 -0
- package/dist/atoms/dialog.js.map +1 -0
- package/dist/atoms/dialog.mjs +2 -0
- package/dist/atoms/dialog.mjs.map +1 -0
- package/dist/atoms/input.d.mts +12 -0
- package/dist/atoms/input.d.ts +12 -0
- package/dist/atoms/input.js +2 -0
- package/dist/atoms/input.js.map +1 -0
- package/dist/atoms/input.mjs +2 -0
- package/dist/atoms/input.mjs.map +1 -0
- package/dist/atoms/label.d.mts +18 -0
- package/dist/atoms/label.d.ts +18 -0
- package/dist/atoms/label.js +2 -0
- package/dist/atoms/label.js.map +1 -0
- package/dist/atoms/label.mjs +2 -0
- package/dist/atoms/label.mjs.map +1 -0
- package/dist/atoms/page-loader.d.mts +29 -0
- package/dist/atoms/page-loader.d.ts +29 -0
- package/dist/atoms/page-loader.js +2 -0
- package/dist/atoms/page-loader.js.map +1 -0
- package/dist/atoms/page-loader.mjs +2 -0
- package/dist/atoms/page-loader.mjs.map +1 -0
- package/dist/atoms/pagination.d.mts +105 -0
- package/dist/atoms/pagination.d.ts +105 -0
- package/dist/atoms/pagination.js +2 -0
- package/dist/atoms/pagination.js.map +1 -0
- package/dist/atoms/pagination.mjs +2 -0
- package/dist/atoms/pagination.mjs.map +1 -0
- package/dist/atoms/popover.d.mts +30 -0
- package/dist/atoms/popover.d.ts +30 -0
- package/dist/atoms/popover.js +2 -0
- package/dist/atoms/popover.js.map +1 -0
- package/dist/atoms/popover.mjs +2 -0
- package/dist/atoms/popover.mjs.map +1 -0
- package/dist/{checkbox-DxgDKaHx.d.mts → atoms/radio-group.d.mts} +4 -50
- package/dist/{checkbox-DxgDKaHx.d.ts → atoms/radio-group.d.ts} +4 -50
- package/dist/atoms/radio-group.js +2 -0
- package/dist/atoms/radio-group.js.map +1 -0
- package/dist/atoms/radio-group.mjs +2 -0
- package/dist/atoms/radio-group.mjs.map +1 -0
- package/dist/atoms/resizable.d.mts +53 -0
- package/dist/atoms/resizable.d.ts +53 -0
- package/dist/atoms/resizable.js +2 -0
- package/dist/atoms/resizable.js.map +1 -0
- package/dist/atoms/resizable.mjs +2 -0
- package/dist/atoms/resizable.mjs.map +1 -0
- package/dist/atoms/separator.d.mts +13 -0
- package/dist/atoms/separator.d.ts +13 -0
- package/dist/atoms/separator.js +2 -0
- package/dist/atoms/separator.js.map +1 -0
- package/dist/atoms/separator.mjs +2 -0
- package/dist/atoms/separator.mjs.map +1 -0
- package/dist/atoms/sheet.d.mts +42 -0
- package/dist/atoms/sheet.d.ts +42 -0
- package/dist/atoms/sheet.js +2 -0
- package/dist/atoms/sheet.js.map +1 -0
- package/dist/atoms/sheet.mjs +2 -0
- package/dist/atoms/sheet.mjs.map +1 -0
- package/dist/atoms/skeleton.js +2 -0
- package/dist/atoms/skeleton.js.map +1 -0
- package/dist/atoms/skeleton.mjs +2 -0
- package/dist/atoms/skeleton.mjs.map +1 -0
- package/dist/atoms/stack.d.mts +121 -0
- package/dist/atoms/stack.d.ts +121 -0
- package/dist/atoms/stack.js +2 -0
- package/dist/atoms/stack.js.map +1 -0
- package/dist/atoms/stack.mjs +2 -0
- package/dist/atoms/stack.mjs.map +1 -0
- package/dist/atoms/switch.d.mts +21 -0
- package/dist/atoms/switch.d.ts +21 -0
- package/dist/atoms/switch.js +2 -0
- package/dist/atoms/switch.js.map +1 -0
- package/dist/atoms/switch.mjs +2 -0
- package/dist/atoms/switch.mjs.map +1 -0
- package/dist/atoms/table.d.mts +53 -0
- package/dist/atoms/table.d.ts +53 -0
- package/dist/atoms/table.js +2 -0
- package/dist/atoms/table.js.map +1 -0
- package/dist/atoms/table.mjs +2 -0
- package/dist/atoms/table.mjs.map +1 -0
- package/dist/atoms/text-field.d.mts +65 -0
- package/dist/atoms/text-field.d.ts +65 -0
- package/dist/atoms/text-field.js +2 -0
- package/dist/atoms/text-field.js.map +1 -0
- package/dist/atoms/text-field.mjs +2 -0
- package/dist/atoms/text-field.mjs.map +1 -0
- package/dist/atoms/textarea.js +2 -0
- package/dist/atoms/textarea.js.map +1 -0
- package/dist/atoms/textarea.mjs +2 -0
- package/dist/atoms/textarea.mjs.map +1 -0
- package/dist/{toast-2xT7L1tJ.d.mts → atoms/toast.d.mts} +1 -1
- package/dist/{toast-2xT7L1tJ.d.ts → atoms/toast.d.ts} +1 -1
- package/dist/atoms/toast.js +2 -0
- package/dist/atoms/toast.js.map +1 -0
- package/dist/atoms/toast.mjs +2 -0
- package/dist/atoms/toast.mjs.map +1 -0
- package/dist/atoms/toaster.d.mts +26 -0
- package/dist/atoms/toaster.d.ts +26 -0
- package/dist/atoms/toaster.js +2 -0
- package/dist/atoms/toaster.js.map +1 -0
- package/dist/atoms/toaster.mjs +2 -0
- package/dist/atoms/toaster.mjs.map +1 -0
- package/dist/atoms/tooltip.d.mts +25 -0
- package/dist/atoms/tooltip.d.ts +25 -0
- package/dist/atoms/tooltip.js +2 -0
- package/dist/atoms/tooltip.js.map +1 -0
- package/dist/atoms/tooltip.mjs +2 -0
- package/dist/atoms/tooltip.mjs.map +1 -0
- package/dist/atoms/typography.d.mts +24 -0
- package/dist/atoms/typography.d.ts +24 -0
- package/dist/atoms/typography.js +2 -0
- package/dist/atoms/typography.js.map +1 -0
- package/dist/atoms/typography.mjs +2 -0
- package/dist/atoms/typography.mjs.map +1 -0
- package/dist/atoms.d.mts +213 -27
- package/dist/atoms.d.ts +213 -27
- package/dist/atoms.js +2 -0
- package/dist/atoms.js.map +1 -0
- package/dist/atoms.mjs +2 -0
- package/dist/atoms.mjs.map +1 -0
- package/dist/hooks.d.mts +10 -4
- package/dist/hooks.d.ts +10 -4
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hooks.mjs +2 -0
- package/dist/hooks.mjs.map +1 -0
- package/dist/index.d.mts +2619 -30
- package/dist/index.d.ts +2619 -30
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/molecules/card.d.mts +72 -0
- package/dist/molecules/card.d.ts +72 -0
- package/dist/molecules/card.js +2 -0
- package/dist/molecules/card.js.map +1 -0
- package/dist/molecules/card.mjs +2 -0
- package/dist/molecules/card.mjs.map +1 -0
- package/dist/molecules/navigation-menu.d.mts +103 -0
- package/dist/molecules/navigation-menu.d.ts +103 -0
- package/dist/molecules/navigation-menu.js +2 -0
- package/dist/molecules/navigation-menu.js.map +1 -0
- package/dist/molecules/navigation-menu.mjs +2 -0
- package/dist/molecules/navigation-menu.mjs.map +1 -0
- package/dist/molecules/tabs.d.mts +32 -0
- package/dist/molecules/tabs.d.ts +32 -0
- package/dist/molecules/tabs.js +2 -0
- package/dist/molecules/tabs.js.map +1 -0
- package/dist/molecules/tabs.mjs +2 -0
- package/dist/molecules/tabs.mjs.map +1 -0
- package/dist/molecules.d.mts +1 -1
- package/dist/molecules.d.ts +1 -1
- package/dist/molecules.js +2 -0
- package/dist/molecules.js.map +1 -0
- package/dist/molecules.mjs +2 -0
- package/dist/molecules.mjs.map +1 -0
- package/dist/organisms/drawer.d.mts +63 -0
- package/dist/organisms/drawer.d.ts +63 -0
- package/dist/organisms/drawer.js +2 -0
- package/dist/organisms/drawer.js.map +1 -0
- package/dist/organisms/drawer.mjs +2 -0
- package/dist/organisms/drawer.mjs.map +1 -0
- package/dist/organisms/dropdown-menu.d.mts +335 -0
- package/dist/organisms/dropdown-menu.d.ts +335 -0
- package/dist/organisms/dropdown-menu.js +2 -0
- package/dist/organisms/dropdown-menu.js.map +1 -0
- package/dist/organisms/dropdown-menu.mjs +2 -0
- package/dist/organisms/dropdown-menu.mjs.map +1 -0
- package/dist/organisms/sidebar.d.mts +328 -0
- package/dist/organisms/sidebar.d.ts +328 -0
- package/dist/organisms/sidebar.js +2 -0
- package/dist/organisms/sidebar.js.map +1 -0
- package/dist/organisms/sidebar.mjs +2 -0
- package/dist/organisms/sidebar.mjs.map +1 -0
- package/dist/organisms.d.mts +56 -12
- package/dist/organisms.d.ts +56 -12
- package/dist/organisms.js +2 -0
- package/dist/organisms.js.map +1 -0
- package/dist/organisms.mjs +2 -0
- package/dist/organisms.mjs.map +1 -0
- package/dist/rhf/form.d.mts +96 -0
- package/dist/rhf/form.d.ts +96 -0
- package/dist/rhf/form.js +2 -0
- package/dist/rhf/form.js.map +1 -0
- package/dist/rhf/form.mjs +2 -0
- package/dist/rhf/form.mjs.map +1 -0
- package/dist/rhf/rhf-checkbox.d.mts +57 -0
- package/dist/rhf/rhf-checkbox.d.ts +57 -0
- package/dist/rhf/rhf-checkbox.js +2 -0
- package/dist/rhf/rhf-checkbox.js.map +1 -0
- package/dist/rhf/rhf-checkbox.mjs +2 -0
- package/dist/rhf/rhf-checkbox.mjs.map +1 -0
- package/dist/rhf/rhf-multi-select.d.mts +84 -0
- package/dist/rhf/rhf-multi-select.d.ts +84 -0
- package/dist/rhf/rhf-multi-select.js +2 -0
- package/dist/rhf/rhf-multi-select.js.map +1 -0
- package/dist/rhf/rhf-multi-select.mjs +2 -0
- package/dist/rhf/rhf-multi-select.mjs.map +1 -0
- package/dist/rhf/rhf-radio-button-group.d.mts +73 -0
- package/dist/rhf/rhf-radio-button-group.d.ts +73 -0
- package/dist/rhf/rhf-radio-button-group.js +2 -0
- package/dist/rhf/rhf-radio-button-group.js.map +1 -0
- package/dist/rhf/rhf-radio-button-group.mjs +2 -0
- package/dist/rhf/rhf-radio-button-group.mjs.map +1 -0
- package/dist/rhf/rhf-radio-group.d.mts +103 -0
- package/dist/rhf/rhf-radio-group.d.ts +103 -0
- package/dist/rhf/rhf-radio-group.js +2 -0
- package/dist/rhf/rhf-radio-group.js.map +1 -0
- package/dist/rhf/rhf-radio-group.mjs +2 -0
- package/dist/rhf/rhf-radio-group.mjs.map +1 -0
- package/dist/rhf/rhf-select.d.mts +80 -0
- package/dist/rhf/rhf-select.d.ts +80 -0
- package/dist/rhf/rhf-select.js +2 -0
- package/dist/rhf/rhf-select.js.map +1 -0
- package/dist/rhf/rhf-select.mjs +2 -0
- package/dist/rhf/rhf-select.mjs.map +1 -0
- package/dist/rhf/rhf-switch.d.mts +57 -0
- package/dist/rhf/rhf-switch.d.ts +57 -0
- package/dist/rhf/rhf-switch.js +2 -0
- package/dist/rhf/rhf-switch.js.map +1 -0
- package/dist/rhf/rhf-switch.mjs +2 -0
- package/dist/rhf/rhf-switch.mjs.map +1 -0
- package/dist/rhf/rhf-textarea.d.mts +66 -0
- package/dist/rhf/rhf-textarea.d.ts +66 -0
- package/dist/rhf/rhf-textarea.js +2 -0
- package/dist/rhf/rhf-textarea.js.map +1 -0
- package/dist/rhf/rhf-textarea.mjs +2 -0
- package/dist/rhf/rhf-textarea.mjs.map +1 -0
- package/dist/rhf.d.mts +213 -7
- package/dist/rhf.d.ts +213 -7
- package/dist/rhf.js +2 -0
- package/dist/rhf.js.map +1 -0
- package/dist/rhf.mjs +2 -0
- package/dist/rhf.mjs.map +1 -0
- package/dist/types.js +2 -0
- package/dist/{types.cjs.js.map → types.js.map} +1 -1
- package/dist/types.mjs +2 -0
- package/dist/{types.esm.js.map → types.mjs.map} +1 -1
- package/dist/{chunk-SL2ZUI4G.cjs.js → utils.js} +2 -2
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +2 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +241 -15
- package/dist/atoms.cjs.js +0 -2
- package/dist/atoms.cjs.js.map +0 -1
- package/dist/atoms.esm.js +0 -2
- package/dist/atoms.esm.js.map +0 -1
- package/dist/chunk-23T2PH5G.esm.js +0 -2
- package/dist/chunk-23T2PH5G.esm.js.map +0 -1
- package/dist/chunk-2QG3QTSW.cjs.js +0 -2
- package/dist/chunk-2QG3QTSW.cjs.js.map +0 -1
- package/dist/chunk-C26U3FL4.esm.js +0 -2
- package/dist/chunk-C26U3FL4.esm.js.map +0 -1
- package/dist/chunk-DTM5LZHM.cjs.js +0 -2
- package/dist/chunk-DTM5LZHM.cjs.js.map +0 -1
- package/dist/chunk-HW32JE75.cjs.js +0 -2
- package/dist/chunk-HW32JE75.cjs.js.map +0 -1
- package/dist/chunk-J5A6PILI.cjs.js +0 -2
- package/dist/chunk-J5A6PILI.cjs.js.map +0 -1
- package/dist/chunk-JIRS6MWF.cjs.js +0 -2
- package/dist/chunk-JIRS6MWF.cjs.js.map +0 -1
- package/dist/chunk-JKTYFZ5M.esm.js +0 -2
- package/dist/chunk-JKTYFZ5M.esm.js.map +0 -1
- package/dist/chunk-JUZG25DH.esm.js +0 -2
- package/dist/chunk-JUZG25DH.esm.js.map +0 -1
- package/dist/chunk-KOYJODOP.cjs.js +0 -2
- package/dist/chunk-KOYJODOP.cjs.js.map +0 -1
- package/dist/chunk-M4S5YZ56.esm.js +0 -2
- package/dist/chunk-M4S5YZ56.esm.js.map +0 -1
- package/dist/chunk-MOYOCJW6.esm.js +0 -2
- package/dist/chunk-MOYOCJW6.esm.js.map +0 -1
- package/dist/chunk-MVWMLXLL.cjs.js +0 -2
- package/dist/chunk-MVWMLXLL.cjs.js.map +0 -1
- package/dist/chunk-Q76IMLQ3.esm.js +0 -2
- package/dist/chunk-Q76IMLQ3.esm.js.map +0 -1
- package/dist/chunk-SL2ZUI4G.cjs.js.map +0 -1
- package/dist/chunk-STRDPP3B.esm.js +0 -2
- package/dist/chunk-STRDPP3B.esm.js.map +0 -1
- package/dist/chunk-U4NMIMU7.esm.js +0 -2
- package/dist/chunk-U4NMIMU7.esm.js.map +0 -1
- package/dist/chunk-UK47BFA3.cjs.js +0 -2
- package/dist/chunk-UK47BFA3.cjs.js.map +0 -1
- package/dist/chunk-WJNYKJP6.cjs.js +0 -2
- package/dist/chunk-WJNYKJP6.cjs.js.map +0 -1
- package/dist/chunk-YEZB7AOJ.esm.js +0 -2
- package/dist/chunk-YEZB7AOJ.esm.js.map +0 -1
- package/dist/hooks.cjs.js +0 -2
- package/dist/hooks.cjs.js.map +0 -1
- package/dist/hooks.esm.js +0 -2
- package/dist/hooks.esm.js.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/molecules.cjs.js +0 -2
- package/dist/molecules.cjs.js.map +0 -1
- package/dist/molecules.esm.js +0 -2
- package/dist/molecules.esm.js.map +0 -1
- package/dist/organisms.cjs.js +0 -2
- package/dist/organisms.cjs.js.map +0 -1
- package/dist/organisms.esm.js +0 -2
- package/dist/organisms.esm.js.map +0 -1
- package/dist/rhf.cjs.js +0 -2
- package/dist/rhf.cjs.js.map +0 -1
- package/dist/rhf.esm.js +0 -2
- package/dist/rhf.esm.js.map +0 -1
- package/dist/types.cjs.js +0 -2
- package/dist/types.d.mts +0 -2
- package/dist/types.d.ts +0 -2
- package/dist/types.esm.js +0 -2
- package/dist/utils.cjs.js +0 -2
- package/dist/utils.cjs.js.map +0 -1
- package/dist/utils.d.mts +0 -5
- package/dist/utils.d.ts +0 -5
- package/dist/utils.esm.js +0 -2
- package/dist/utils.esm.js.map +0 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as _radix_ui_react_separator from '@radix-ui/react-separator';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Props interface for the Button component.
|
|
9
|
+
* Extends the native button HTML attributes and adds support for variants and asChild prop.
|
|
10
|
+
* Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.
|
|
11
|
+
*
|
|
12
|
+
* @interface ButtonProps
|
|
13
|
+
* @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}
|
|
14
|
+
* @extends {VariantProps<typeof buttonVariants>}
|
|
15
|
+
*
|
|
16
|
+
* @property {boolean} [asChild] - When true, renders the button as a child component using Radix UI's Slot.
|
|
17
|
+
* @property {ButtonVariant} [variant] - The visual style variant of the button.
|
|
18
|
+
* @property {ButtonSize} [size] - The size variant of the button.
|
|
19
|
+
* @property {string} [className] - Additional CSS classes to apply to the button.
|
|
20
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the button text.
|
|
21
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the button text.
|
|
22
|
+
* @property {boolean} [loading] - Whether the button is in a loading state.
|
|
23
|
+
* @property {string} [type] - The type of button (button, submit, reset). Defaults to "button".
|
|
24
|
+
* @property {string} [aria-label] - Accessible label for the button. Falls back to button text if not provided.
|
|
25
|
+
*/
|
|
26
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
startIcon?: React.ReactNode;
|
|
29
|
+
endIcon?: React.ReactNode;
|
|
30
|
+
loading?: boolean;
|
|
31
|
+
type?: "button" | "submit" | "reset";
|
|
32
|
+
"aria-label"?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Button variant styles using class-variance-authority.
|
|
37
|
+
* Defines the visual styles for different button variants and sizes.
|
|
38
|
+
* Follows WCAG 2.1 Level AA guidelines for accessibility.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <Button variant="primary" size="lg">Click me</Button>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare const buttonVariants: (props?: ({
|
|
46
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
47
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
48
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
|
+
|
|
50
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
|
|
52
|
+
type SidebarContextProps$1 = {
|
|
53
|
+
state: "expanded" | "collapsed";
|
|
54
|
+
open: boolean;
|
|
55
|
+
setOpen: (open: boolean) => void;
|
|
56
|
+
openMobile: boolean;
|
|
57
|
+
setOpenMobile: (open: boolean) => void;
|
|
58
|
+
isMobile: boolean;
|
|
59
|
+
toggleSidebar: () => void;
|
|
60
|
+
};
|
|
61
|
+
declare function useSidebar(): SidebarContextProps$1;
|
|
62
|
+
declare const SidebarProvider: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
63
|
+
defaultOpen?: boolean;
|
|
64
|
+
open?: boolean;
|
|
65
|
+
onOpenChange?: (open: boolean) => void;
|
|
66
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
/**
|
|
68
|
+
* A flexible sidebar component that supports various layouts and configurations.
|
|
69
|
+
* The sidebar can be positioned on either side of the screen and supports different
|
|
70
|
+
* visual styles and collapse behaviors.
|
|
71
|
+
*
|
|
72
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* <Sidebar>
|
|
77
|
+
* <SidebarHeader>
|
|
78
|
+
* <SidebarTitle>Dashboard</SidebarTitle>
|
|
79
|
+
* </SidebarHeader>
|
|
80
|
+
* <SidebarContent>
|
|
81
|
+
* <SidebarMenu>
|
|
82
|
+
* <SidebarMenuItem icon={<HomeIcon />}>Home</SidebarMenuItem>
|
|
83
|
+
* <SidebarMenuItem icon={<SettingsIcon />}>Settings</SidebarMenuItem>
|
|
84
|
+
* </SidebarMenu>
|
|
85
|
+
* </SidebarContent>
|
|
86
|
+
* <SidebarFooter>
|
|
87
|
+
* <SidebarTrigger />
|
|
88
|
+
* </SidebarFooter>
|
|
89
|
+
* </Sidebar>
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
93
|
+
side?: "left" | "right";
|
|
94
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
95
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
96
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
98
|
+
declare const SidebarRail: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
99
|
+
declare const SidebarInset: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
declare const SidebarInput: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
101
|
+
declare const SidebarHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
declare const SidebarFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_separator.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
declare const SidebarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
declare const SidebarGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
declare const SidebarGroupLabel: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
107
|
+
asChild?: boolean;
|
|
108
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
109
|
+
declare const SidebarGroupAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
110
|
+
asChild?: boolean;
|
|
111
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
112
|
+
declare const SidebarGroupContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
declare const SidebarMenu: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
114
|
+
declare const SidebarMenuItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
115
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
116
|
+
variant?: "default" | "outline" | null | undefined;
|
|
117
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
118
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
119
|
+
declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
120
|
+
asChild?: boolean;
|
|
121
|
+
isActive?: boolean;
|
|
122
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
123
|
+
} & VariantProps<(props?: ({
|
|
124
|
+
variant?: "default" | "outline" | null | undefined;
|
|
125
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
126
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
127
|
+
declare const SidebarMenuAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
128
|
+
asChild?: boolean;
|
|
129
|
+
showOnHover?: boolean;
|
|
130
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
131
|
+
declare const SidebarMenuBadge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
declare const SidebarMenuSkeleton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
133
|
+
showIcon?: boolean;
|
|
134
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
declare const SidebarMenuSub: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
136
|
+
declare const SidebarMenuSubItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
137
|
+
declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
138
|
+
asChild?: boolean;
|
|
139
|
+
size?: "sm" | "md";
|
|
140
|
+
isActive?: boolean;
|
|
141
|
+
}, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Context props for the Sidebar component that manages its state and behavior.
|
|
145
|
+
* This context provides the necessary state and methods to control the sidebar's
|
|
146
|
+
* expansion, collapse, and mobile responsiveness.
|
|
147
|
+
*
|
|
148
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
149
|
+
*/
|
|
150
|
+
type SidebarContextProps = {
|
|
151
|
+
/** Current state of the sidebar - either expanded or collapsed */
|
|
152
|
+
state: "expanded" | "collapsed";
|
|
153
|
+
/** Whether the sidebar is currently open */
|
|
154
|
+
open: boolean;
|
|
155
|
+
/** Function to control the sidebar's open state */
|
|
156
|
+
setOpen: (open: boolean) => void;
|
|
157
|
+
/** Whether the mobile sidebar is currently open */
|
|
158
|
+
openMobile: boolean;
|
|
159
|
+
/** Function to control the mobile sidebar's open state */
|
|
160
|
+
setOpenMobile: (open: boolean) => void;
|
|
161
|
+
/** Whether the sidebar is being viewed on a mobile device */
|
|
162
|
+
isMobile: boolean;
|
|
163
|
+
/** Function to toggle the sidebar's state */
|
|
164
|
+
toggleSidebar: () => void;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Props for the main Sidebar component.
|
|
168
|
+
* Extends the base div props and adds sidebar-specific configuration options.
|
|
169
|
+
*
|
|
170
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```tsx
|
|
174
|
+
* <Sidebar
|
|
175
|
+
* side="left"
|
|
176
|
+
* variant="sidebar"
|
|
177
|
+
* collapsible="icon"
|
|
178
|
+
* >
|
|
179
|
+
* <SidebarContent>...</SidebarContent>
|
|
180
|
+
* </Sidebar>
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
type SidebarProps = React.ComponentProps<"div"> & {
|
|
184
|
+
/** Position of the sidebar relative to the main content */
|
|
185
|
+
side?: "left" | "right";
|
|
186
|
+
/** Visual style variant of the sidebar */
|
|
187
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
188
|
+
/** Collapse behavior of the sidebar */
|
|
189
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Props for the SidebarProvider component that manages sidebar state.
|
|
193
|
+
* Provides controlled and uncontrolled state management options.
|
|
194
|
+
*
|
|
195
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```tsx
|
|
199
|
+
* <SidebarProvider defaultOpen={true}>
|
|
200
|
+
* <Sidebar>...</Sidebar>
|
|
201
|
+
* </SidebarProvider>
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
type SidebarProviderProps = React.ComponentProps<"div"> & {
|
|
205
|
+
/** Initial open state for uncontrolled usage */
|
|
206
|
+
defaultOpen?: boolean;
|
|
207
|
+
/** Controlled open state */
|
|
208
|
+
open?: boolean;
|
|
209
|
+
/** Callback when open state changes */
|
|
210
|
+
onOpenChange?: (open: boolean) => void;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Props for the SidebarMenuButton component.
|
|
214
|
+
* Extends button props with additional styling and behavior options.
|
|
215
|
+
*
|
|
216
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```tsx
|
|
220
|
+
* <SidebarMenuButton
|
|
221
|
+
* isActive={true}
|
|
222
|
+
* tooltip="Dashboard"
|
|
223
|
+
* >
|
|
224
|
+
* <DashboardIcon />
|
|
225
|
+
* </SidebarMenuButton>
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
type SidebarMenuButtonProps = React.ComponentProps<"button"> & {
|
|
229
|
+
/** Whether to render as a child component */
|
|
230
|
+
asChild?: boolean;
|
|
231
|
+
/** Whether the button is currently active */
|
|
232
|
+
isActive?: boolean;
|
|
233
|
+
/** Tooltip content or configuration */
|
|
234
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
235
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>;
|
|
236
|
+
/**
|
|
237
|
+
* Props for the SidebarMenuAction component.
|
|
238
|
+
* Used for action buttons within the sidebar menu.
|
|
239
|
+
*
|
|
240
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```tsx
|
|
244
|
+
* <SidebarMenuAction showOnHover>
|
|
245
|
+
* <PlusIcon />
|
|
246
|
+
* </SidebarMenuAction>
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
type SidebarMenuActionProps = React.ComponentProps<"button"> & {
|
|
250
|
+
/** Whether to render as a child component */
|
|
251
|
+
asChild?: boolean;
|
|
252
|
+
/** Whether to only show the action on hover */
|
|
253
|
+
showOnHover?: boolean;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Props for the SidebarMenuSubButton component.
|
|
257
|
+
* Used for secondary navigation items within the sidebar.
|
|
258
|
+
*
|
|
259
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```tsx
|
|
263
|
+
* <SidebarMenuSubButton
|
|
264
|
+
* size="sm"
|
|
265
|
+
* isActive={true}
|
|
266
|
+
* href="/settings/profile"
|
|
267
|
+
* >
|
|
268
|
+
* Profile Settings
|
|
269
|
+
* </SidebarMenuSubButton>
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
type SidebarMenuSubButtonProps = React.ComponentProps<"a"> & {
|
|
273
|
+
/** Whether to render as a child component */
|
|
274
|
+
asChild?: boolean;
|
|
275
|
+
/** Size variant of the sub-button */
|
|
276
|
+
size?: "sm" | "md";
|
|
277
|
+
/** Whether the sub-button is currently active */
|
|
278
|
+
isActive?: boolean;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Props for the SidebarMenuSkeleton component.
|
|
282
|
+
* Used to show loading states in the sidebar menu.
|
|
283
|
+
*
|
|
284
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```tsx
|
|
288
|
+
* <SidebarMenuSkeleton showIcon />
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
type SidebarMenuSkeletonProps = React.ComponentProps<"div"> & {
|
|
292
|
+
/** Whether to show an icon skeleton */
|
|
293
|
+
showIcon?: boolean;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Props for the SidebarGroupLabel component.
|
|
297
|
+
* Used to display section labels within the sidebar.
|
|
298
|
+
*
|
|
299
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* ```tsx
|
|
303
|
+
* <SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
type SidebarGroupLabelProps = React.ComponentProps<"div"> & {
|
|
307
|
+
/** Whether to render as a child component */
|
|
308
|
+
asChild?: boolean;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* Props for the SidebarGroupAction component.
|
|
312
|
+
* Used for action buttons within sidebar groups.
|
|
313
|
+
*
|
|
314
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```tsx
|
|
318
|
+
* <SidebarGroupAction>
|
|
319
|
+
* <SettingsIcon />
|
|
320
|
+
* </SidebarGroupAction>
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
type SidebarGroupActionProps = React.ComponentProps<"button"> & {
|
|
324
|
+
/** Whether to render as a child component */
|
|
325
|
+
asChild?: boolean;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export { Sidebar, SidebarContent, type SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var r=require('react'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),I=require('@radix-ui/react-separator'),d=require('@radix-ui/react-dialog'),m=require('@radix-ui/react-tooltip');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);var I__namespace=/*#__PURE__*/_interopNamespace(I);var d__namespace=/*#__PURE__*/_interopNamespace(d);var m__namespace=/*#__PURE__*/_interopNamespace(m);var k=768;function $(){let[t,e]=r__namespace.useState(void 0);return r__namespace.useEffect(()=>{let a=window.matchMedia(`(max-width: ${k-1}px)`),n=()=>{e(window.innerWidth<k);};return a.addEventListener("change",n),e(window.innerWidth<k),()=>a.removeEventListener("change",n)},[]),!!t}function o(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var F=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),D=r__namespace.forwardRef(({className:t,variant:e,size:a,asChild:n=false,startIcon:s,endIcon:l,loading:p=false,disabled:S,children:c,type:g="button","aria-label":f,...v},T)=>{let h=n?reactSlot.Slot:"button",u=S||p,w=f||(typeof c=="string"?c:void 0),M=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),!u&&v.onClick&&v.onClick(y));};return n?jsxRuntime.jsx(h,{className:o(F({variant:e,size:a,className:t})),ref:T,disabled:u,type:g,"aria-label":w,"aria-disabled":u,...v,children:c}):jsxRuntime.jsxs(h,{className:o(F({variant:e,size:a,className:t})),ref:T,disabled:u,type:g,"aria-label":w,"aria-disabled":u,onKeyDown:M,...v,children:[p&&jsxRuntime.jsx(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!p&&s&&jsxRuntime.jsx("span",{className:"mr-2","aria-hidden":"true",children:s}),c,!p&&l&&jsxRuntime.jsx("span",{className:"ml-2","aria-hidden":"true",children:l})]})});D.displayName="Button";var _=r__namespace.forwardRef(({className:t,type:e,...a},n)=>jsxRuntime.jsx("input",{type:e,className:o("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...a}));_.displayName="Input";var B=r__namespace.forwardRef(({className:t,orientation:e="horizontal",decorative:a=true,...n},s)=>jsxRuntime.jsx(I__namespace.Root,{ref:s,decorative:a,orientation:e,className:o("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));B.displayName=I__namespace.Root.displayName;var Y=d__namespace.Root;var fe=d__namespace.Portal,J=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(d__namespace.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:a}));J.displayName=d__namespace.Overlay.displayName;var ue=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),O=r__namespace.forwardRef(({side:t="right",className:e,children:a,...n},s)=>jsxRuntime.jsxs(fe,{children:[jsxRuntime.jsx(J,{}),jsxRuntime.jsxs(d__namespace.Content,{ref:s,className:o(ue({side:t}),e),...n,children:[jsxRuntime.jsxs(d__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));O.displayName=d__namespace.Content.displayName;var A=({className:t,...e})=>jsxRuntime.jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",t),...e});A.displayName="SheetHeader";var V=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(d__namespace.Title,{ref:a,className:o("text-lg font-semibold text-foreground",t),...e}));V.displayName=d__namespace.Title.displayName;var K=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(d__namespace.Description,{ref:a,className:o("text-sm text-muted-foreground",t),...e}));K.displayName=d__namespace.Description.displayName;function W({className:t,...e}){return jsxRuntime.jsx("div",{className:o("animate-pulse rounded-md bg-primary/10",t),...e})}var j=m__namespace.Provider,ee=m__namespace.Root,te=m__namespace.Trigger,G=r__namespace.forwardRef(({className:t,sideOffset:e=4,...a},n)=>jsxRuntime.jsx(m__namespace.Portal,{children:jsxRuntime.jsx(m__namespace.Content,{ref:n,sideOffset:e,className:o("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...a})}));G.displayName=m__namespace.Content.displayName;var Re="sidebar_state",xe=60*60*24*7,Se="16rem",we="18rem",ye="3rem",Ce="b",ae=r__namespace.createContext(null);function H(){let t=r__namespace.useContext(ae);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}var Pe=r__namespace.forwardRef(({defaultOpen:t=true,open:e,onOpenChange:a,className:n,style:s,children:l,...p},S)=>{let c=$(),[g,f]=r__namespace.useState(false),[v,T]=r__namespace.useState(t),h=e??v,u=r__namespace.useCallback(b=>{let R=typeof b=="function"?b(h):b;a?a(R):T(R),document.cookie=`${Re}=${R}; path=/; max-age=${xe}`;},[a,h]),w=r__namespace.useCallback(()=>c?f(b=>!b):u(b=>!b),[c,u,f]);r__namespace.useEffect(()=>{let b=R=>{R.key===Ce&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),w());};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[w]);let M=h?"expanded":"collapsed",y=r__namespace.useMemo(()=>({state:M,open:h,setOpen:u,isMobile:c,openMobile:g,setOpenMobile:f,toggleSidebar:w}),[M,h,u,c,g,f,w]);return jsxRuntime.jsx(ae.Provider,{value:y,children:jsxRuntime.jsx(j,{delayDuration:0,children:jsxRuntime.jsx("div",{style:{"--sidebar-width":Se,"--sidebar-width-icon":ye,...s},className:o("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar",n),ref:S,...p,children:l})})})});Pe.displayName="SidebarProvider";var Ne=r__namespace.forwardRef(({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:n,children:s,...l},p)=>{let{isMobile:S,state:c,openMobile:g,setOpenMobile:f}=H();return a==="none"?jsxRuntime.jsx("div",{className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",n),ref:p,...l,children:s}):S?jsxRuntime.jsx(Y,{open:g,onOpenChange:f,...l,children:jsxRuntime.jsxs(O,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":we},side:t,children:[jsxRuntime.jsxs(A,{className:"sr-only",children:[jsxRuntime.jsx(V,{children:"Sidebar"}),jsxRuntime.jsx(K,{children:"Displays the mobile sidebar."})]}),jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):jsxRuntime.jsxs("div",{ref:p,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?a:"","data-variant":e,"data-side":t,children:[jsxRuntime.jsx("div",{className:o("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsxRuntime.jsx("div",{className:o("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...l,children:jsxRuntime.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});Ne.displayName="Sidebar";var Te=r__namespace.forwardRef(({className:t,onClick:e,...a},n)=>{let{toggleSidebar:s}=H();return jsxRuntime.jsxs(D,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:o("h-7 w-7",t),onClick:l=>{e?.(l),s();},...a,children:[jsxRuntime.jsx(lucideReact.PanelLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Te.displayName="SidebarTrigger";var Me=r__namespace.forwardRef(({className:t,...e},a)=>{let{toggleSidebar:n}=H();return jsxRuntime.jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...e})});Me.displayName="SidebarRail";var Ee=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("main",{ref:a,className:o("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",t),...e}));Ee.displayName="SidebarInset";var Le=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(_,{ref:a,"data-sidebar":"input",className:o("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...e}));Le.displayName="SidebarInput";var He=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",t),...e}));He.displayName="SidebarHeader";var ke=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",t),...e}));ke.displayName="SidebarFooter";var De=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(B,{ref:a,"data-sidebar":"separator",className:o("mx-2 w-auto bg-sidebar-border",t),...e}));De.displayName="SidebarSeparator";var _e=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...e}));_e.displayName="SidebarContent";var Ie=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",t),...e}));Ie.displayName="SidebarGroup";var Be=r__namespace.forwardRef(({className:t,asChild:e=false,...a},n)=>jsxRuntime.jsx(e?reactSlot.Slot:"div",{ref:n,"data-sidebar":"group-label",className:o("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...a}));Be.displayName="SidebarGroupLabel";var ze=r__namespace.forwardRef(({className:t,asChild:e=false,...a},n)=>jsxRuntime.jsx(e?reactSlot.Slot:"button",{ref:n,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...a}));ze.displayName="SidebarGroupAction";var Oe=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"group-content",className:o("w-full text-sm",t),...e}));Oe.displayName="SidebarGroupContent";var Ae=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("ul",{ref:a,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",t),...e}));Ae.displayName="SidebarMenu";var Ve=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("li",{ref:a,"data-sidebar":"menu-item",className:o("group/menu-item relative",t),...e}));Ve.displayName="SidebarMenuItem";var Ke=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),We=r__namespace.forwardRef(({asChild:t=false,isActive:e=false,variant:a="default",size:n="default",tooltip:s,className:l,...p},S)=>{let c=t?reactSlot.Slot:"button",{isMobile:g,state:f}=H(),v=jsxRuntime.jsx(c,{ref:S,"data-sidebar":"menu-button","data-size":n,"data-active":e,className:o(Ke({variant:a,size:n}),l),...p});return s?(typeof s=="string"&&(s={children:s}),jsxRuntime.jsxs(ee,{children:[jsxRuntime.jsx(te,{asChild:true,children:v}),jsxRuntime.jsx(G,{side:"right",align:"center",hidden:f!=="collapsed"||g,...s})]})):v});We.displayName="SidebarMenuButton";var Ge=r__namespace.forwardRef(({className:t,asChild:e=false,showOnHover:a=false,...n},s)=>jsxRuntime.jsx(e?reactSlot.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",t),...n}));Ge.displayName="SidebarMenuAction";var $e=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("div",{ref:a,"data-sidebar":"menu-badge",className:o("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...e}));$e.displayName="SidebarMenuBadge";var Fe=r__namespace.forwardRef(({className:t,showIcon:e=false,...a},n)=>{let s=r__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxRuntime.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:o("flex h-8 items-center gap-2 rounded-md px-2",t),...a,children:[e&&jsxRuntime.jsx(W,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsxRuntime.jsx(W,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Fe.displayName="SidebarMenuSkeleton";var qe=r__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...e}));qe.displayName="SidebarMenuSub";var Ue=r__namespace.forwardRef(({...t},e)=>jsxRuntime.jsx("li",{ref:e,...t}));Ue.displayName="SidebarMenuSubItem";var Xe=r__namespace.forwardRef(({asChild:t=false,size:e="md",isActive:a,className:n,...s},l)=>jsxRuntime.jsx(t?reactSlot.Slot:"a",{ref:l,"data-sidebar":"menu-sub-button","data-size":e,"data-active":a,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...s}));Xe.displayName="SidebarMenuSubButton";exports.Sidebar=Ne;exports.SidebarContent=_e;exports.SidebarFooter=ke;exports.SidebarGroup=Ie;exports.SidebarGroupAction=ze;exports.SidebarGroupContent=Oe;exports.SidebarGroupLabel=Be;exports.SidebarHeader=He;exports.SidebarInput=Le;exports.SidebarInset=Ee;exports.SidebarMenu=Ae;exports.SidebarMenuAction=Ge;exports.SidebarMenuBadge=$e;exports.SidebarMenuButton=We;exports.SidebarMenuItem=Ve;exports.SidebarMenuSkeleton=Fe;exports.SidebarMenuSub=qe;exports.SidebarMenuSubButton=Xe;exports.SidebarMenuSubItem=Ue;exports.SidebarProvider=Pe;exports.SidebarRail=Me;exports.SidebarSeparator=De;exports.SidebarTrigger=Te;exports.sidebarMenuButtonVariants=Ke;exports.useSidebar=H;//# sourceMappingURL=sidebar.js.map
|
|
2
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-mobile.tsx","../../src/utils/cn.ts","../../src/components/atoms/button/button.tsx","../../src/components/atoms/input/input.tsx","../../src/components/atoms/separator/separator.tsx","../../src/components/atoms/sheet/sheet.tsx","../../src/components/atoms/skeleton/skeleton.tsx","../../src/components/atoms/tooltip/tooltip.tsx","../../src/components/organisms/sidebar/sidebar.tsx"],"names":["MOBILE_BREAKPOINT","useIsMobile","isMobile","setIsMobile","E","mql","onChange","cn","inputs","twMerge","clsx","buttonVariants","cva","Button","q","className","variant","size","asChild","startIcon","endIcon","loading","disabled","children","type","ariaLabel","props","ref","Comp","Slot","isDisabled","buttonAriaLabel","handleKeyDown","event","jsx","jsxs","Loader2","Input","U","Separator","X","orientation","decorative","I","Sheet","d","SheetPortal","SheetOverlay","P","sheetVariants","SheetContent","side","SheetHeader","SheetTitle","SheetDescription","Skeleton","TooltipProvider","m","Tooltip","TooltipTrigger","TooltipContent","Z","sideOffset","SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","r","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","style","openMobile","setOpenMobile","_open","_setOpen","open","setOpen","value","openState","toggleSidebar","state","contextValue","Sidebar","collapsible","SidebarTrigger","onClick","PanelLeft","SidebarRail","SidebarInset","SidebarInput","SidebarHeader","SidebarFooter","SidebarSeparator","SidebarContent","SidebarGroup","SidebarGroupLabel","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","SidebarMenuButton","isActive","tooltip","button","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton"],"mappings":"i4BAEA,IAAMA,CAAoB,CAAA,GAAA,CAEnB,SAASC,CAAAA,EAAc,CAC5B,GAAM,CAACC,CAAAA,CAAUC,CAAW,CAAA,CAAUC,YAA8B,CAAA,QAAA,CAAA,MAAS,CAE7E,CAAA,OAAMA,YAAU,CAAA,SAAA,CAAA,IAAM,CACpB,IAAMC,CAAM,CAAA,MAAA,CAAO,UAAW,CAAA,CAAA,YAAA,EAAeL,CAAoB,CAAA,CAAC,CAAK,GAAA,CAAA,CAAA,CACjEM,CAAW,CAAA,IAAM,CACrBH,CAAAA,CAAY,MAAO,CAAA,UAAA,CAAaH,CAAiB,EACnD,CACA,CAAA,OAAAK,CAAI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AA9F,CAAAA,CAAAA,CAAW,GAAGW,CAAM,CAAGC,CAAAA,CAAAA,GAIhEO,cAHWhB,CAAAA,CAAAA,CAAUW,cAAO,CAAA,GAAA,CAG3B,CACC,GAAA,CAAKF,CACL,CAAA,cAAA,CAAa,iBACb,CAAA,WAAA,CAAWV,CACX,CAAA,aAAA,CAAa4F,CACb,CAAA,SAAA,CAAWtG,CACT,CAAA,6eAAA,CACA,wFACAU,CAAAA,CAAAA,GAAS,IAAQ,EAAA,SAAA,CACjBA,CAAS,GAAA,IAAA,EAAQ,SACjB,CAAA,sCAAA,CACAF,CACF,CAAA,CACC,GAAGW,CAAAA,CACN,CAEH,EACD8F,GAAqB,WAAc,CAAA,sBAAA","file":"sidebar.js","sourcesContent":["import * as React from \"react\"\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener(\"change\", onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener(\"change\", onChange)\n }, [])\n\n return !!isMobile\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { Loader2 } from \"lucide-react\"\nimport { ButtonProps } from \"./button.types\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n * Follows WCAG 2.1 Level AA guidelines for accessibility.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n } as const,\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n } as const\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n * Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-button--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n type = \"button\",\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n const buttonAriaLabel = ariaLabel || (typeof children === \"string\" ? children : undefined)\n\n // Handle keyboard interaction\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n if (!isDisabled && props.onClick) {\n props.onClick(event as unknown as React.MouseEvent<HTMLButtonElement>)\n }\n }\n }\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {loading && (\n <Loader2\n className=\"mr-2 h-4 w-4 animate-spin\"\n role=\"status\"\n aria-label=\"Loading\"\n aria-hidden=\"true\"\n />\n )}\n {!loading && startIcon && (\n <span className=\"mr-2\" aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {children}\n {!loading && endIcon && (\n <span className=\"ml-2\" aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * Separator component for creating horizontal or vertical dividers.\n * Built on top of Radix UI's Separator primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-separator--docs\n *\n */\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * Sheet component for creating accessible sheets with overlay and content.\n * Built on top of Radix UI's Sheet primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-sheet--docs\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger>Open Sheet</SheetTrigger>\n * <SheetContent>Sheet Content</SheetContent>\n * </Sheet>\n */\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\"\n }\n },\n defaultVariants: {\n side: \"right\"\n }\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription\n}\n","import { cn } from \"@/utils/index\"\n\n/**\n * Skeleton component for creating a loading state.\n * Built on top of shadcn/ui's Skeleton component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-skeleton--docs\n *\n * @example\n * ```tsx\n * <Skeleton className=\"w-10 h-10\" />\n * ```\n */\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn(\"animate-pulse rounded-md bg-primary/10\", className)} {...props} />\n}\n\nexport { Skeleton }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * TooltipProvider component for creating accessible tooltips.\n * Built on top of Radix UI's Tooltip primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { VariantProps, cva } from \"class-variance-authority\"\nimport { PanelLeft } from \"lucide-react\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { cn } from \"@/utils/index\"\nimport { Button } from \"@/components/atoms/button\"\nimport { Input } from \"@/components/atoms/input\"\nimport { Separator } from \"@/components/atoms/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle\n} from \"@/components/atoms/sheet\"\nimport { Skeleton } from \"@/components/atoms/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger\n} from \"@/components/atoms/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style\n } as React.CSSProperties\n }\n className={cn(\"group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar\", className)}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\n/**\n * A flexible sidebar component that supports various layouts and configurations.\n * The sidebar can be positioned on either side of the screen and supports different\n * visual styles and collapse behaviors.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs\n *\n * @example\n * ```tsx\n * <Sidebar>\n * <SidebarHeader>\n * <SidebarTitle>Dashboard</SidebarTitle>\n * </SidebarHeader>\n * <SidebarContent>\n * <SidebarMenu>\n * <SidebarMenuItem icon={<HomeIcon />}>Home</SidebarMenuItem>\n * <SidebarMenuItem icon={<SettingsIcon />}>Settings</SidebarMenuItem>\n * </SidebarMenu>\n * </SidebarContent>\n * <SidebarFooter>\n * <SidebarTrigger />\n * </SidebarFooter>\n * </Sidebar>\n * ```\n */\nconst Sidebar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n className={cn(\n \"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n \"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon]\"\n )}\n />\n <div\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]\"\n : \"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"h-7 w-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeft />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<HTMLButtonElement, React.ComponentProps<\"button\">>(\n ({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n // eslint-disable-next-line react/button-has-type\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n }\n)\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n }\n)\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n }\n)\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n)\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<\"ul\">>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n )\n)\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<\"li\">>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n)\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nexport const sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\"\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n)\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<HTMLUListElement, React.ComponentProps<\"ul\">>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n)\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.ComponentProps<\"li\">>(\n ({ ...props }, ref) => <li ref={ref} {...props} />\n)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as r from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {Loader2,X,PanelLeft}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';import*as I from'@radix-ui/react-separator';import*as d from'@radix-ui/react-dialog';import*as m from'@radix-ui/react-tooltip';var k=768;function $(){let[t,e]=r.useState(void 0);return r.useEffect(()=>{let a=window.matchMedia(`(max-width: ${k-1}px)`),n=()=>{e(window.innerWidth<k);};return a.addEventListener("change",n),e(window.innerWidth<k),()=>a.removeEventListener("change",n)},[]),!!t}function o(...t){return twMerge(clsx(t))}var F=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),D=r.forwardRef(({className:t,variant:e,size:a,asChild:n=false,startIcon:s,endIcon:l,loading:p=false,disabled:S,children:c,type:g="button","aria-label":f,...v},T)=>{let h=n?Slot:"button",u=S||p,w=f||(typeof c=="string"?c:void 0),M=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),!u&&v.onClick&&v.onClick(y));};return n?jsx(h,{className:o(F({variant:e,size:a,className:t})),ref:T,disabled:u,type:g,"aria-label":w,"aria-disabled":u,...v,children:c}):jsxs(h,{className:o(F({variant:e,size:a,className:t})),ref:T,disabled:u,type:g,"aria-label":w,"aria-disabled":u,onKeyDown:M,...v,children:[p&&jsx(Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!p&&s&&jsx("span",{className:"mr-2","aria-hidden":"true",children:s}),c,!p&&l&&jsx("span",{className:"ml-2","aria-hidden":"true",children:l})]})});D.displayName="Button";var _=r.forwardRef(({className:t,type:e,...a},n)=>jsx("input",{type:e,className:o("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...a}));_.displayName="Input";var B=r.forwardRef(({className:t,orientation:e="horizontal",decorative:a=true,...n},s)=>jsx(I.Root,{ref:s,decorative:a,orientation:e,className:o("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));B.displayName=I.Root.displayName;var Y=d.Root;var fe=d.Portal,J=r.forwardRef(({className:t,...e},a)=>jsx(d.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:a}));J.displayName=d.Overlay.displayName;var ue=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),O=r.forwardRef(({side:t="right",className:e,children:a,...n},s)=>jsxs(fe,{children:[jsx(J,{}),jsxs(d.Content,{ref:s,className:o(ue({side:t}),e),...n,children:[jsxs(d.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));O.displayName=d.Content.displayName;var A=({className:t,...e})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",t),...e});A.displayName="SheetHeader";var V=r.forwardRef(({className:t,...e},a)=>jsx(d.Title,{ref:a,className:o("text-lg font-semibold text-foreground",t),...e}));V.displayName=d.Title.displayName;var K=r.forwardRef(({className:t,...e},a)=>jsx(d.Description,{ref:a,className:o("text-sm text-muted-foreground",t),...e}));K.displayName=d.Description.displayName;function W({className:t,...e}){return jsx("div",{className:o("animate-pulse rounded-md bg-primary/10",t),...e})}var j=m.Provider,ee=m.Root,te=m.Trigger,G=r.forwardRef(({className:t,sideOffset:e=4,...a},n)=>jsx(m.Portal,{children:jsx(m.Content,{ref:n,sideOffset:e,className:o("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...a})}));G.displayName=m.Content.displayName;var Re="sidebar_state",xe=60*60*24*7,Se="16rem",we="18rem",ye="3rem",Ce="b",ae=r.createContext(null);function H(){let t=r.useContext(ae);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}var Pe=r.forwardRef(({defaultOpen:t=true,open:e,onOpenChange:a,className:n,style:s,children:l,...p},S)=>{let c=$(),[g,f]=r.useState(false),[v,T]=r.useState(t),h=e??v,u=r.useCallback(b=>{let R=typeof b=="function"?b(h):b;a?a(R):T(R),document.cookie=`${Re}=${R}; path=/; max-age=${xe}`;},[a,h]),w=r.useCallback(()=>c?f(b=>!b):u(b=>!b),[c,u,f]);r.useEffect(()=>{let b=R=>{R.key===Ce&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),w());};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[w]);let M=h?"expanded":"collapsed",y=r.useMemo(()=>({state:M,open:h,setOpen:u,isMobile:c,openMobile:g,setOpenMobile:f,toggleSidebar:w}),[M,h,u,c,g,f,w]);return jsx(ae.Provider,{value:y,children:jsx(j,{delayDuration:0,children:jsx("div",{style:{"--sidebar-width":Se,"--sidebar-width-icon":ye,...s},className:o("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar",n),ref:S,...p,children:l})})})});Pe.displayName="SidebarProvider";var Ne=r.forwardRef(({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:n,children:s,...l},p)=>{let{isMobile:S,state:c,openMobile:g,setOpenMobile:f}=H();return a==="none"?jsx("div",{className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",n),ref:p,...l,children:s}):S?jsx(Y,{open:g,onOpenChange:f,...l,children:jsxs(O,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":we},side:t,children:[jsxs(A,{className:"sr-only",children:[jsx(V,{children:"Sidebar"}),jsx(K,{children:"Displays the mobile sidebar."})]}),jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):jsxs("div",{ref:p,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?a:"","data-variant":e,"data-side":t,children:[jsx("div",{className:o("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:o("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...l,children:jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});Ne.displayName="Sidebar";var Te=r.forwardRef(({className:t,onClick:e,...a},n)=>{let{toggleSidebar:s}=H();return jsxs(D,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:o("h-7 w-7",t),onClick:l=>{e?.(l),s();},...a,children:[jsx(PanelLeft,{}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Te.displayName="SidebarTrigger";var Me=r.forwardRef(({className:t,...e},a)=>{let{toggleSidebar:n}=H();return jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...e})});Me.displayName="SidebarRail";var Ee=r.forwardRef(({className:t,...e},a)=>jsx("main",{ref:a,className:o("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",t),...e}));Ee.displayName="SidebarInset";var Le=r.forwardRef(({className:t,...e},a)=>jsx(_,{ref:a,"data-sidebar":"input",className:o("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...e}));Le.displayName="SidebarInput";var He=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",t),...e}));He.displayName="SidebarHeader";var ke=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",t),...e}));ke.displayName="SidebarFooter";var De=r.forwardRef(({className:t,...e},a)=>jsx(B,{ref:a,"data-sidebar":"separator",className:o("mx-2 w-auto bg-sidebar-border",t),...e}));De.displayName="SidebarSeparator";var _e=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...e}));_e.displayName="SidebarContent";var Ie=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",t),...e}));Ie.displayName="SidebarGroup";var Be=r.forwardRef(({className:t,asChild:e=false,...a},n)=>jsx(e?Slot:"div",{ref:n,"data-sidebar":"group-label",className:o("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...a}));Be.displayName="SidebarGroupLabel";var ze=r.forwardRef(({className:t,asChild:e=false,...a},n)=>jsx(e?Slot:"button",{ref:n,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...a}));ze.displayName="SidebarGroupAction";var Oe=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"group-content",className:o("w-full text-sm",t),...e}));Oe.displayName="SidebarGroupContent";var Ae=r.forwardRef(({className:t,...e},a)=>jsx("ul",{ref:a,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",t),...e}));Ae.displayName="SidebarMenu";var Ve=r.forwardRef(({className:t,...e},a)=>jsx("li",{ref:a,"data-sidebar":"menu-item",className:o("group/menu-item relative",t),...e}));Ve.displayName="SidebarMenuItem";var Ke=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),We=r.forwardRef(({asChild:t=false,isActive:e=false,variant:a="default",size:n="default",tooltip:s,className:l,...p},S)=>{let c=t?Slot:"button",{isMobile:g,state:f}=H(),v=jsx(c,{ref:S,"data-sidebar":"menu-button","data-size":n,"data-active":e,className:o(Ke({variant:a,size:n}),l),...p});return s?(typeof s=="string"&&(s={children:s}),jsxs(ee,{children:[jsx(te,{asChild:true,children:v}),jsx(G,{side:"right",align:"center",hidden:f!=="collapsed"||g,...s})]})):v});We.displayName="SidebarMenuButton";var Ge=r.forwardRef(({className:t,asChild:e=false,showOnHover:a=false,...n},s)=>jsx(e?Slot:"button",{ref:s,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",t),...n}));Ge.displayName="SidebarMenuAction";var $e=r.forwardRef(({className:t,...e},a)=>jsx("div",{ref:a,"data-sidebar":"menu-badge",className:o("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...e}));$e.displayName="SidebarMenuBadge";var Fe=r.forwardRef(({className:t,showIcon:e=false,...a},n)=>{let s=r.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:o("flex h-8 items-center gap-2 rounded-md px-2",t),...a,children:[e&&jsx(W,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsx(W,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Fe.displayName="SidebarMenuSkeleton";var qe=r.forwardRef(({className:t,...e},a)=>jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...e}));qe.displayName="SidebarMenuSub";var Ue=r.forwardRef(({...t},e)=>jsx("li",{ref:e,...t}));Ue.displayName="SidebarMenuSubItem";var Xe=r.forwardRef(({asChild:t=false,size:e="md",isActive:a,className:n,...s},l)=>jsx(t?Slot:"a",{ref:l,"data-sidebar":"menu-sub-button","data-size":e,"data-active":a,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...s}));Xe.displayName="SidebarMenuSubButton";export{Ne as Sidebar,_e as SidebarContent,ke as SidebarFooter,Ie as SidebarGroup,ze as SidebarGroupAction,Oe as SidebarGroupContent,Be as SidebarGroupLabel,He as SidebarHeader,Le as SidebarInput,Ee as SidebarInset,Ae as SidebarMenu,Ge as SidebarMenuAction,$e as SidebarMenuBadge,We as SidebarMenuButton,Ve as SidebarMenuItem,Fe as SidebarMenuSkeleton,qe as SidebarMenuSub,Xe as SidebarMenuSubButton,Ue as SidebarMenuSubItem,Pe as SidebarProvider,Me as SidebarRail,De as SidebarSeparator,Te as SidebarTrigger,Ke as sidebarMenuButtonVariants,H as useSidebar};//# sourceMappingURL=sidebar.mjs.map
|
|
2
|
+
//# sourceMappingURL=sidebar.mjs.map
|