@locusgraph/components 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/action/button-group.js +45 -17
  2. package/dist/action/button.js +44 -27
  3. package/dist/action/toggle-group.js +176 -12
  4. package/dist/action/toggle.js +70 -17
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.js +33 -20
  7. package/dist/display/chart/chart-container.js +205 -45
  8. package/dist/display/chart/chart-legend.js +79 -14
  9. package/dist/display/chart/chart-tooltip.js +211 -40
  10. package/dist/display/chat/attachment/attachment-parts.js +56 -13
  11. package/dist/display/chat/attachment/attachment.js +70 -28
  12. package/dist/display/chat/bubble.js +80 -37
  13. package/dist/display/chat/marker.js +44 -15
  14. package/dist/display/chat/message-scroller.js +276 -14
  15. package/dist/display/chat/message.js +58 -13
  16. package/dist/display/content/item.js +134 -47
  17. package/dist/display/content/kbd.js +19 -5
  18. package/dist/display/media/aspect-ratio.js +27 -3
  19. package/dist/display/media/carousel-controls.js +162 -11
  20. package/dist/display/media/carousel.js +325 -65
  21. package/dist/display/rule-grid/rule-grid.js +86 -29
  22. package/dist/display/separator.js +56 -3
  23. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
  24. package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
  25. package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
  26. package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
  27. package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
  28. package/dist/display/skeletons/skeleton-parts.js +22 -6
  29. package/dist/display/status/alert.js +44 -18
  30. package/dist/display/status/empty.js +69 -22
  31. package/dist/display/status/progress.js +116 -16
  32. package/dist/display/status/skeleton.js +10 -3
  33. package/dist/display/status/spinner.js +11 -3
  34. package/dist/display/table.js +77 -17
  35. package/dist/feedback/toaster.js +98 -21
  36. package/dist/form/advanced/calendar-day-button.js +89 -12
  37. package/dist/form/advanced/calendar.js +349 -56
  38. package/dist/form/advanced/combobox/combobox-chips.js +151 -8
  39. package/dist/form/advanced/combobox/combobox-items.js +239 -14
  40. package/dist/form/advanced/combobox/combobox.js +386 -13
  41. package/dist/form/advanced/input-otp.js +201 -11
  42. package/dist/form/choice/checkbox.js +58 -3
  43. package/dist/form/choice/radio-group.js +94 -5
  44. package/dist/form/choice/select.js +479 -25
  45. package/dist/form/choice/slider.js +118 -4
  46. package/dist/form/choice/switch.js +53 -3
  47. package/dist/form/field/field-error.js +34 -14
  48. package/dist/form/field/field-separator.js +19 -3
  49. package/dist/form/field/field-set.js +21 -5
  50. package/dist/form/field/field-text.js +28 -7
  51. package/dist/form/field/field.js +43 -25
  52. package/dist/form/hook-form/form.js +338 -40
  53. package/dist/form/input-group.js +297 -47
  54. package/dist/form/input.js +13 -3
  55. package/dist/form/label.js +42 -3
  56. package/dist/form/native-select.js +39 -7
  57. package/dist/form/textarea.js +11 -3
  58. package/dist/layout/accordion.js +165 -8
  59. package/dist/layout/collapsible.js +75 -7
  60. package/dist/layout/resizable.js +122 -7
  61. package/dist/layout/scroll/direction.js +25 -3
  62. package/dist/layout/scroll/scroll-area.js +138 -5
  63. package/dist/layout/sidebar/sidebar-context.js +184 -51
  64. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  65. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  66. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  67. package/dist/layout/sidebar/sidebar.js +384 -28
  68. package/dist/layout/tabs.js +183 -18
  69. package/dist/layout/use-mobile.js +11 -11
  70. package/dist/navigation/breadcrumb.js +82 -17
  71. package/dist/navigation/menubar/menubar-items.js +322 -16
  72. package/dist/navigation/menubar/menubar-sub.js +125 -7
  73. package/dist/navigation/menubar/menubar.js +213 -13
  74. package/dist/navigation/navigation-menu.js +90 -18
  75. package/dist/navigation/pagination.js +91 -20
  76. package/dist/overlay/alert-dialog.js +485 -26
  77. package/dist/overlay/context-menu/context-menu-items.js +322 -16
  78. package/dist/overlay/context-menu/context-menu-sub.js +125 -7
  79. package/dist/overlay/context-menu/context-menu.js +140 -11
  80. package/dist/overlay/dialog.js +405 -24
  81. package/dist/overlay/floating/command.js +423 -20
  82. package/dist/overlay/floating/drawer.js +354 -22
  83. package/dist/overlay/floating/hover-card.js +107 -7
  84. package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
  85. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  86. package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
  87. package/dist/overlay/menu/dropdown-menu.js +147 -12
  88. package/dist/overlay/popover.js +106 -7
  89. package/dist/overlay/sheet.js +379 -26
  90. package/dist/overlay/tooltip.js +145 -9
  91. package/dist/shell/app-header.js +29 -5
  92. package/dist/shell/app-shell.js +19 -3
  93. package/dist/shell/breadcrumbs.js +46 -14
  94. package/dist/shell/docs/docs-header.js +210 -10
  95. package/dist/shell/docs/docs-shell.js +36 -3
  96. package/dist/shell/docs/docs-sidebar.js +41 -7
  97. package/dist/shell/docs/on-this-page.js +78 -7
  98. package/dist/shell/docs/use-active-section.js +44 -42
  99. package/dist/shell/navigation/app-sidebar.js +66 -6
  100. package/dist/shell/navigation/nav-group.js +53 -11
  101. package/dist/shell/theme-toggle.js +51 -4
  102. package/package.json +2 -2
@@ -1,23 +1,223 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { cn } from "cn";
4
5
  import * as MenubarPrimitive from "radix-ui/menubar";
5
- function Menubar({ className, ...props }) {
6
- return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn("flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs", className), ...props }));
6
+ import * as React from "react";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ function Menubar(t0) {
9
+ const $ = _c(8);
10
+ let className;
11
+ let props;
12
+ if ($[0] !== t0) {
13
+ ({
14
+ className,
15
+ ...props
16
+ } = t0);
17
+ $[0] = t0;
18
+ $[1] = className;
19
+ $[2] = props;
20
+ } else {
21
+ className = $[1];
22
+ props = $[2];
23
+ }
24
+ let t1;
25
+ if ($[3] !== className) {
26
+ t1 = cn("flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs", className);
27
+ $[3] = className;
28
+ $[4] = t1;
29
+ } else {
30
+ t1 = $[4];
31
+ }
32
+ let t2;
33
+ if ($[5] !== props || $[6] !== t1) {
34
+ t2 = /*#__PURE__*/_jsx(MenubarPrimitive.Root, {
35
+ "data-slot": "menubar",
36
+ className: t1,
37
+ ...props
38
+ });
39
+ $[5] = props;
40
+ $[6] = t1;
41
+ $[7] = t2;
42
+ } else {
43
+ t2 = $[7];
44
+ }
45
+ return t2;
7
46
  }
8
- function MenubarMenu({ ...props }) {
9
- return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
47
+ function MenubarMenu(t0) {
48
+ const $ = _c(4);
49
+ let props;
50
+ if ($[0] !== t0) {
51
+ ({
52
+ ...props
53
+ } = t0);
54
+ $[0] = t0;
55
+ $[1] = props;
56
+ } else {
57
+ props = $[1];
58
+ }
59
+ let t1;
60
+ if ($[2] !== props) {
61
+ t1 = /*#__PURE__*/_jsx(MenubarPrimitive.Menu, {
62
+ "data-slot": "menubar-menu",
63
+ ...props
64
+ });
65
+ $[2] = props;
66
+ $[3] = t1;
67
+ } else {
68
+ t1 = $[3];
69
+ }
70
+ return t1;
10
71
  }
11
- function MenubarGroup({ ...props }) {
12
- return _jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
72
+ function MenubarGroup(t0) {
73
+ const $ = _c(4);
74
+ let props;
75
+ if ($[0] !== t0) {
76
+ ({
77
+ ...props
78
+ } = t0);
79
+ $[0] = t0;
80
+ $[1] = props;
81
+ } else {
82
+ props = $[1];
83
+ }
84
+ let t1;
85
+ if ($[2] !== props) {
86
+ t1 = /*#__PURE__*/_jsx(MenubarPrimitive.Group, {
87
+ "data-slot": "menubar-group",
88
+ ...props
89
+ });
90
+ $[2] = props;
91
+ $[3] = t1;
92
+ } else {
93
+ t1 = $[3];
94
+ }
95
+ return t1;
13
96
  }
14
- function MenubarPortal({ ...props }) {
15
- return _jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
97
+ function MenubarPortal(t0) {
98
+ const $ = _c(4);
99
+ let props;
100
+ if ($[0] !== t0) {
101
+ ({
102
+ ...props
103
+ } = t0);
104
+ $[0] = t0;
105
+ $[1] = props;
106
+ } else {
107
+ props = $[1];
108
+ }
109
+ let t1;
110
+ if ($[2] !== props) {
111
+ t1 = /*#__PURE__*/_jsx(MenubarPrimitive.Portal, {
112
+ "data-slot": "menubar-portal",
113
+ ...props
114
+ });
115
+ $[2] = props;
116
+ $[3] = t1;
117
+ } else {
118
+ t1 = $[3];
119
+ }
120
+ return t1;
16
121
  }
17
- function MenubarTrigger({ className, ...props }) {
18
- return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props }));
122
+ function MenubarTrigger(t0) {
123
+ const $ = _c(8);
124
+ let className;
125
+ let props;
126
+ if ($[0] !== t0) {
127
+ ({
128
+ className,
129
+ ...props
130
+ } = t0);
131
+ $[0] = t0;
132
+ $[1] = className;
133
+ $[2] = props;
134
+ } else {
135
+ className = $[1];
136
+ props = $[2];
137
+ }
138
+ let t1;
139
+ if ($[3] !== className) {
140
+ t1 = cn("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className);
141
+ $[3] = className;
142
+ $[4] = t1;
143
+ } else {
144
+ t1 = $[4];
145
+ }
146
+ let t2;
147
+ if ($[5] !== props || $[6] !== t1) {
148
+ t2 = /*#__PURE__*/_jsx(MenubarPrimitive.Trigger, {
149
+ "data-slot": "menubar-trigger",
150
+ className: t1,
151
+ ...props
152
+ });
153
+ $[5] = props;
154
+ $[6] = t1;
155
+ $[7] = t2;
156
+ } else {
157
+ t2 = $[7];
158
+ }
159
+ return t2;
19
160
  }
20
- function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 6, ...props }) {
21
- return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
161
+ function MenubarContent(t0) {
162
+ const $ = _c(14);
163
+ let className;
164
+ let props;
165
+ let t1;
166
+ let t2;
167
+ let t3;
168
+ if ($[0] !== t0) {
169
+ ({
170
+ className,
171
+ align: t1,
172
+ alignOffset: t2,
173
+ sideOffset: t3,
174
+ ...props
175
+ } = t0);
176
+ $[0] = t0;
177
+ $[1] = className;
178
+ $[2] = props;
179
+ $[3] = t1;
180
+ $[4] = t2;
181
+ $[5] = t3;
182
+ } else {
183
+ className = $[1];
184
+ props = $[2];
185
+ t1 = $[3];
186
+ t2 = $[4];
187
+ t3 = $[5];
188
+ }
189
+ const align = t1 === undefined ? "start" : t1;
190
+ const alignOffset = t2 === undefined ? -4 : t2;
191
+ const sideOffset = t3 === undefined ? 6 : t3;
192
+ let t4;
193
+ if ($[6] !== className) {
194
+ t4 = cn("z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className);
195
+ $[6] = className;
196
+ $[7] = t4;
197
+ } else {
198
+ t4 = $[7];
199
+ }
200
+ let t5;
201
+ if ($[8] !== align || $[9] !== alignOffset || $[10] !== props || $[11] !== sideOffset || $[12] !== t4) {
202
+ t5 = /*#__PURE__*/_jsx(MenubarPortal, {
203
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.Content, {
204
+ "data-slot": "menubar-content",
205
+ align: align,
206
+ alignOffset: alignOffset,
207
+ sideOffset: sideOffset,
208
+ className: t4,
209
+ ...props
210
+ })
211
+ });
212
+ $[8] = align;
213
+ $[9] = alignOffset;
214
+ $[10] = props;
215
+ $[11] = sideOffset;
216
+ $[12] = t4;
217
+ $[13] = t5;
218
+ } else {
219
+ t5 = $[13];
220
+ }
221
+ return t5;
22
222
  }
23
223
  export { Menubar, MenubarContent, MenubarGroup, MenubarMenu, MenubarPortal, MenubarTrigger };
@@ -1,31 +1,103 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
3
2
  import { cva } from "class-variance-authority";
4
3
  import { cn } from "cn";
5
4
  import * as NavigationMenuPrimitive from "radix-ui/navigation-menu";
6
- function NavigationMenu({ className, children, viewport = true, ...props }) {
7
- return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", "data-viewport": viewport, className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, viewport && _jsx(NavigationMenuViewport, {})] }));
5
+ import * as React from "react";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ function NavigationMenu({
8
+ className,
9
+ children,
10
+ viewport = true,
11
+ ...props
12
+ }) {
13
+ return /*#__PURE__*/_jsxs(NavigationMenuPrimitive.Root, {
14
+ "data-slot": "navigation-menu",
15
+ "data-viewport": viewport,
16
+ className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
17
+ ...props,
18
+ children: [children, viewport && /*#__PURE__*/_jsx(NavigationMenuViewport, {})]
19
+ });
8
20
  }
9
- function NavigationMenuList({ className, ...props }) {
10
- return (_jsx(NavigationMenuPrimitive.List, { "data-slot": "navigation-menu-list", className: cn("group flex flex-1 list-none items-center justify-center gap-1", className), ...props }));
21
+ function NavigationMenuList({
22
+ className,
23
+ ...props
24
+ }) {
25
+ return /*#__PURE__*/_jsx(NavigationMenuPrimitive.List, {
26
+ "data-slot": "navigation-menu-list",
27
+ className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
28
+ ...props
29
+ });
11
30
  }
12
- function NavigationMenuItem({ className, ...props }) {
13
- return (_jsx(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", className: cn("relative", className), ...props }));
31
+ function NavigationMenuItem({
32
+ className,
33
+ ...props
34
+ }) {
35
+ return /*#__PURE__*/_jsx(NavigationMenuPrimitive.Item, {
36
+ "data-slot": "navigation-menu-item",
37
+ className: cn("relative", className),
38
+ ...props
39
+ });
14
40
  }
15
41
  const navigationMenuTriggerStyle = cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent");
16
- function NavigationMenuTrigger({ className, children, ...props }) {
17
- return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] }));
42
+ function NavigationMenuTrigger({
43
+ className,
44
+ children,
45
+ ...props
46
+ }) {
47
+ return /*#__PURE__*/_jsxs(NavigationMenuPrimitive.Trigger, {
48
+ "data-slot": "navigation-menu-trigger",
49
+ className: cn(navigationMenuTriggerStyle(), "group", className),
50
+ ...props,
51
+ children: [children, " ", /*#__PURE__*/_jsx(ChevronDownIcon, {
52
+ className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
53
+ "aria-hidden": "true"
54
+ })]
55
+ });
18
56
  }
19
- function NavigationMenuContent({ className, ...props }) {
20
- return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-overlay group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95", className), ...props }));
57
+ function NavigationMenuContent({
58
+ className,
59
+ ...props
60
+ }) {
61
+ return /*#__PURE__*/_jsx(NavigationMenuPrimitive.Content, {
62
+ "data-slot": "navigation-menu-content",
63
+ className: cn("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-overlay group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95", className),
64
+ ...props
65
+ });
21
66
  }
22
- function NavigationMenuViewport({ className, ...props }) {
23
- return (_jsx("div", { className: cn("absolute top-full left-0 isolate z-50 flex justify-center"), children: _jsx(NavigationMenuPrimitive.Viewport, { "data-slot": "navigation-menu-viewport", className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-overlay data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ...props }) }));
67
+ function NavigationMenuViewport({
68
+ className,
69
+ ...props
70
+ }) {
71
+ return /*#__PURE__*/_jsx("div", {
72
+ className: cn("absolute top-full left-0 isolate z-50 flex justify-center"),
73
+ children: /*#__PURE__*/_jsx(NavigationMenuPrimitive.Viewport, {
74
+ "data-slot": "navigation-menu-viewport",
75
+ className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-overlay data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className),
76
+ ...props
77
+ })
78
+ });
24
79
  }
25
- function NavigationMenuLink({ className, ...props }) {
26
- return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props }));
80
+ function NavigationMenuLink({
81
+ className,
82
+ ...props
83
+ }) {
84
+ return /*#__PURE__*/_jsx(NavigationMenuPrimitive.Link, {
85
+ "data-slot": "navigation-menu-link",
86
+ className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className),
87
+ ...props
88
+ });
27
89
  }
28
- function NavigationMenuIndicator({ className, ...props }) {
29
- return (_jsx(NavigationMenuPrimitive.Indicator, { "data-slot": "navigation-menu-indicator", className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className), ...props, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) }));
90
+ function NavigationMenuIndicator({
91
+ className,
92
+ ...props
93
+ }) {
94
+ return /*#__PURE__*/_jsx(NavigationMenuPrimitive.Indicator, {
95
+ "data-slot": "navigation-menu-indicator",
96
+ className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
97
+ ...props,
98
+ children: /*#__PURE__*/_jsx("div", {
99
+ className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"
100
+ })
101
+ });
30
102
  }
31
- export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle, };
103
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
@@ -1,30 +1,101 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, OverflowMenuHorizontal as MoreHorizontalIcon, } from "@carbon/icons-react";
1
+ import { ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, OverflowMenuHorizontal as MoreHorizontalIcon } from "@carbon/icons-react";
3
2
  import { cn } from "cn";
3
+ import * as React from "react";
4
4
  import { buttonVariants } from "../action/button.js";
5
- function Pagination({ className, ...props }) {
6
- return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ function Pagination({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /*#__PURE__*/_jsx("nav", {
11
+ role: "navigation",
12
+ "aria-label": "pagination",
13
+ "data-slot": "pagination",
14
+ className: cn("mx-auto flex w-full justify-center", className),
15
+ ...props
16
+ });
7
17
  }
8
- function PaginationContent({ className, ...props }) {
9
- return (_jsx("ul", { "data-slot": "pagination-content", className: cn("flex flex-row items-center gap-1", className), ...props }));
18
+ function PaginationContent({
19
+ className,
20
+ ...props
21
+ }) {
22
+ return /*#__PURE__*/_jsx("ul", {
23
+ "data-slot": "pagination-content",
24
+ className: cn("flex flex-row items-center gap-1", className),
25
+ ...props
26
+ });
10
27
  }
11
- function PaginationItem({ ...props }) {
12
- return _jsx("li", { "data-slot": "pagination-item", ...props });
28
+ function PaginationItem({
29
+ ...props
30
+ }) {
31
+ return /*#__PURE__*/_jsx("li", {
32
+ "data-slot": "pagination-item",
33
+ ...props
34
+ });
13
35
  }
14
36
  const activePageEmphasis = "border-input bg-muted font-semibold text-foreground dark:bg-muted";
15
- function PaginationLink({ className, isActive, size = "icon", ...props }) {
16
- return (_jsx("a", { "aria-current": isActive ? "page" : undefined, "data-slot": "pagination-link", "data-active": isActive, className: cn(buttonVariants({
17
- variant: isActive ? "outline" : "ghost",
18
- size,
19
- }), isActive ? activePageEmphasis : "text-muted-foreground hover:text-foreground", className), ...props }));
37
+ function PaginationLink({
38
+ className,
39
+ isActive,
40
+ size = "icon",
41
+ ...props
42
+ }) {
43
+ return /*#__PURE__*/_jsx("a", {
44
+ "aria-current": isActive ? "page" : undefined,
45
+ "data-slot": "pagination-link",
46
+ "data-active": isActive,
47
+ className: cn(buttonVariants({
48
+ variant: isActive ? "outline" : "ghost",
49
+ size
50
+ }), isActive ? activePageEmphasis : "text-muted-foreground hover:text-foreground", className),
51
+ ...props
52
+ });
20
53
  }
21
- function PaginationPrevious({ className, ...props }) {
22
- return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 px-2.5 text-foreground sm:pl-2.5", className), ...props, children: [_jsx(ChevronLeftIcon, {}), _jsx("span", { className: "hidden sm:block", children: "Previous" })] }));
54
+ function PaginationPrevious({
55
+ className,
56
+ ...props
57
+ }) {
58
+ return /*#__PURE__*/_jsxs(PaginationLink, {
59
+ "aria-label": "Go to previous page",
60
+ size: "default",
61
+ className: cn("gap-1 px-2.5 text-foreground sm:pl-2.5", className),
62
+ ...props,
63
+ children: [/*#__PURE__*/_jsx(ChevronLeftIcon, {}), /*#__PURE__*/_jsx("span", {
64
+ className: "hidden sm:block",
65
+ children: "Previous"
66
+ })]
67
+ });
23
68
  }
24
- function PaginationNext({ className, ...props }) {
25
- return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 px-2.5 text-foreground sm:pr-2.5", className), ...props, children: [_jsx("span", { className: "hidden sm:block", children: "Next" }), _jsx(ChevronRightIcon, {})] }));
69
+ function PaginationNext({
70
+ className,
71
+ ...props
72
+ }) {
73
+ return /*#__PURE__*/_jsxs(PaginationLink, {
74
+ "aria-label": "Go to next page",
75
+ size: "default",
76
+ className: cn("gap-1 px-2.5 text-foreground sm:pr-2.5", className),
77
+ ...props,
78
+ children: [/*#__PURE__*/_jsx("span", {
79
+ className: "hidden sm:block",
80
+ children: "Next"
81
+ }), /*#__PURE__*/_jsx(ChevronRightIcon, {})]
82
+ });
26
83
  }
27
- function PaginationEllipsis({ className, ...props }) {
28
- return (_jsxs("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex size-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontalIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More pages" })] }));
84
+ function PaginationEllipsis({
85
+ className,
86
+ ...props
87
+ }) {
88
+ return /*#__PURE__*/_jsxs("span", {
89
+ "aria-hidden": true,
90
+ "data-slot": "pagination-ellipsis",
91
+ className: cn("flex size-9 items-center justify-center", className),
92
+ ...props,
93
+ children: [/*#__PURE__*/_jsx(MoreHorizontalIcon, {
94
+ className: "size-4"
95
+ }), /*#__PURE__*/_jsx("span", {
96
+ className: "sr-only",
97
+ children: "More pages"
98
+ })]
99
+ });
29
100
  }
30
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
101
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };