periplo-ui 3.27.1 → 3.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,7 +50,7 @@ function DataTableToolbar({
50
50
  if (!showColumnVisibilityControls && !primaryFilters && !secondaryFilters && !selection) {
51
51
  return null;
52
52
  }
53
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-shrink-0 flex-col gap-2 p-1", children: [
53
+ return /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-col gap-2 p-1", children: [
54
54
  !isMobile && primaryFilters && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: primaryFilters }),
55
55
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
56
56
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: selection && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: selection.isSelectionStarted ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableToolbar.js","sources":["../../../../src/components/DataTable/components/DataTableToolbar.tsx"],"sourcesContent":["import { TextColumns, FunnelSimple, X, SelectionAll } from '@phosphor-icons/react'\nimport { Table } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Badge } from '../../Badge'\nimport { Button } from '../../Button'\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../DropdownMenu'\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from '../../Popover'\nimport { Typography } from '../../Typography'\n\nimport { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '@/components/Tooltip'\nimport { useIsMobile } from '@/lib/useMobile'\nimport { cn } from '@/lib/utils'\n\ntype DataTableToolbarProps<TData> = {\n readonly table: Table<TData>\n readonly showColumnVisibilityControls?: boolean\n readonly primaryFilters?: React.ReactNode\n readonly secondaryFilters?: React.ReactNode\n readonly activePrimaryFiltersCount?: number\n readonly activeSecondaryFiltersCount?: number\n readonly labels?: {\n columnVisibilityButton?: string\n columnVisibilitySelectAll?: string\n filters?: string\n moreFilters?: string\n }\n readonly selection?: {\n isSelectionStarted?: boolean\n onSelectionStart?: () => void\n onSelectionCancel?: () => void\n selectionSummary?: string | null\n isSelectionDisabled?: boolean\n labels?: {\n startSelection?: string\n cancelSelection?: string\n selectionSummary?: string\n selectionDisabledTooltip?: string\n }\n }\n}\n\nconst defaultLabels = {\n columnVisibilityButton: 'Hide columns',\n columnVisibilitySelectAll: 'Select all',\n filters: 'Filters',\n moreFilters: 'More filters',\n startSelection: 'Start selection',\n cancelSelection: 'Cancel selection',\n}\n\nconst defaultSelectionLabels = {\n startSelection: 'Start selection',\n cancelSelection: 'Cancel selection',\n}\n\nexport function DataTableToolbar<TData>({\n table,\n showColumnVisibilityControls = true,\n primaryFilters,\n secondaryFilters,\n activePrimaryFiltersCount = 0,\n activeSecondaryFiltersCount = 0,\n selection,\n labels: labelsProp,\n}: DataTableToolbarProps<TData>) {\n const isMobile = useIsMobile()\n\n const labels = {\n ...defaultLabels,\n ...labelsProp,\n }\n\n const selectionLabels = {\n ...defaultSelectionLabels,\n ...selection?.labels,\n }\n\n const hasPrimaryFilters = !!primaryFilters\n const hasSecondaryFilters = !!secondaryFilters\n\n const showFiltersButton = isMobile ? hasPrimaryFilters || hasSecondaryFilters : hasSecondaryFilters\n\n const totalActiveFiltersCount = activePrimaryFiltersCount + activeSecondaryFiltersCount\n const activeFiltersCount = isMobile ? totalActiveFiltersCount : activeSecondaryFiltersCount\n const showBadge = activeFiltersCount > 0\n\n const filtersButtonLabel = !hasPrimaryFilters || isMobile ? labels.filters : labels.moreFilters\n\n if (!showColumnVisibilityControls && !primaryFilters && !secondaryFilters && !selection) {\n return null\n }\n\n return (\n <div className=\"flex flex-shrink-0 flex-col gap-2 p-1\">\n {!isMobile && primaryFilters && <div className=\"flex flex-wrap items-center gap-2\">{primaryFilters}</div>}\n\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n {selection && (\n <div className=\"flex items-center gap-2\">\n {selection.isSelectionStarted ? (\n <>\n <Button variant=\"text\" size=\"sm\" StartIcon={X} onClick={selection.onSelectionCancel}>\n {selectionLabels.cancelSelection}\n </Button>\n {selection.selectionSummary && !isMobile && (\n <Typography variant=\"body-sm\" className=\"text-neutral-600\">\n {selection.selectionSummary}\n </Typography>\n )}\n </>\n ) : (\n <TooltipProvider>\n <TooltipRoot delayDuration={200}>\n <TooltipTrigger asChild>\n <div>\n <Button\n variant=\"text\"\n size=\"sm\"\n StartIcon={SelectionAll}\n onClick={selection.onSelectionStart}\n disabled={selection.isSelectionDisabled}\n >\n {selectionLabels.startSelection}\n </Button>\n </div>\n </TooltipTrigger>\n {selection.labels?.selectionDisabledTooltip && selection.isSelectionDisabled && (\n <TooltipContent>{selection.labels.selectionDisabledTooltip}</TooltipContent>\n )}\n </TooltipRoot>\n </TooltipProvider>\n )}\n </div>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n {/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */}\n {showFiltersButton && (\n <PopoverRoot>\n <PopoverTrigger asChild>\n <Button variant=\"text\" size=\"sm\" StartIcon={FunnelSimple} className=\"relative whitespace-nowrap\">\n {showBadge && (\n <Badge\n count={activeFiltersCount}\n color=\"primary\"\n ping={false}\n className=\"absolute -top-1 -right-1\"\n />\n )}\n {filtersButtonLabel}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"center\"\n className={cn('w-fit p-4', isMobile && 'max-h-[80vh] w-[95vw] overflow-y-auto')}\n >\n <div className=\"flex flex-col gap-4\">\n {isMobile && primaryFilters}\n {secondaryFilters}\n </div>\n </PopoverContent>\n </PopoverRoot>\n )}\n {showColumnVisibilityControls && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"text\" size=\"sm\" className={cn('whitespace-nowrap')} StartIcon={TextColumns}>\n {labels.columnVisibilityButton}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuCheckboxItem\n key={'all-columns'}\n className=\"capitalize\"\n checked={table.getAllColumns().every((column) => column.getIsVisible())}\n onSelect={(event) => event.preventDefault()}\n onCheckedChange={(value) =>\n table.getAllColumns().forEach((column) => column.toggleVisibility(!!value))\n }\n >\n {labels.columnVisibilitySelectAll}\n </DropdownMenuCheckboxItem>\n <DropdownMenuSeparator className=\"bg-neutral-100\" />\n {table\n .getAllColumns()\n .filter((column) => column.getCanHide() && column.id !== 'select')\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onSelect={(event) => event.preventDefault()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {column.columnDef.header?.toString()}\n </DropdownMenuCheckboxItem>\n )\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgDA,MAAM,aAAA,GAAgB;AAAA,EACpB,sBAAA,EAAwB,cAAA;AAAA,EACxB,yBAAA,EAA2B,YAAA;AAAA,EAC3B,OAAA,EAAS,SAAA;AAAA,EACT,WAAA,EAAa,cAAA;AAAA,EACb,cAAA,EAAgB,iBAAA;AAAA,EAChB,eAAA,EAAiB;AACnB,CAAA;AAEA,MAAM,sBAAA,GAAyB;AAAA,EAC7B,cAAA,EAAgB,iBAAA;AAAA,EAChB,eAAA,EAAiB;AACnB,CAAA;AAEO,SAAS,gBAAA,CAAwB;AAAA,EACtC,KAAA;AAAA,EACA,4BAAA,GAA+B,IAAA;AAAA,EAC/B,cAAA;AAAA,EACA,gBAAA;AAAA,EACA,yBAAA,GAA4B,CAAA;AAAA,EAC5B,2BAAA,GAA8B,CAAA;AAAA,EAC9B,SAAA;AAAA,EACA,MAAA,EAAQ;AACV,CAAA,EAAiC;AAC/B,EAAA,MAAM,WAAW,WAAA,EAAY;AAE7B,EAAA,MA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ent":["import { TextColumns, FunnelSimple, X, SelectionAll } from '@phosphor-icons/react'\nimport { Table } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Badge } from '../../Badge'\nimport { Button } from '../../Button'\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../DropdownMenu'\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from '../../Popover'\nimport { Typography } from '../../Typography'\n\nimport { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '@/components/Tooltip'\nimport { useIsMobile } from '@/lib/useMobile'\nimport { cn } from '@/lib/utils'\n\ntype DataTableToolbarProps<TData> = {\n readonly table: Table<TData>\n readonly showColumnVisibilityControls?: boolean\n readonly primaryFilters?: React.ReactNode\n readonly secondaryFilters?: React.ReactNode\n readonly activePrimaryFiltersCount?: number\n readonly activeSecondaryFiltersCount?: number\n readonly labels?: {\n columnVisibilityButton?: string\n columnVisibilitySelectAll?: string\n filters?: string\n moreFilters?: string\n }\n readonly selection?: {\n isSelectionStarted?: boolean\n onSelectionStart?: () => void\n onSelectionCancel?: () => void\n selectionSummary?: string | null\n isSelectionDisabled?: boolean\n labels?: {\n startSelection?: string\n cancelSelection?: string\n selectionSummary?: string\n selectionDisabledTooltip?: string\n }\n }\n}\n\nconst defaultLabels = {\n columnVisibilityButton: 'Hide columns',\n columnVisibilitySelectAll: 'Select all',\n filters: 'Filters',\n moreFilters: 'More filters',\n startSelection: 'Start selection',\n cancelSelection: 'Cancel selection',\n}\n\nconst defaultSelectionLabels = {\n startSelection: 'Start selection',\n cancelSelection: 'Cancel selection',\n}\n\nexport function DataTableToolbar<TData>({\n table,\n showColumnVisibilityControls = true,\n primaryFilters,\n secondaryFilters,\n activePrimaryFiltersCount = 0,\n activeSecondaryFiltersCount = 0,\n selection,\n labels: labelsProp,\n}: DataTableToolbarProps<TData>) {\n const isMobile = useIsMobile()\n\n const labels = {\n ...defaultLabels,\n ...labelsProp,\n }\n\n const selectionLabels = {\n ...defaultSelectionLabels,\n ...selection?.labels,\n }\n\n const hasPrimaryFilters = !!primaryFilters\n const hasSecondaryFilters = !!secondaryFilters\n\n const showFiltersButton = isMobile ? hasPrimaryFilters || hasSecondaryFilters : hasSecondaryFilters\n\n const totalActiveFiltersCount = activePrimaryFiltersCount + activeSecondaryFiltersCount\n const activeFiltersCount = isMobile ? totalActiveFiltersCount : activeSecondaryFiltersCount\n const showBadge = activeFiltersCount > 0\n\n const filtersButtonLabel = !hasPrimaryFilters || isMobile ? labels.filters : labels.moreFilters\n\n if (!showColumnVisibilityControls && !primaryFilters && !secondaryFilters && !selection) {\n return null\n }\n\n return (\n <div className=\"flex shrink-0 flex-col gap-2 p-1\">\n {!isMobile && primaryFilters && <div className=\"flex flex-wrap items-center gap-2\">{primaryFilters}</div>}\n\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n {selection && (\n <div className=\"flex items-center gap-2\">\n {selection.isSelectionStarted ? (\n <>\n <Button variant=\"text\" size=\"sm\" StartIcon={X} onClick={selection.onSelectionCancel}>\n {selectionLabels.cancelSelection}\n </Button>\n {selection.selectionSummary && !isMobile && (\n <Typography variant=\"body-sm\" className=\"text-neutral-600\">\n {selection.selectionSummary}\n </Typography>\n )}\n </>\n ) : (\n <TooltipProvider>\n <TooltipRoot delayDuration={200}>\n <TooltipTrigger asChild>\n <div>\n <Button\n variant=\"text\"\n size=\"sm\"\n StartIcon={SelectionAll}\n onClick={selection.onSelectionStart}\n disabled={selection.isSelectionDisabled}\n >\n {selectionLabels.startSelection}\n </Button>\n </div>\n </TooltipTrigger>\n {selection.labels?.selectionDisabledTooltip && selection.isSelectionDisabled && (\n <TooltipContent>{selection.labels.selectionDisabledTooltip}</TooltipContent>\n )}\n </TooltipRoot>\n </TooltipProvider>\n )}\n </div>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n {/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */}\n {showFiltersButton && (\n <PopoverRoot>\n <PopoverTrigger asChild>\n <Button variant=\"text\" size=\"sm\" StartIcon={FunnelSimple} className=\"relative whitespace-nowrap\">\n {showBadge && (\n <Badge\n count={activeFiltersCount}\n color=\"primary\"\n ping={false}\n className=\"absolute -top-1 -right-1\"\n />\n )}\n {filtersButtonLabel}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"center\"\n className={cn('w-fit p-4', isMobile && 'max-h-[80vh] w-[95vw] overflow-y-auto')}\n >\n <div className=\"flex flex-col gap-4\">\n {isMobile && primaryFilters}\n {secondaryFilters}\n </div>\n </PopoverContent>\n </PopoverRoot>\n )}\n {showColumnVisibilityControls && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"text\" size=\"sm\" className={cn('whitespace-nowrap')} StartIcon={TextColumns}>\n {labels.columnVisibilityButton}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuCheckboxItem\n key={'all-columns'}\n className=\"capitalize\"\n checked={table.getAllColumns().every((column) => column.getIsVisible())}\n onSelect={(event) => event.preventDefault()}\n onCheckedChange={(value) =>\n table.getAllColumns().forEach((column) => column.toggleVisibility(!!value))\n }\n >\n {labels.columnVisibilitySelectAll}\n </DropdownMenuCheckboxItem>\n <DropdownMenuSeparator className=\"bg-neutral-100\" />\n {table\n .getAllColumns()\n .filter((column) => column.getCanHide() && column.id !== 'select')\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onSelect={(event) => event.preventDefault()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {column.columnDef.header?.toString()}\n </DropdownMenuCheckboxItem>\n )\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgDA,MAAM,aAAA,GAAgB;AAAA,EACpB,sBAAA,EAAwB,cAAA;AAAA,EACxB,yBAA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C,SAAA,EAAU,YAAA;AAAA,kBACV,OAAA,EAAS,OAAO,YAAA,EAAa;AAAA,kBAC7B,QAAA,EAAU,CAAC,KAAA,KAAU,KAAA,CAAM,cAAA,EAAe;AAAA,kBAC1C,iBAAiB,CAAC,KAAA,KAAU,OAAO,gBAAA,CAAiB,CAAC,CAAC,KAAK,CAAA;AAAA,kBAE1D,QAAA,EAAA,MAAA,CAAO,SAAA,CAAU,MAAA,EAAQ,QAAA;AAAS,iBAAA;AAAA,gBAN9B,MAAA,CAAO;AAAA,eAOd;AAAA,aAEH;AAAA,WAAA,EACL;AAAA,SAAA,EACF;AAAA,OAAA,EAEJ;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1,2 @@
1
1
  export * from './DataTable';
2
+ export * from './types';
@@ -1,170 +1,162 @@
1
1
  import { ColumnDef } from '@tanstack/react-table';
2
2
  import { ReactNode } from 'react';
3
3
  export type User = {
4
- id: string
5
- name: string
6
- email: string
7
- role: string
8
- status: 'active' | 'inactive' | 'pending'
9
- }
10
-
4
+ id: string;
5
+ name: string;
6
+ email: string;
7
+ role: string;
8
+ status: 'active' | 'inactive' | 'pending';
9
+ };
11
10
  export type UserExtended = User & {
12
- salary: number
13
- employeeId: string
14
- manager: string
15
- officeNumber: string
16
- lastLogin: string
17
- vacationDays: number
18
- projectCount: number
19
- performanceRating: number
20
- certifications: Array<string>
21
- languages: Array<string>
22
- department: string
23
- location: string
24
- joinDate: string
25
- phoneNumber: string
26
- title: string
27
- }
28
-
11
+ salary: number;
12
+ employeeId: string;
13
+ manager: string;
14
+ officeNumber: string;
15
+ lastLogin: string;
16
+ vacationDays: number;
17
+ projectCount: number;
18
+ performanceRating: number;
19
+ certifications: Array<string>;
20
+ languages: Array<string>;
21
+ department: string;
22
+ location: string;
23
+ joinDate: string;
24
+ phoneNumber: string;
25
+ title: string;
26
+ };
29
27
  export type Product = {
30
- id: string
31
- name: string
32
- category: string
33
- price: number
34
- stock: number
35
- lastUpdated: string
36
- }
37
-
28
+ id: string;
29
+ name: string;
30
+ category: string;
31
+ price: number;
32
+ stock: number;
33
+ lastUpdated: string;
34
+ };
38
35
  export type SelectionConfig<TData> = {
39
- /** Whether the row is selected */
40
- isSelected: (row: TData) => boolean
41
- /** Callback when a row is selected */
42
- onSelect?: (row: TData, selected: boolean) => void
43
- /** Callback when all rows are selected */
44
- onSelectAll?: (selected: boolean) => void
45
- /** Optional callback when selection has started (for backend pagination) */
46
- onSelectionStart?: () => void
47
- /** Optional callback when selection mode is cancelled (for backend pagination) */
48
- onSelectionCancel?: () => void
49
- /** Whether selection mode is active (for backend pagination) */
50
- isSelectionStarted?: boolean
51
- /** Whether the selection is disabled */
52
- isSelectionDisabled?: boolean
53
- /** Whether the row selection is disabled */
54
- isRowSelectionDisabled?: boolean | ((row: TData) => boolean)
55
- /** Selection-related labels for UI customization */
56
- labels?: {
57
- /** Text for the selection disabled tooltip */
58
- selectionDisabledTooltip?: string | undefined
59
- /** Tooltip text shown when the checkbox is disabled */
60
- rowSelectionDisabledTooltip?: string | ((row: TData) => string | undefined)
61
- /** Text for the start selection button (default: "Select") */
62
- startSelection?: string
63
- /** Text for the cancel selection button (default: "Cancel") */
64
- cancelSelection?: string
65
- /** Text for the selection summary (default: "Selected {count} of {total}") */
66
- selectionSummary?: string
67
- }
68
- }
69
-
36
+ /** Whether the row is selected */
37
+ isSelected: (row: TData) => boolean;
38
+ /** Callback when a row is selected */
39
+ onSelect?: (row: TData, selected: boolean) => void;
40
+ /** Callback when all rows are selected */
41
+ onSelectAll?: (selected: boolean) => void;
42
+ /** Optional callback when selection has started (for backend pagination) */
43
+ onSelectionStart?: () => void;
44
+ /** Optional callback when selection mode is cancelled (for backend pagination) */
45
+ onSelectionCancel?: () => void;
46
+ /** Whether selection mode is active (for backend pagination) */
47
+ isSelectionStarted?: boolean;
48
+ /** Whether the selection is disabled */
49
+ isSelectionDisabled?: boolean;
50
+ /** Whether the row selection is disabled */
51
+ isRowSelectionDisabled?: boolean | ((row: TData) => boolean);
52
+ /** Selection-related labels for UI customization */
53
+ labels?: {
54
+ /** Text for the selection disabled tooltip */
55
+ selectionDisabledTooltip?: string | undefined;
56
+ /** Tooltip text shown when the checkbox is disabled */
57
+ rowSelectionDisabledTooltip?: string | ((row: TData) => string | undefined);
58
+ /** Text for the start selection button (default: "Select") */
59
+ startSelection?: string;
60
+ /** Text for the cancel selection button (default: "Cancel") */
61
+ cancelSelection?: string;
62
+ /** Text for the selection summary (default: "Selected {count} of {total}") */
63
+ selectionSummary?: string;
64
+ };
65
+ };
70
66
  export type BasePaginationProps = {
71
- /** Number of rows per page */
72
- readonly pageSize: number
73
- /** Whether the pagination is in a loading state */
74
- readonly isLoading?: boolean
75
- /** Text customization for pagination */
76
- readonly labels?: {
77
- /** Text shown before the page size number (default: "Showing") */
78
- showing?: string
79
- /** Text shown before the total number (default: "of") */
80
- of?: string
81
- /** Text shown after the total number (default: "results") */
82
- results?: string
83
- /** Aria label for previous page button (default: "Previous page") */
84
- previousPage?: string
85
- /** Aria label for next page button (default: "Next page") */
86
- nextPage?: string
87
- /** Aria label for page number (default: "Page {number}") */
88
- pageLabel?: string
89
- }
90
- }
91
-
67
+ /** Number of rows per page */
68
+ readonly pageSize: number;
69
+ /** Whether the pagination is in a loading state */
70
+ readonly isLoading?: boolean;
71
+ /** Text customization for pagination */
72
+ readonly labels?: {
73
+ /** Text shown before the page size number (default: "Showing") */
74
+ showing?: string;
75
+ /** Text shown before the total number (default: "of") */
76
+ of?: string;
77
+ /** Text shown after the total number (default: "results") */
78
+ results?: string;
79
+ /** Aria label for previous page button (default: "Previous page") */
80
+ previousPage?: string;
81
+ /** Aria label for next page button (default: "Next page") */
82
+ nextPage?: string;
83
+ /** Aria label for page number (default: "Page {number}") */
84
+ pageLabel?: string;
85
+ };
86
+ };
92
87
  export type BackendPaginationProps = {
93
- /** Current page */
94
- readonly currentPage: number
95
- /** Total number of items */
96
- readonly total: number
97
- /** Callback when page changes */
98
- readonly onPageChange: (page: number) => void
99
- } & BasePaginationProps
100
-
88
+ /** Current page */
89
+ readonly currentPage: number;
90
+ /** Total number of items */
91
+ readonly total: number;
92
+ /** Callback when page changes */
93
+ readonly onPageChange: (page: number) => void;
94
+ } & BasePaginationProps;
101
95
  export type DataTableProps<TData> = {
102
- /** Array of column definitions that describe the table structure */
103
- readonly columns: Array<ColumnDef<TData>>
104
- /** Array of data items to be displayed in the table */
105
- readonly data: Array<TData>
106
- /** Whether to show the column visibility toggle menu */
107
- readonly showColumnVisibilityControls?: boolean
108
- /** Whether the table is in a loading state */
109
- readonly isLoading?: boolean
110
- /** Pagination configuration. If not provided, pagination is disabled */
111
- readonly pagination?: BasePaginationProps | BackendPaginationProps
112
- /** Primary filters that appear directly above the table */
113
- readonly primaryFilters?: ReactNode
114
- /** Secondary filters that appear in the filters dropdown */
115
- readonly secondaryFilters?: ReactNode
116
- /** Number of active primary filters */
117
- readonly activePrimaryFiltersCount?: number
118
- /** Number of active secondary filters */
119
- readonly activeSecondaryFiltersCount?: number
120
- /** Selection configuration */
121
- readonly selection?: SelectionConfig<TData>
122
- /** Whether to hide the checkbox selection column */
123
- readonly hideCheckboxSelection?: boolean
124
- /** Empty state configuration */
125
- readonly emptyState?: {
126
- /** Title for the empty state */
127
- title: string
128
- /** Description for the empty state */
129
- description: string
130
- /** Route for the empty state image */
131
- imageRoute?: string
132
- /** Alt text for the empty state image */
133
- imageAlt?: string
134
- /** Class name for the empty state image */
135
- imageClassName?: string
136
- }
137
- /** Text customization for filters */
138
- readonly labels?: {
139
- /** Text for the column visibility button (default: "Hide columns") */
140
- columnVisibilityButton?: string
141
- /** Text for the columns visibility select all option (default: "Select all") */
142
- columnVisibilitySelectAll?: string
143
- /** Text for the filters button when only secondary filters are present (default: "Filters") */
144
- filters?: string
145
- /** Text for the more filters button when both primary and secondary filters are present (default: "More filters") */
146
- moreFilters?: string
147
- }
148
- /** Optional className for the table container */
149
- readonly className?: string
150
- /** Optional className for the table */
151
- readonly tableClassName?: string
152
- } & (HasId<TData> extends true
153
- ? {
154
- /** Function to get unique identifier from a row. Not needed when data has 'id' property */
155
- readonly getRowId?: RowIdentifierFn<TData>
156
- }
157
- : {
158
- /** Function to get unique identifier from a row. Required when data doesn't have 'id' property */
159
- readonly getRowId: RowIdentifierFn<TData>
160
- })
161
-
96
+ /** Array of column definitions that describe the table structure */
97
+ readonly columns: Array<ColumnDef<TData>>;
98
+ /** Array of data items to be displayed in the table */
99
+ readonly data: Array<TData>;
100
+ /** Whether to show the column visibility toggle menu */
101
+ readonly showColumnVisibilityControls?: boolean;
102
+ /** Whether the table is in a loading state */
103
+ readonly isLoading?: boolean;
104
+ /** Pagination configuration. If not provided, pagination is disabled */
105
+ readonly pagination?: BasePaginationProps | BackendPaginationProps;
106
+ /** Primary filters that appear directly above the table */
107
+ readonly primaryFilters?: ReactNode;
108
+ /** Secondary filters that appear in the filters dropdown */
109
+ readonly secondaryFilters?: ReactNode;
110
+ /** Number of active primary filters */
111
+ readonly activePrimaryFiltersCount?: number;
112
+ /** Number of active secondary filters */
113
+ readonly activeSecondaryFiltersCount?: number;
114
+ /** Selection configuration */
115
+ readonly selection?: SelectionConfig<TData>;
116
+ /** Whether to hide the checkbox selection column */
117
+ readonly hideCheckboxSelection?: boolean;
118
+ /** Empty state configuration */
119
+ readonly emptyState?: {
120
+ /** Title for the empty state */
121
+ title: string;
122
+ /** Description for the empty state */
123
+ description: string;
124
+ /** Route for the empty state image */
125
+ imageRoute?: string;
126
+ /** Alt text for the empty state image */
127
+ imageAlt?: string;
128
+ /** Class name for the empty state image */
129
+ imageClassName?: string;
130
+ };
131
+ /** Text customization for filters */
132
+ readonly labels?: {
133
+ /** Text for the column visibility button (default: "Hide columns") */
134
+ columnVisibilityButton?: string;
135
+ /** Text for the columns visibility select all option (default: "Select all") */
136
+ columnVisibilitySelectAll?: string;
137
+ /** Text for the filters button when only secondary filters are present (default: "Filters") */
138
+ filters?: string;
139
+ /** Text for the more filters button when both primary and secondary filters are present (default: "More filters") */
140
+ moreFilters?: string;
141
+ };
142
+ /** Optional className for the table container */
143
+ readonly className?: string;
144
+ /** Optional className for the table */
145
+ readonly tableClassName?: string;
146
+ } & (HasId<TData> extends true ? {
147
+ /** Function to get unique identifier from a row. Not needed when data has 'id' property */
148
+ readonly getRowId?: RowIdentifierFn<TData>;
149
+ } : {
150
+ /** Function to get unique identifier from a row. Required when data doesn't have 'id' property */
151
+ readonly getRowId: RowIdentifierFn<TData>;
152
+ });
162
153
  /**
163
154
  * Type helper to check if a type has an 'id' property
164
155
  */
165
- export type HasId<T> = T extends { id: string | number } ? true : false
166
-
156
+ export type HasId<T> = T extends {
157
+ id: string | number;
158
+ } ? true : false;
167
159
  /**
168
160
  * Function to get a unique identifier from a row
169
161
  */
170
- export type RowIdentifierFn<T> = (row: T) => string
162
+ export type RowIdentifierFn<T> = (row: T) => string;
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -28,7 +28,7 @@ const DialogContent = React.forwardRef(
28
28
  {
29
29
  ref,
30
30
  className: cn(
31
- "bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
31
+ "bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
32
32
  className
33
33
  ),
34
34
  onPointerDownOutside: (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { X } from '@phosphor-icons/react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n closable?: boolean\n}\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closable = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n onPointerDownOutside={(e) => {\n if (!closable) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closable) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {closable ? (\n <DialogPrimitive.Close className=\"data-[state=open]:text-muted-foreground ring-offset-background focus:ring-ring data-[state=open]:bg-accent absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\">\n <X size={24} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPortal>\n ),\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n Dial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MAAM,UAAA,CAG9B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1B,GAAA,CAAC,gBAAgB,WAAA,EAAhB,EAA4B,KAAU,SAAA,EAAW,EAAA,CAAG,iCAAiC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAC9G;AACD,iBAAA,CAAkB,WAAA,GAAc,gBAAgB,WAAA,CAAY,WAAA;;;;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { X } from '@phosphor-icons/react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n closable?: boolean\n}\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closable = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n onPointerDownOutside={(e) => {\n if (!closable) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closable) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {closable ? (\n <DialogPrimitive.Close className=\"data-[state=open]:text-muted-foreground ring-offset-background focus:ring-ring data-[state=open]:bg-accent absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\">\n <X size={24} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPortal>\n ),\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":[],"mappings":";;;;;;AAUA,MAAM,SAAS,eAAA,CAAgB;AAE/B,MAAM,gBAAgB,eAAA,CAAgB;AAEtC,MAAM,eAAe,eAAA,CAAgB;AAErC,MAAM,cAAc,eAAA,CAAgB;AAEpC,MAAM,aAAA,GAAgB,MAAM,UAAA,CAG1B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1B,GAAA;AAAA,EAAC,eAAA,CAAgB,OAAA;AAAA,EAAhB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,wJAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,aAAA,CAAc,WAAA,GAAc,gBAAgB,OAAA,CAAQ,WAAA;AAEpD,MAAM,gBAAgB,KAAA,CAAM,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,QAAA,EAAU,QAAA,GAAW,IAAA,EAAM,GAAG,KAAA,EAAM,EAAG,GAAA,qBACnD,IAAA,CAAC,YAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,CAAA;AAAA,oBACf,IAAA;AAAA,MAAC,eAAA,CAAgB,OAAA;AAAA,MAAhB;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,yVAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,oBAAA,EAAsB,CAAC,CAAA,KAAM;AAC3B,UAAA,IAAI,CAAC,QAAA,EAAU;AACb,YAAA,CAAA,CAAE,cAAA,EAAe;AAAA;AACnB,SACF;AAAA,QACA,eAAA,EAAiB,CAAC,CAAA,KAAM;AACtB,UAAA,IAAI,CAAC,QAAA,EAAU;AACb,YAAA,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,GAAc,gBAAgB,KAAA,CAAM,WAAA;AAEhD,MAAM,iBAAA,GAAoB,MAAM,UAAA,CAG9B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1B,GAAA,CAAC,gBAAgB,WAAA,EAAhB,EAA4B,KAAU,SAAA,EAAW,EAAA,CAAG,iCAAiC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAC9G;AACD,iBAAA,CAAkB,WAAA,GAAc,gBAAgB,WAAA,CAAY,WAAA;;;;"}
@@ -14,7 +14,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
14
14
  sideOffset,
15
15
  side,
16
16
  className: cn(
17
- "text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] min-w-[200px] rounded-md border bg-white p-4 text-center shadow-md outline-none",
17
+ "text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-[--radix-popover-content-available-height] w-[var(--radix-popover-trigger-width)] min-w-[200px] rounded-md border bg-white p-4 text-center shadow-md outline-none",
18
18
  className
19
19
  ),
20
20
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as PopoverPrimitive from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Root component for the Popover.\n * Manages the state and accessibility of the popover dialog.\n */\nconst PopoverRoot = PopoverPrimitive.Root\n\n/**\n * The button that triggers the popover to open/close.\n * Must be wrapped in a Popover component.\n */\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\n/**\n * Optional anchor element that positions the popover.\n * Useful when the trigger element is not where you want the popover to be anchored.\n */\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nexport type PopoverProps = {\n /**\n * Content to be displayed inside the popover.\n * Can be either a React element or a string.\n */\n children: React.ReactElement | string\n\n /**\n * Element that triggers the popover when interacted with.\n * Can be either a React element or a string.\n * @example <PopoverComponent triggerElement={<Button>Click me</Button>} />\n */\n triggerElement: React.ReactElement | string\n\n /**\n * Position of the popover relative to the trigger element.\n * @default bottom\n */\n side?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * Additional CSS classes to be applied to the popover content.\n */\n className?: string\n\n /**\n * Alignment of the popover relative to the trigger element.\n * @default center\n */\n align?: 'start' | 'center' | 'end'\n\n /**\n * Distance in pixels between the trigger element and the popover.\n * @default 4\n */\n sideOffset?: number\n}\n\n/**\n * PopoverContent component that renders the actual popover content.\n * Handled internally by the PopoverComponent.\n */\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, side = 'bottom', ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n side={side}\n className={cn(\n 'text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] min-w-[200px] rounded-md border bg-white p-4 text-center shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\n/**\n * A versatile Popover component that displays floating content when triggered.\n * Built on top of Radix UI's Popover primitives.\n *\n * @example\n * // Basic usage\n * <PopoverComponent\n * triggerElement={<Button>Click me</Button>}\n * side=\"bottom\"\n * >\n * Popover content\n * </PopoverComponent>\n *\n * // With custom alignment and offset\n * <PopoverComponent\n * triggerElement={<Button>Settings</Button>}\n * side=\"right\"\n * align=\"start\"\n * sideOffset={8}\n * >\n * <div>Custom content</div>\n * </PopoverComponent>\n */\nexport const Popover = ({\n side,\n triggerElement,\n children,\n className,\n align = 'center',\n sideOffset = 4,\n}: Readonly<PopoverProps>) => {\n return (\n <PopoverRoot>\n <PopoverTrigger asChild>\n {typeof triggerElement === 'string' ? <span className=\"cursor-pointer\">{triggerElement}</span> : triggerElement}\n </PopoverTrigger>\n <PopoverContent side={side} className={className} align={align} sideOffset={sideOffset}>\n {children}\n </PopoverContent>\n </PopoverRoot>\n )\n}\n\nexport { PopoverRoot, PopoverTrigger, PopoverContent, PopoverAnchor }\n"],"names":[],"mappings":";;;;;AASA,MAAM,cAAc,gBAAA,CAAiB;AAMrC,MAAM,iBAAiB,gBAAA,CAAiB;AAMxC,MAAM,gBAAgB,gBAAA,CAAiB;AA4CvC,MAAM,iBAAiB,KAAA,CAAM,UAAA,CAG3B,CAAC,EAAE,SAAA,EAAW,QAAQ,QAAA,EAAU,UAAA,GAAa,GAAG,IAAA,GAAO,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,wBAC7E,GAAA,CAAC,gBAAA,CAAiB,QAAjB,EACC,QAAA,kBAAA,GAAA;AAAA,EAAC,gBAAA,CAAiB,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,khBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CAAA,EACF,CACD;AACD,cAAA,CAAe,WAAA,GAAc,iBAAiB,OAAA,CAAQ,WAAA;AAyB/C,MAAM,UAAU,CAAC;AAAA,EACtB,IAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,UAAA,GAAa;AACf,CAAA,KAA8B;AAC5B,EAAA,4BACG,WAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAO,IAAA,EACpB,QAAA,EAAA,OAAO,cAAA,KAAmB,QAAA,mBAAW,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,gBAAA,EAAkB,QAAA,EAAA,cAAA,EAAe,CAAA,GAAU,cAAA,EACnG,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe,IAAA,EAAY,SAAA,EAAsB,KAAA,EAAc,YAC7D,QAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as PopoverPrimitive from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Root component for the Popover.\n * Manages the state and accessibility of the popover dialog.\n */\nconst PopoverRoot = PopoverPrimitive.Root\n\n/**\n * The button that triggers the popover to open/close.\n * Must be wrapped in a Popover component.\n */\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\n/**\n * Optional anchor element that positions the popover.\n * Useful when the trigger element is not where you want the popover to be anchored.\n */\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nexport type PopoverProps = {\n /**\n * Content to be displayed inside the popover.\n * Can be either a React element or a string.\n */\n children: React.ReactElement | string\n\n /**\n * Element that triggers the popover when interacted with.\n * Can be either a React element or a string.\n * @example <PopoverComponent triggerElement={<Button>Click me</Button>} />\n */\n triggerElement: React.ReactElement | string\n\n /**\n * Position of the popover relative to the trigger element.\n * @default bottom\n */\n side?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * Additional CSS classes to be applied to the popover content.\n */\n className?: string\n\n /**\n * Alignment of the popover relative to the trigger element.\n * @default center\n */\n align?: 'start' | 'center' | 'end'\n\n /**\n * Distance in pixels between the trigger element and the popover.\n * @default 4\n */\n sideOffset?: number\n}\n\n/**\n * PopoverContent component that renders the actual popover content.\n * Handled internally by the PopoverComponent.\n */\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, side = 'bottom', ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n side={side}\n className={cn(\n 'text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-[--radix-popover-content-available-height] w-[var(--radix-popover-trigger-width)] min-w-[200px] rounded-md border bg-white p-4 text-center shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\n/**\n * A versatile Popover component that displays floating content when triggered.\n * Built on top of Radix UI's Popover primitives.\n *\n * @example\n * // Basic usage\n * <PopoverComponent\n * triggerElement={<Button>Click me</Button>}\n * side=\"bottom\"\n * >\n * Popover content\n * </PopoverComponent>\n *\n * // With custom alignment and offset\n * <PopoverComponent\n * triggerElement={<Button>Settings</Button>}\n * side=\"right\"\n * align=\"start\"\n * sideOffset={8}\n * >\n * <div>Custom content</div>\n * </PopoverComponent>\n */\nexport const Popover = ({\n side,\n triggerElement,\n children,\n className,\n align = 'center',\n sideOffset = 4,\n}: Readonly<PopoverProps>) => {\n return (\n <PopoverRoot>\n <PopoverTrigger asChild>\n {typeof triggerElement === 'string' ? <span className=\"cursor-pointer\">{triggerElement}</span> : triggerElement}\n </PopoverTrigger>\n <PopoverContent side={side} className={className} align={align} sideOffset={sideOffset}>\n {children}\n </PopoverContent>\n </PopoverRoot>\n )\n}\n\nexport { PopoverRoot, PopoverTrigger, PopoverContent, PopoverAnchor }\n"],"names":[],"mappings":";;;;;AASA,MAAM,cAAc,gBAAA,CAAiB;AAMrC,MAAM,iBAAiB,gBAAA,CAAiB;AAMxC,MAAM,gBAAgB,gBAAA,CAAiB;AA4CvC,MAAM,iBAAiB,KAAA,CAAM,UAAA,CAG3B,CAAC,EAAE,SAAA,EAAW,QAAQ,QAAA,EAAU,UAAA,GAAa,GAAG,IAAA,GAAO,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,wBAC7E,GAAA,CAAC,gBAAA,CAAiB,QAAjB,EACC,QAAA,kBAAA,GAAA;AAAA,EAAC,gBAAA,CAAiB,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,uhBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CAAA,EACF,CACD;AACD,cAAA,CAAe,WAAA,GAAc,iBAAiB,OAAA,CAAQ,WAAA;AAyB/C,MAAM,UAAU,CAAC;AAAA,EACtB,IAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,UAAA,GAAa;AACf,CAAA,KAA8B;AAC5B,EAAA,4BACG,WAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAO,IAAA,EACpB,QAAA,EAAA,OAAO,cAAA,KAAmB,QAAA,mBAAW,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,gBAAA,EAAkB,QAAA,EAAA,cAAA,EAAe,CAAA,GAAU,cAAA,EACnG,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe,IAAA,EAAY,SAAA,EAAsB,KAAA,EAAc,YAC7D,QAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -14,7 +14,7 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
14
14
  {
15
15
  ref,
16
16
  className: cn(
17
- "border-primary text-foreground ring-offset-background focus-visible:ring-accent-600 aspect-square h-4 w-4 flex-shrink-0 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
17
+ "border-primary text-foreground ring-offset-background focus-visible:ring-accent-600 aspect-square h-4 w-4 shrink-0 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
18
18
  className
19
19
  ),
20
20
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { Check } from '@phosphor-icons/react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-primary text-foreground ring-offset-background focus-visible:ring-accent-600 aspect-square h-4 w-4 flex-shrink-0 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Check className=\"h-3 w-3 text-current\" weight=\"bold\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,UAAA,GAAa,MAAM,UAAA,CAGvB,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAClC,EAAA,uBAAO,GAAA,CAAC,mBAAA,CAAoB,IAAA,EAApB,EAAyB,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,GAAA,EAAU,CAAA;AAChG,CAAC;AACD,UAAA,CAAW,WAAA,GAAc,oBAAoB,IAAA,CAAK,WAAA;AAElD,MAAM,cAAA,GAAiB,MAAM,UAAA,CAG3B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAClC,EAAA,uBACE,GAAA;AAAA,IAAC,mBAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,iQAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,mBAAA,CAAoB,SAAA,EAApB,EAA8B,SAAA,EAAU,kCAAA,EACvC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,SAAA,EAAU,sBAAA,EAAuB,MAAA,EAAO,MAAA,EAAO,CAAA,EACxD;AAAA;AAAA,GACF;AAEJ,CAAC;AACD,cAAA,CAAe,WAAA,GAAc,oBAAoB,IAAA,CAAK,WAAA;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { Check } from '@phosphor-icons/react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-primary text-foreground ring-offset-background focus-visible:ring-accent-600 aspect-square h-4 w-4 shrink-0 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Check className=\"h-3 w-3 text-current\" weight=\"bold\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,UAAA,GAAa,MAAM,UAAA,CAGvB,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAClC,EAAA,uBAAO,GAAA,CAAC,mBAAA,CAAoB,IAAA,EAApB,EAAyB,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,GAAA,EAAU,CAAA;AAChG,CAAC;AACD,UAAA,CAAW,WAAA,GAAc,oBAAoB,IAAA,CAAK,WAAA;AAElD,MAAM,cAAA,GAAiB,MAAM,UAAA,CAG3B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAClC,EAAA,uBACE,GAAA;AAAA,IAAC,mBAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,4PAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,mBAAA,CAAoB,SAAA,EAApB,EAA8B,SAAA,EAAU,kCAAA,EACvC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,SAAA,EAAU,sBAAA,EAAuB,MAAA,EAAO,MAAA,EAAO,CAAA,EACxD;AAAA;AAAA,GACF;AAEJ,CAAC;AACD,cAAA,CAAe,WAAA,GAAc,oBAAoB,IAAA,CAAK,WAAA;;;;"}
@@ -95,7 +95,7 @@ const SidebarRoot = React.forwardRef(({ side = "left", variant = "default", clas
95
95
  {
96
96
  "data-sidebar": "sidebar",
97
97
  "data-mobile": "true",
98
- className: "bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden",
98
+ className: "bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",
99
99
  style: {
100
100
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE
101
101
  },
@@ -123,8 +123,8 @@ const SidebarRoot = React.forwardRef(({ side = "left", variant = "default", clas
123
123
  "div",
124
124
  {
125
125
  className: cn(
126
- "relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
127
- variant === "default" && "group-data-[state=collapsed]:w-[--sidebar-width-icon]",
126
+ "relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
127
+ variant === "default" && "group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]",
128
128
  variant === "hidden" && "group-data-[state=collapsed]:w-0",
129
129
  "group-data-[side=right]:rotate-180"
130
130
  )
@@ -134,14 +134,14 @@ const SidebarRoot = React.forwardRef(({ side = "left", variant = "default", clas
134
134
  "div",
135
135
  {
136
136
  className: cn(
137
- "fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
137
+ "fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
138
138
  side === "left" ? [
139
139
  "left-0",
140
- variant === "default" && "group-data-[state=collapsed]:w-[--sidebar-width-icon]",
140
+ variant === "default" && "group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]",
141
141
  variant === "hidden" && "group-data-[state=collapsed]:left-[calc(var(--sidebar-width)*-1)]"
142
142
  ] : [
143
143
  "right-0",
144
- variant === "default" && "group-data-[state=collapsed]:w-[--sidebar-width-icon]",
144
+ variant === "default" && "group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]",
145
145
  variant === "hidden" && "group-data-[state=collapsed]:right-[calc(var(--sidebar-width)*-1)]"
146
146
  ],
147
147
  "group-data-[side=left]:border-r group-data-[side=right]:border-l",
@@ -431,7 +431,7 @@ const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...
431
431
  /* @__PURE__ */ jsx(
432
432
  Skeleton,
433
433
  {
434
- className: "h-4 max-w-[--skeleton-width] flex-1",
434
+ className: "h-4 max-w-[var(--skeleton-width)] flex-1",
435
435
  "data-sidebar": "menu-skeleton-text",
436
436
  style: {
437
437
  "--skeleton-width": width
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client'\n\nimport { Sidebar as SidebarIcon } from '@phosphor-icons/react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useIsMobile } from '../../lib/useMobile'\nimport { Button } from '../Button'\nimport { Input } from '../Input'\nimport { Separator } from '../Separator'\nimport { SheetContent, SheetDescription, SheetHeader, SheetRoot, SheetTitle } from '../Sheet'\nimport { Skeleton } from '../Skeleton'\nimport { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '../Tooltip'\nimport { Typography } from '../Typography'\n\nimport { cn } from '@/lib/utils'\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 SidebarContext = {\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<SidebarContext | 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>(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {\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 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<SidebarContext>(\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 flex min-h-svh w-full', className)}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n})\nSidebarProvider.displayName = 'SidebarProvider'\n\nconst SidebarRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'default' | 'hidden'\n }\n>(({ side = 'left', variant = 'default', className, children, ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (isMobile) {\n return (\n <SheetRoot open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>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 </SheetRoot>\n )\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer text-sidebar-foreground hidden shadow-md md:block\"\n data-state={state}\n data-side={side}\n data-variant={variant}\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 variant === 'default' && 'group-data-[state=collapsed]:w-[--sidebar-width-icon]',\n variant === 'hidden' && 'group-data-[state=collapsed]:w-0',\n 'group-data-[side=right]:rotate-180',\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 ? [\n 'left-0',\n variant === 'default' && 'group-data-[state=collapsed]:w-[--sidebar-width-icon]',\n variant === 'hidden' && 'group-data-[state=collapsed]:left-[calc(var(--sidebar-width)*-1)]',\n ]\n : [\n 'right-0',\n variant === 'default' && 'group-data-[state=collapsed]:w-[--sidebar-width-icon]',\n variant === 'hidden' && 'group-data-[state=collapsed]:right-[calc(var(--sidebar-width)*-1)]',\n ],\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className,\n )}\n {...props}\n >\n <div data-sidebar=\"sidebar\" className=\"bg-sidebar flex h-full w-full flex-col\">\n {children}\n </div>\n </div>\n </div>\n )\n})\nSidebarRoot.displayName = 'SidebarRoot'\n\nconst SidebarTrigger = React.forwardRef<React.ComponentRef<typeof Button>, 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=\"text\"\n className={cn('text-primary-foreground h-8 w-8 p-1', className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n StartIcon={SidebarIcon}\n >\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\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 <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 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] 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-[variant=offcanvas]:hover:bg-sidebar group-data-[variant=offcanvas]:translate-x-0 group-data-[variant=offcanvas]:after:left-full',\n '[[data-side=left][data-variant=offcanvas]_&]:-right-2',\n '[[data-side=right][data-variant=offcanvas]_&]:-left-2',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarRail.displayName = 'SidebarRail'\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<'main'>>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarInset.displayName = 'SidebarInset'\n\nconst SidebarInput = React.forwardRef<React.ComponentRef<typeof Input>, React.ComponentProps<typeof Input>>(\n ({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n 'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarInput.displayName = 'SidebarInput'\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"header\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />\n})\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"footer\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />\n})\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, React.ComponentProps<typeof Separator>>(\n ({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n )\n },\n)\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ 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',\n 'group-data-[variant=default]:group-data-[state=collapsed]:overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ 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})\nSidebarGroup.displayName = 'SidebarGroup'\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'> & { asChild?: boolean }>(\n ({ className, asChild = false, children, ...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 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 transition-[margin,opacity] duration-200 ease-linear outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[state=collapsed]:group-data-[variant=hidden]:hidden',\n 'group-data-[state=collapsed]:group-data-[variant=default]:-mt-8 group-data-[state=collapsed]:group-data-[variant=default]:opacity-0',\n className,\n )}\n {...props}\n >\n {typeof children === 'string' ? (\n <Typography variant=\"label-md\" color=\"secondary\">\n {children}\n </Typography>\n ) : (\n children\n )}\n </Comp>\n )\n },\n)\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\nconst SidebarGroupAction = React.forwardRef<HTMLButtonElement, 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 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />\n ),\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(({ className, ...props }, ref) => (\n <ul ref={ref} data-sidebar=\"menu\" className={cn('flex w-full min-w-0 flex-col gap-1', className)} {...props} />\n))\nSidebarMenu.displayName = 'SidebarMenu'\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(({ className, ...props }, ref) => (\n <li ref={ref} data-sidebar=\"menu-item\" className={cn('group/menu-item relative', className)} {...props} />\n))\nSidebarMenuItem.displayName = 'SidebarMenuItem'\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 variant?: 'navigation-item' | 'element'\n }\n>(({ asChild = false, isActive = false, tooltip, className, children, variant = 'navigation-item', ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar()\n\n const sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full text-sm hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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=expanded]:hover:bg-sidebar-accent data-[state=expanded]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n 'navigation-item': 'h-8',\n element: 'group-data-[state=collapsed]:!p-0',\n },\n },\n defaultVariants: {\n variant: 'navigation-item',\n },\n },\n )\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant }), className)}\n {...props}\n >\n {children}\n </Comp>\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 <TooltipRoot>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltip} />\n </TooltipRoot>\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 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[state=collapsed]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=expanded]:opacity-100 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 'text-sidebar-foreground pointer-events-none absolute top-1.5 right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'group-data-[state=collapsed]:group-data-[variant=hidden]:hidden',\n 'group-data-[state=collapsed]:group-data-[variant=default]:opacity-0',\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((window.crypto.getRandomValues(new Uint32Array(1))[0] % 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 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n />\n ),\n)\nSidebarMenuSub.displayName = 'SidebarMenuSub'\n\nconst SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(({ ...props }, ref) => (\n <li ref={ref} {...props} />\n))\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem'\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<'a'> & {\n asChild?: boolean\n isActive?: boolean\n }\n>(({ asChild = false, isActive, className, children, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a'\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 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',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n >\n {typeof children === 'string' ? <Typography variant=\"body-md\">{children}</Typography> : children}\n </Comp>\n )\n})\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton'\n\nexport {\n SidebarRoot,\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;AAYA;AAEA;AACE;AACA;AACE;AAAmE;AAGrE;AACF;AAEA;AAQE;AACA;AAIA;AACA;AACA;AAAsB;AAElB;AACA;AACE;AAAqB;AAErB;AAAkB;AAIpB;AAAgG;AAClG;AACkB;AAIpB;AACE;AAAmE;AAIrE;AACE;AACE;AACE;AACA;AAAc;AAChB;AAGF;AACA;AAAgE;AAKlE;AAEA;AAA2B;AAClB;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AACyE;AAG3E;AAGM;AAAC;AAAA;AAEG;AACqB;AACK;AACrB;AACL;AAE0G;AAC5G;AACI;AAEH;AAAA;AAKX;AACA;AAEA;AAOE;AAEA;AACE;AAEI;AAAC;AAAA;AACc;AACD;AACF;AAER;AACqB;AACrB;AAEF;AAEA;AACE;AAAmB;AAC2B;AAChD;AACuD;AAAA;AAAA;AAE3D;AAIJ;AACE;AAAC;AAAA;AACC;AACU;AACE;AACD;AACG;AAGd;AAAA;AAAC;AAAA;AACY;AACT;AACyB;AACD;AACxB;AACF;AAAA;AACF;AACA;AAAC;AAAA;AACY;AACT;AAEI;AACE;AACyB;AACD;AAE1B;AACE;AACyB;AACD;AAC1B;AACJ;AACA;AACF;AACI;AAIJ;AAAA;AACF;AAAA;AAAA;AAGN;AACA;AAEA;AAA6B;AAEzB;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACL;AACsD;AAE5D;AACA;AAAc;AAChB;AACI;AACO;AAE6B;AAAA;AAC1C;AAGN;AACA;AAEA;AAA0B;AAEtB;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACD;AACD;AACH;AACK;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACW;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAA2B;AAEvB;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACF;AACA;AAEA;AACE;AACF;AACA;AAEA;AAA+B;AAE3B;AACE;AAAC;AAAA;AACC;AACa;AAC2C;AACpD;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACa;AACuD;AAChE;AAAA;AAGV;AACA;AAEA;AAAgC;AAE5B;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAOF;AAAA;AAEJ;AAGN;AACA;AAEA;AAAiC;AAE7B;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AAAkC;AAIlC;AACA;AAEA;AAGA;AAEA;AAGA;AAEA;AASE;AACA;AAEA;AAAkC;AAChC;AACA;AACY;AACC;AACY;AACV;AACX;AACF;AACiB;AACN;AACX;AACF;AAGF;AACE;AAAC;AAAA;AACC;AACa;AACA;AACkD;AAC3D;AAEH;AAAA;AAIL;AACE;AAAO;AAGT;AACE;AAAU;AACE;AACZ;AAGF;AAEI;AAAgC;AACoE;AAG1G;AACA;AAEA;AAOE;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AAEE;AACF;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAA+B;AAE3B;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAOE;AACE;AAAsF;AAGxF;AACE;AAAC;AAAA;AACC;AACa;AACyD;AAClE;AAEH;AAAsF;AACvF;AAAC;AAAA;AACW;AACG;AAEX;AACsB;AACtB;AAAA;AAEJ;AAAA;AAAA;AAGN;AACA;AAEA;AAA6B;AAEzB;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAGA;AAEA;AAOE;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACA;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAEoF;AAAA;AAG9F;AACA;;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client'\n\nimport { Sidebar as SidebarIcon } from '@phosphor-icons/react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useIsMobile } from '../../lib/useMobile'\nimport { Button } from '../Button'\nimport { Input } from '../Input'\nimport { Separator } from '../Separator'\nimport { SheetContent, SheetDescription, SheetHeader, SheetRoot, SheetTitle } from '../Sheet'\nimport { Skeleton } from '../Skeleton'\nimport { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '../Tooltip'\nimport { Typography } from '../Typography'\n\nimport { cn } from '@/lib/utils'\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 SidebarContext = {\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<SidebarContext | 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>(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {\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 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<SidebarContext>(\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 flex min-h-svh w-full', className)}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n})\nSidebarProvider.displayName = 'SidebarProvider'\n\nconst SidebarRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'default' | 'hidden'\n }\n>(({ side = 'left', variant = 'default', className, children, ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (isMobile) {\n return (\n <SheetRoot open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>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 </SheetRoot>\n )\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer text-sidebar-foreground hidden shadow-md md:block\"\n data-state={state}\n data-side={side}\n data-variant={variant}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n 'relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear',\n variant === 'default' && 'group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]',\n variant === 'hidden' && 'group-data-[state=collapsed]:w-0',\n 'group-data-[side=right]:rotate-180',\n )}\n />\n <div\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? [\n 'left-0',\n variant === 'default' && 'group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]',\n variant === 'hidden' && 'group-data-[state=collapsed]:left-[calc(var(--sidebar-width)*-1)]',\n ]\n : [\n 'right-0',\n variant === 'default' && 'group-data-[state=collapsed]:w-[var(--sidebar-width-icon)]',\n variant === 'hidden' && 'group-data-[state=collapsed]:right-[calc(var(--sidebar-width)*-1)]',\n ],\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className,\n )}\n {...props}\n >\n <div data-sidebar=\"sidebar\" className=\"bg-sidebar flex h-full w-full flex-col\">\n {children}\n </div>\n </div>\n </div>\n )\n})\nSidebarRoot.displayName = 'SidebarRoot'\n\nconst SidebarTrigger = React.forwardRef<React.ComponentRef<typeof Button>, 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=\"text\"\n className={cn('text-primary-foreground h-8 w-8 p-1', className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n StartIcon={SidebarIcon}\n >\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\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 <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 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] 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-[variant=offcanvas]:hover:bg-sidebar group-data-[variant=offcanvas]:translate-x-0 group-data-[variant=offcanvas]:after:left-full',\n '[[data-side=left][data-variant=offcanvas]_&]:-right-2',\n '[[data-side=right][data-variant=offcanvas]_&]:-left-2',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarRail.displayName = 'SidebarRail'\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<'main'>>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarInset.displayName = 'SidebarInset'\n\nconst SidebarInput = React.forwardRef<React.ComponentRef<typeof Input>, React.ComponentProps<typeof Input>>(\n ({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n 'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarInput.displayName = 'SidebarInput'\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"header\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />\n})\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"footer\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />\n})\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, React.ComponentProps<typeof Separator>>(\n ({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n )\n },\n)\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ 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',\n 'group-data-[variant=default]:group-data-[state=collapsed]:overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ 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})\nSidebarGroup.displayName = 'SidebarGroup'\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'> & { asChild?: boolean }>(\n ({ className, asChild = false, children, ...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 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 transition-[margin,opacity] duration-200 ease-linear outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[state=collapsed]:group-data-[variant=hidden]:hidden',\n 'group-data-[state=collapsed]:group-data-[variant=default]:-mt-8 group-data-[state=collapsed]:group-data-[variant=default]:opacity-0',\n className,\n )}\n {...props}\n >\n {typeof children === 'string' ? (\n <Typography variant=\"label-md\" color=\"secondary\">\n {children}\n </Typography>\n ) : (\n children\n )}\n </Comp>\n )\n },\n)\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\nconst SidebarGroupAction = React.forwardRef<HTMLButtonElement, 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 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />\n ),\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(({ className, ...props }, ref) => (\n <ul ref={ref} data-sidebar=\"menu\" className={cn('flex w-full min-w-0 flex-col gap-1', className)} {...props} />\n))\nSidebarMenu.displayName = 'SidebarMenu'\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(({ className, ...props }, ref) => (\n <li ref={ref} data-sidebar=\"menu-item\" className={cn('group/menu-item relative', className)} {...props} />\n))\nSidebarMenuItem.displayName = 'SidebarMenuItem'\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 variant?: 'navigation-item' | 'element'\n }\n>(({ asChild = false, isActive = false, tooltip, className, children, variant = 'navigation-item', ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar()\n\n const sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full text-sm hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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=expanded]:hover:bg-sidebar-accent data-[state=expanded]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n 'navigation-item': 'h-8',\n element: 'group-data-[state=collapsed]:!p-0',\n },\n },\n defaultVariants: {\n variant: 'navigation-item',\n },\n },\n )\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant }), className)}\n {...props}\n >\n {children}\n </Comp>\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 <TooltipRoot>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltip} />\n </TooltipRoot>\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 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[state=collapsed]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=expanded]:opacity-100 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 'text-sidebar-foreground pointer-events-none absolute top-1.5 right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'group-data-[state=collapsed]:group-data-[variant=hidden]:hidden',\n 'group-data-[state=collapsed]:group-data-[variant=default]:opacity-0',\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((window.crypto.getRandomValues(new Uint32Array(1))[0] % 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-[var(--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 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n />\n ),\n)\nSidebarMenuSub.displayName = 'SidebarMenuSub'\n\nconst SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(({ ...props }, ref) => (\n <li ref={ref} {...props} />\n))\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem'\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<'a'> & {\n asChild?: boolean\n isActive?: boolean\n }\n>(({ asChild = false, isActive, className, children, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a'\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 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',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n 'group-data-[state=collapsed]:hidden',\n className,\n )}\n {...props}\n >\n {typeof children === 'string' ? <Typography variant=\"body-md\">{children}</Typography> : children}\n </Comp>\n )\n})\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton'\n\nexport {\n SidebarRoot,\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;AAYA;AAEA;AACE;AACA;AACE;AAAmE;AAGrE;AACF;AAEA;AAQE;AACA;AAIA;AACA;AACA;AAAsB;AAElB;AACA;AACE;AAAqB;AAErB;AAAkB;AAIpB;AAAgG;AAClG;AACkB;AAIpB;AACE;AAAmE;AAIrE;AACE;AACE;AACE;AACA;AAAc;AAChB;AAGF;AACA;AAAgE;AAKlE;AAEA;AAA2B;AAClB;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AACyE;AAG3E;AAGM;AAAC;AAAA;AAEG;AACqB;AACK;AACrB;AACL;AAE0G;AAC5G;AACI;AAEH;AAAA;AAKX;AACA;AAEA;AAOE;AAEA;AACE;AAEI;AAAC;AAAA;AACc;AACD;AACF;AAER;AACqB;AACrB;AAEF;AAEA;AACE;AAAmB;AAC2B;AAChD;AACuD;AAAA;AAAA;AAE3D;AAIJ;AACE;AAAC;AAAA;AACC;AACU;AACE;AACD;AACG;AAGd;AAAA;AAAC;AAAA;AACY;AACT;AACyB;AACD;AACxB;AACF;AAAA;AACF;AACA;AAAC;AAAA;AACY;AACT;AAEI;AACE;AACyB;AACD;AAE1B;AACE;AACyB;AACD;AAC1B;AACJ;AACA;AACF;AACI;AAIJ;AAAA;AACF;AAAA;AAAA;AAGN;AACA;AAEA;AAA6B;AAEzB;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACL;AACsD;AAE5D;AACA;AAAc;AAChB;AACI;AACO;AAE6B;AAAA;AAC1C;AAGN;AACA;AAEA;AAA0B;AAEtB;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACD;AACD;AACH;AACK;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACW;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAA2B;AAEvB;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACF;AACA;AAEA;AACE;AACF;AACA;AAEA;AAA+B;AAE3B;AACE;AAAC;AAAA;AACC;AACa;AAC2C;AACpD;AAAA;AACN;AAGN;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AACE;AACE;AAAC;AAAA;AACC;AACa;AACuD;AAChE;AAAA;AAGV;AACA;AAEA;AAAgC;AAE5B;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAOF;AAAA;AAEJ;AAGN;AACA;AAEA;AAAiC;AAE7B;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAAA;AACN;AAGN;AACA;AAEA;AAAkC;AAIlC;AACA;AAEA;AAGA;AAEA;AAGA;AAEA;AASE;AACA;AAEA;AAAkC;AAChC;AACA;AACY;AACC;AACY;AACV;AACX;AACF;AACiB;AACN;AACX;AACF;AAGF;AACE;AAAC;AAAA;AACC;AACa;AACA;AACkD;AAC3D;AAEH;AAAA;AAIL;AACE;AAAO;AAGT;AACE;AAAU;AACE;AACZ;AAGF;AAEI;AAAgC;AACoE;AAG1G;AACA;AAEA;AAOE;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AAEE;AACF;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAA+B;AAE3B;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAOE;AACE;AAAsF;AAGxF;AACE;AAAC;AAAA;AACC;AACa;AACyD;AAClE;AAEH;AAAsF;AACvF;AAAC;AAAA;AACW;AACG;AAEX;AACsB;AACtB;AAAA;AAEJ;AAAA;AAAA;AAGN;AACA;AAEA;AAA6B;AAEzB;AAAC;AAAA;AACC;AACa;AACF;AACT;AACA;AACA;AACF;AACI;AAAA;AAGV;AACA;AAEA;AAGA;AAEA;AAOE;AAEA;AACE;AAAC;AAAA;AACC;AACa;AACA;AACF;AACT;AACA;AACA;AACA;AACF;AACI;AAEoF;AAAA;AAG9F;AACA;;"}
package/dist/theme.css CHANGED
@@ -1,130 +1,130 @@
1
1
  @theme {
2
2
  --font-family-sans: var(--font-onest), sans-serif;
3
3
  --font-family-onest: var(--font-onest), sans-serif;
4
-
5
- --color-foreground: #1D1D1B;
6
- --color-white: #FFFFFF;
7
- --color-card: #F7F7F6;
8
- --color-card-foreground: #1D1D1B;
9
- --color-popover: #F7F7F6;
10
- --color-popover-foreground: #1D1D1B;
11
-
12
- --color-neutral-50: #F7F7F6;
13
- --color-neutral-100: #E4E4E3;
14
- --color-neutral-200: #C9C9C6;
15
- --color-neutral-300: #A7A6A1;
16
- --color-neutral-400: #84837D;
4
+
5
+ --color-foreground: #1d1d1b;
6
+ --color-white: #ffffff;
7
+ --color-card: #f7f7f6;
8
+ --color-card-foreground: #1d1d1b;
9
+ --color-popover: #f7f7f6;
10
+ --color-popover-foreground: #1d1d1b;
11
+
12
+ --color-neutral-50: #f7f7f6;
13
+ --color-neutral-100: #e4e4e3;
14
+ --color-neutral-200: #c9c9c6;
15
+ --color-neutral-300: #a7a6a1;
16
+ --color-neutral-400: #84837d;
17
17
  --color-neutral-500: #696963;
18
- --color-neutral-600: #53534E;
18
+ --color-neutral-600: #53534e;
19
19
  --color-neutral-700: #454440;
20
20
  --color-neutral-800: #393936;
21
- --color-neutral-900: #32322F;
22
- --color-neutral-950: #1D1D1B;
21
+ --color-neutral-900: #32322f;
22
+ --color-neutral-950: #1d1d1b;
23
23
  --color-neutral: #696963;
24
- --color-neutral-foreground: #F7F7F6;
25
-
26
- --color-primary-50: #FFF0DE;
27
- --color-primary-100: #FFE182;
28
- --color-primary-200: #FFD685;
29
- --color-primary-300: #FFCE59;
30
- --color-primary-400: #FFC92F;
31
- --color-primary-500: #FBBA00;
32
- --color-primary-600: #F1A100;
33
- --color-primary-700: #F8A800;
34
- --color-primary-800: #FAA100;
35
- --color-primary-900: #F19700;
36
- --color-primary-950: #ED8C00;
37
- --color-primary: #FBBA00;
38
- --color-primary-foreground: #1D1D1B;
39
-
40
- --color-accent-50: #FFD5A8;
41
- --color-accent-100: #FFCC93;
42
- --color-accent-200: #FFB86A;
43
- --color-accent-300: #FFA542;
44
- --color-accent-400: #FF9119;
45
- --color-accent-500: #F77D00;
46
- --color-accent-600: #D57000;
47
- --color-accent-700: #BC6200;
48
- --color-accent-800: #A35500;
24
+ --color-neutral-foreground: #f7f7f6;
25
+
26
+ --color-primary-50: #fff0de;
27
+ --color-primary-100: #ffe182;
28
+ --color-primary-200: #ffd685;
29
+ --color-primary-300: #ffce59;
30
+ --color-primary-400: #ffc92f;
31
+ --color-primary-500: #fbba00;
32
+ --color-primary-600: #f1a100;
33
+ --color-primary-700: #f8a800;
34
+ --color-primary-800: #faa100;
35
+ --color-primary-900: #f19700;
36
+ --color-primary-950: #ed8c00;
37
+ --color-primary: #fbba00;
38
+ --color-primary-foreground: #1d1d1b;
39
+
40
+ --color-accent-50: #ffd5a8;
41
+ --color-accent-100: #ffcc93;
42
+ --color-accent-200: #ffb86a;
43
+ --color-accent-300: #ffa542;
44
+ --color-accent-400: #ff9119;
45
+ --color-accent-500: #f77d00;
46
+ --color-accent-600: #d57000;
47
+ --color-accent-700: #bc6200;
48
+ --color-accent-800: #a35500;
49
49
  --color-accent-900: #894800;
50
- --color-accent-950: #7C4100;
51
- --color-accent: #F77D00;
52
- --color-accent-foreground: #1D1D1B;
53
-
54
- --color-success-50: #F2FBF2;
55
- --color-success-100: #E1F8E0;
56
- --color-success-200: #C5EFC3;
57
- --color-success-300: #90E194;
58
- --color-success-400: #5FCB5D;
59
- --color-success-500: #2EC03C;
50
+ --color-accent-950: #7c4100;
51
+ --color-accent: #f77d00;
52
+ --color-accent-foreground: #1d1d1b;
53
+
54
+ --color-success-50: #f2fbf2;
55
+ --color-success-100: #e1f8e0;
56
+ --color-success-200: #c5efc3;
57
+ --color-success-300: #90e194;
58
+ --color-success-400: #5fcb5d;
59
+ --color-success-500: #2ec03c;
60
60
  --color-success-600: #299128;
61
61
  --color-success-700: #247223;
62
- --color-success-800: #215B20;
63
- --color-success-900: #1C4B1D;
64
- --color-success-950: #0A290B;
62
+ --color-success-800: #215b20;
63
+ --color-success-900: #1c4b1d;
64
+ --color-success-950: #0a290b;
65
65
  --color-success: #247223;
66
- --color-success-foreground: #FFFFFF;
67
-
68
- --color-warning-50: #FCF5EE;
69
- --color-warning-100: #F7E4CE;
70
- --color-warning-200: #EEC799;
71
- --color-warning-300: #E6A563;
72
- --color-warning-400: #DE8334;
73
- --color-warning-500: #D76929;
74
- --color-warning-600: #BE4D21;
75
- --color-warning-700: #9E331F;
76
- --color-warning-800: #812B1F;
77
- --color-warning-900: #6B251C;
78
- --color-warning-950: #3D100B;
79
- --color-warning: #D76929;
80
- --color-warning-foreground: #FFFFFF;
81
-
82
- --color-error-50: #FEF2F2;
83
- --color-error-100: #FEE2E2;
84
- --color-error-200: #FFC9C9;
85
- --color-error-300: #FDA4A4;
86
- --color-error-400: #FA6F70;
87
- --color-error-500: #F13637;
88
- --color-error-600: #DF2324;
89
- --color-error-700: #BC191A;
90
- --color-error-800: #9B191A;
91
- --color-error-900: #811B1C;
66
+ --color-success-foreground: #ffffff;
67
+
68
+ --color-warning-50: #fcf5ee;
69
+ --color-warning-100: #f7e4ce;
70
+ --color-warning-200: #eec799;
71
+ --color-warning-300: #e6a563;
72
+ --color-warning-400: #de8334;
73
+ --color-warning-500: #d76929;
74
+ --color-warning-600: #be4d21;
75
+ --color-warning-700: #9e331f;
76
+ --color-warning-800: #812b1f;
77
+ --color-warning-900: #6b251c;
78
+ --color-warning-950: #3d100b;
79
+ --color-warning: #d76929;
80
+ --color-warning-foreground: #ffffff;
81
+
82
+ --color-error-50: #fef2f2;
83
+ --color-error-100: #fee2e2;
84
+ --color-error-200: #ffc9c9;
85
+ --color-error-300: #fda4a4;
86
+ --color-error-400: #fa6f70;
87
+ --color-error-500: #f13637;
88
+ --color-error-600: #df2324;
89
+ --color-error-700: #bc191a;
90
+ --color-error-800: #9b191a;
91
+ --color-error-900: #811b1c;
92
92
  --color-error-950: #460909;
93
- --color-error: #BC191A;
94
- --color-error-foreground: #FFFFFF;
95
-
96
- --color-background-50: #FFFFFF;
97
- --color-background-100: #FBFBFB;
98
- --color-background-200: #FEF0D6;
99
- --color-background-300: #FDE1AE;
100
- --color-background-400: #FCD386;
101
- --color-background-500: #FBC45F;
102
- --color-background-600: #FAB637;
103
- --color-background-700: #F9A70F;
104
- --color-background-800: #DA8F05;
105
- --color-background-900: #B27504;
106
- --color-background-950: #9E6804;
107
- --color-background: #FBC45F;
108
- --color-background-foreground: #1D1D1B;
109
-
110
- --color-sidebar: #FFFFFF;
111
- --color-sidebar-foreground: #1D1D1B;
112
- --color-sidebar-primary: #F7F7F6;
113
- --color-sidebar-primary-foreground: #1D1D1B;
114
- --color-sidebar-accent: #F7F7F6;
115
- --color-sidebar-accent-foreground: #1D1D1B;
116
- --color-sidebar-border: #E4E4E3;
117
- --color-sidebar-ring: #FAB700;
118
-
119
- --color-border: #E4E4E3;
120
- --color-input: #F7F7F6;
121
- --color-ring: #FAB700;
122
-
93
+ --color-error: #bc191a;
94
+ --color-error-foreground: #ffffff;
95
+
96
+ --color-background-50: #ffffff;
97
+ --color-background-100: #fbfbfb;
98
+ --color-background-200: #fef0d6;
99
+ --color-background-300: #fde1ae;
100
+ --color-background-400: #fcd386;
101
+ --color-background-500: #fbc45f;
102
+ --color-background-600: #fab637;
103
+ --color-background-700: #f9a70f;
104
+ --color-background-800: #da8f05;
105
+ --color-background-900: #b27504;
106
+ --color-background-950: #9e6804;
107
+ --color-background: #fbc45f;
108
+ --color-background-foreground: #1d1d1b;
109
+
110
+ --color-sidebar: #ffffff;
111
+ --color-sidebar-foreground: #1d1d1b;
112
+ --color-sidebar-primary: #f7f7f6;
113
+ --color-sidebar-primary-foreground: #1d1d1b;
114
+ --color-sidebar-accent: #f7f7f6;
115
+ --color-sidebar-accent-foreground: #1d1d1b;
116
+ --color-sidebar-border: #e4e4e3;
117
+ --color-sidebar-ring: #fab700;
118
+
119
+ --color-border: #e4e4e3;
120
+ --color-input: #f7f7f6;
121
+ --color-ring: #fab700;
122
+
123
123
  --shadow-tooltip: 0 2px 5px 2px rgba(0, 0, 0, 0.1);
124
124
  --shadow-toast: 0 4px 12px #0000001a;
125
-
125
+
126
126
  --width-1_5: 1.5px;
127
-
127
+
128
128
  --animate-marquee: marquee 60s infinite linear;
129
129
  --animate-marquee-vertical: marquee-vertical 60s linear infinite;
130
130
  --animate-accordion-down: accordion-down 0.2s ease-out;
@@ -135,51 +135,115 @@
135
135
  --animate-indeterminate: indeterminate 2s infinite linear;
136
136
 
137
137
  @keyframes marquee {
138
- from { transform: translateX(0); }
139
- to { transform: translateX(calc(-100% - var(--gap))); }
138
+ from {
139
+ transform: translateX(0);
140
+ }
141
+ to {
142
+ transform: translateX(calc(-100% - var(--gap)));
143
+ }
140
144
  }
141
145
 
142
146
  @keyframes marquee-vertical {
143
- from { transform: translateY(0); }
144
- to { transform: translateY(calc(-100% - var(--gap))); }
147
+ from {
148
+ transform: translateY(0);
149
+ }
150
+ to {
151
+ transform: translateY(calc(-100% - var(--gap)));
152
+ }
145
153
  }
146
154
 
147
155
  @keyframes accordion-down {
148
- from { height: 0; }
149
- to { height: var(--radix-accordion-content-height); }
156
+ from {
157
+ height: 0;
158
+ }
159
+ to {
160
+ height: var(--radix-accordion-content-height);
161
+ }
150
162
  }
151
163
 
152
164
  @keyframes accordion-up {
153
- from { height: var(--radix-accordion-content-height); }
154
- to { height: 0; }
165
+ from {
166
+ height: var(--radix-accordion-content-height);
167
+ }
168
+ to {
169
+ height: 0;
170
+ }
155
171
  }
156
172
 
157
173
  @keyframes shine {
158
- 0% { background-position: 200% 0; }
159
- 100% { background-position: -100% 0; }
174
+ 0% {
175
+ background-position: 200% 0;
176
+ }
177
+ 100% {
178
+ background-position: -100% 0;
179
+ }
160
180
  }
161
181
 
162
182
  @keyframes shine-infinite {
163
- 0% { background-position: 200% 0; }
164
- 10% { background-position: -100% 0; }
165
- 100% { background-position: -100% 0; }
183
+ 0% {
184
+ background-position: 200% 0;
185
+ }
186
+ 10% {
187
+ background-position: -100% 0;
188
+ }
189
+ 100% {
190
+ background-position: -100% 0;
191
+ }
166
192
  }
167
193
 
168
194
  @keyframes icon-down-up {
169
- 0% { transform: translateY(0%); }
170
- 50% { transform: translateY(100%); }
171
- 50.01% { transform: translateY(-100%); }
172
- 100% { transform: translateY(0%); }
195
+ 0% {
196
+ transform: translateY(0%);
197
+ }
198
+ 50% {
199
+ transform: translateY(100%);
200
+ }
201
+ 50.01% {
202
+ transform: translateY(-100%);
203
+ }
204
+ 100% {
205
+ transform: translateY(0%);
206
+ }
173
207
  }
174
208
 
175
209
  @keyframes indeterminate {
176
- 0% { transform: translateX(-100%); }
177
- 50% { transform: translateX(0); }
178
- 100% { transform: translateX(100%); }
210
+ 0% {
211
+ transform: translateX(-100%);
212
+ }
213
+ 50% {
214
+ transform: translateX(0);
215
+ }
216
+ 100% {
217
+ transform: translateX(100%);
218
+ }
179
219
  }
180
220
  }
181
221
 
182
222
  @font-face {
183
223
  font-family: 'Onest';
184
224
  src: url('./fonts/Onest.woff2');
185
- }
225
+ }
226
+
227
+ @layer base {
228
+ input[type='number']::-webkit-inner-spin-button,
229
+ input[type='number']::-webkit-outer-spin-button {
230
+ -webkit-appearance: none;
231
+ margin: 0;
232
+ }
233
+ * {
234
+ @apply border-border outline-ring/50;
235
+ }
236
+ body {
237
+ @apply bg-background text-foreground;
238
+ }
239
+ }
240
+
241
+ @layer utilities {
242
+ .scrollbar-none::-webkit-scrollbar {
243
+ width: 0px;
244
+ }
245
+ }
246
+
247
+ :root {
248
+ --font-onest: 'Onest';
249
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "periplo-ui",
3
3
  "description": "IATI UI library",
4
4
  "private": false,
5
- "version": "3.27.1",
5
+ "version": "3.27.3",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -130,6 +130,7 @@
130
130
  "react-hook-form": "7.59.0",
131
131
  "sonner": "2.0.5",
132
132
  "tailwind-merge": "3.3.1",
133
+ "tw-animate-css": "^1.3.5",
133
134
  "zod": "3.25.67"
134
135
  }
135
136
  }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}