@middag-io/react 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/shell/AuthShell.js +39 -0
- package/dist-lib/base/shell/BasicShell.js +207 -0
- package/dist-lib/base/shell/ImmersiveShell.js +55 -0
- package/dist-lib/base/shell/partials/InspectorContext.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/InspectorContext.js +60 -0
- package/dist-lib/base/shell/partials/InspectorPanel.js +22 -0
- package/dist-lib/base/shell/partials/NavErrorBoundary.js +66 -0
- package/dist-lib/base/shell/partials/OverlayScreen.js +36 -0
- package/dist-lib/base/shell/partials/PageActionButton.js +4 -0
- package/dist-lib/base/theme/appearance.js +39 -0
- package/dist-lib/base/theme/host-layout-detector.js +39 -0
- package/dist-lib/base/theme/host-theme-detector.js +131 -0
- package/dist-lib/base/theme/sidebar-safelist.txt +20 -0
- package/dist-lib/base/theme/theme-bridge.css +164 -0
- package/dist-lib/base/theme/theme-context.js +103 -0
- package/dist-lib/base/theme/themes/classic.css +174 -0
- package/dist-lib/base/theme/tokens.css +290 -0
- package/dist-lib/base/theme/useHostTheme.js +34 -0
- package/dist-lib/base/utils/clipboard.js +16 -0
- package/dist-lib/base/utils/conditions.js +13 -0
- package/dist-lib/base/utils/icon-registry.js +16 -0
- package/dist-lib/base/utils/icons.js +11 -0
- package/dist-lib/base/utils/interpolate.js +6 -0
- package/dist-lib/base/utils/register-default-icons.js +9 -0
- package/dist-lib/base/utils/storage.js +30 -0
- package/dist-lib/base/utils/time.js +59 -0
- package/dist-lib/chunks/subpath-BD_PKGUX.js +146 -0
- package/dist-lib/chunks/subpath-DLFO_UGQ.js +604 -0
- package/dist-lib/components/reui/accordion.js +43 -0
- package/dist-lib/components/reui/alert-dialog.js +101 -0
- package/dist-lib/components/reui/alert.js +55 -0
- package/dist-lib/components/reui/aspect-ratio.js +11 -0
- package/dist-lib/components/reui/autocomplete.js +170 -0
- package/dist-lib/components/reui/avatar.js +51 -0
- package/dist-lib/components/reui/badge.js +64 -0
- package/dist-lib/components/reui/breadcrumb.js +69 -0
- package/dist-lib/components/reui/button-group.js +38 -0
- package/dist-lib/components/reui/button.js +47 -0
- package/dist-lib/components/reui/calendar.js +89 -0
- package/dist-lib/components/reui/card.js +55 -0
- package/dist-lib/components/reui/carousel.js +110 -0
- package/dist-lib/components/reui/chart.js +130 -0
- package/dist-lib/components/reui/checkbox.js +20 -0
- package/dist-lib/components/reui/collapsible.js +23 -0
- package/dist-lib/components/reui/combobox.js +166 -0
- package/dist-lib/components/reui/command.js +85 -0
- package/dist-lib/components/reui/context-menu.js +121 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-filter.js +108 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-header.js +217 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-visibility.js +25 -0
- package/dist-lib/components/reui/data-grid/data-grid-pagination.js +132 -0
- package/dist-lib/components/reui/data-grid/data-grid-scroll-area.js +183 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-dnd-rows.js +125 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-dnd.js +130 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-virtual.js +156 -0
- package/dist-lib/components/reui/data-grid/data-grid-table.js +546 -0
- package/dist-lib/components/reui/data-grid/data-grid.js +113 -0
- package/dist-lib/components/reui/data-grid-pagination.js +131 -0
- package/dist-lib/components/reui/date-selector.js +642 -0
- package/dist-lib/components/reui/dialog.js +94 -0
- package/dist-lib/components/reui/drawer.js +77 -0
- package/dist-lib/components/reui/dropdown-menu.js +123 -0
- package/dist-lib/components/reui/empty.js +59 -0
- package/dist-lib/components/reui/field.js +115 -0
- package/dist-lib/components/reui/filters.js +873 -0
- package/dist-lib/components/reui/frame.js +97 -0
- package/dist-lib/components/reui/hover-card.js +31 -0
- package/dist-lib/components/reui/icon-placeholder.js +14 -0
- package/dist-lib/components/reui/index.js +18 -0
- package/dist-lib/components/reui/input-group.js +78 -0
- package/dist-lib/components/reui/input-otp.js +44 -0
- package/dist-lib/components/reui/input.js +14 -0
- package/dist-lib/components/reui/item.js +116 -0
- package/dist-lib/components/reui/kanban.js +316 -0
- package/dist-lib/components/reui/kbd.js +19 -0
- package/dist-lib/components/reui/label.js +14 -0
- package/dist-lib/components/reui/menubar.js +132 -0
- package/dist-lib/components/reui/native-select.js +37 -0
- package/dist-lib/components/reui/navigation-menu.js +80 -0
- package/dist-lib/components/reui/number-field.js +126 -0
- package/dist-lib/components/reui/pagination.js +78 -0
- package/dist-lib/components/reui/phone-input.js +124 -0
- package/dist-lib/components/reui/popover.js +55 -0
- package/dist-lib/components/reui/progress.js +20 -0
- package/dist-lib/components/reui/radio-group.js +27 -0
- package/dist-lib/components/reui/rating.js +81 -0
- package/dist-lib/components/reui/resizable.js +31 -0
- package/dist-lib/components/reui/scroll-area.js +36 -0
- package/dist-lib/components/reui/scrollspy.js +104 -0
- package/dist-lib/components/reui/select.js +97 -0
- package/dist-lib/components/reui/separator.js +17 -0
- package/dist-lib/components/reui/sheet.js +81 -0
- package/dist-lib/components/reui/sidebar.js +350 -0
- package/dist-lib/components/reui/skeleton.js +12 -0
- package/dist-lib/components/reui/slider.js +35 -0
- package/dist-lib/components/reui/sonner.js +28 -0
- package/dist-lib/components/reui/sortable.js +172 -0
- package/dist-lib/components/reui/spinner.js +14 -0
- package/dist-lib/components/reui/stepper.js +193 -0
- package/dist-lib/components/reui/svgs/claudeAiIcon.js +13 -0
- package/dist-lib/components/reui/svgs/gemini.js +257 -0
- package/dist-lib/components/reui/svgs/openai.js +10 -0
- package/dist-lib/components/reui/svgs/openaiDark.js +13 -0
- package/dist-lib/components/reui/switch.js +19 -0
- package/dist-lib/components/reui/table.js +66 -0
- package/dist-lib/components/reui/tabs.js +47 -0
- package/dist-lib/components/reui/textarea.js +13 -0
- package/dist-lib/components/reui/timeline.js +84 -0
- package/dist-lib/components/reui/toggle-group.js +48 -0
- package/dist-lib/components/reui/toggle.js +36 -0
- package/dist-lib/components/reui/tooltip.js +35 -0
- package/dist-lib/components/reui/tree.js +102 -0
- package/dist-lib/contracts/block-data/data-display.d.ts +8 -0
- package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
- package/dist-lib/i18n/I18nProvider.js +23 -0
- package/dist-lib/i18n/host-resolver.js +10 -0
- package/dist-lib/i18n/instance.js +2 -0
- package/dist-lib/i18n/locales/en/ui.json +266 -0
- package/dist-lib/i18n/locales/en/validators.json +13 -0
- package/dist-lib/i18n/locales/pt-BR/ui.json +266 -0
- package/dist-lib/i18n/locales/pt-BR/validators.json +13 -0
- package/dist-lib/i18n/register-strings.js +7 -0
- package/dist-lib/i18n/render-label.js +13 -0
- package/dist-lib/i18n/resolve-field-error.js +10 -0
- package/dist-lib/i18n/useHostString.js +31 -0
- package/dist-lib/i18n/useTranslation.js +48 -0
- package/dist-lib/lib/actions/resolve-action-target.js +48 -0
- package/dist-lib/lib/hooks/use-copy-to-clipboard.js +18 -0
- package/dist-lib/lib/hooks/use-file-upload.js +171 -0
- package/dist-lib/lib/hooks/use-mobile.js +18 -0
- package/dist-lib/lib/portal-container.js +7 -0
- package/dist-lib/lib/utils.js +8 -0
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +26 -5
- package/package.json +39 -7
- package/dist-lib/_redirects +0 -1
- package/dist-lib/api/example/moodle/get/books.json +0 -209
- package/dist-lib/api/example/moodle/get/dashboard.json +0 -203
- package/dist-lib/api/example/wordpress/get/products.json +0 -165
- package/dist-lib/api/index.json +0 -66
- package/dist-lib/api/inspector/connectors/canvas.json +0 -18
- package/dist-lib/api/inspector/connectors/moodle.json +0 -18
- package/dist-lib/api/inspector/connectors/n8n.json +0 -18
- package/dist-lib/api/inspector/connectors/open-edx.json +0 -18
- package/dist-lib/api/inspector/offerings/off-1.json +0 -18
- package/dist-lib/api/inspector/offerings/off-2.json +0 -18
- package/dist-lib/api/inspector/offerings/off-3.json +0 -18
- package/dist-lib/api/inspector/offerings/off-4.json +0 -18
- package/dist-lib/api/inspector/offerings/off-5.json +0 -18
- package/dist-lib/api/inspector/offerings/off-6.json +0 -17
- package/dist-lib/lottie/calendar/schedule-1.json +0 -1
- package/dist-lib/lottie/calendar/schedule-2.json +0 -1
- package/dist-lib/lottie/celebration/confetti-1.json +0 -1
- package/dist-lib/lottie/celebration/confetti-2.json +0 -1
- package/dist-lib/lottie/celebration/confetti-3.json +0 -1
- package/dist-lib/lottie/cloud/cloud-1.json +0 -1
- package/dist-lib/lottie/cloud/cloud-2.json +0 -1
- package/dist-lib/lottie/connection/network-1.json +0 -1
- package/dist-lib/lottie/connection/network-2.json +0 -1
- package/dist-lib/lottie/connection/network-3.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-1.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-2.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-3.json +0 -1
- package/dist-lib/lottie/email/mail-1.json +0 -1
- package/dist-lib/lottie/email/mail-2.json +0 -1
- package/dist-lib/lottie/email/mail-3.json +0 -1
- package/dist-lib/lottie/empty-state/empty-1.json +0 -1
- package/dist-lib/lottie/empty-state/empty-2.json +0 -1
- package/dist-lib/lottie/empty-state/empty-3.json +0 -1
- package/dist-lib/lottie/error/warning-1.json +0 -1
- package/dist-lib/lottie/error/warning-2.json +0 -1
- package/dist-lib/lottie/error/warning-3.json +0 -1
- package/dist-lib/lottie/index.ts +0 -49
- package/dist-lib/lottie/loading/spinner-1.json +0 -1
- package/dist-lib/lottie/loading/spinner-2.json +0 -1
- package/dist-lib/lottie/loading/spinner-3.json +0 -1
- package/dist-lib/lottie/maintenance/construction-1.json +0 -1
- package/dist-lib/lottie/maintenance/construction-2.json +0 -1
- package/dist-lib/lottie/maintenance/construction-3.json +0 -1
- package/dist-lib/lottie/not-found/404-1.json +0 -1
- package/dist-lib/lottie/not-found/404-2.json +0 -1
- package/dist-lib/lottie/not-found/404-3.json +0 -1
- package/dist-lib/lottie/notification/bell-1.json +0 -1
- package/dist-lib/lottie/notification/bell-2.json +0 -1
- package/dist-lib/lottie/notification/bell-3.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-1.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-2.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-3.json +0 -1
- package/dist-lib/lottie/payment/wallet-1.json +0 -1
- package/dist-lib/lottie/payment/wallet-2.json +0 -1
- package/dist-lib/lottie/payment/wallet-3.json +0 -1
- package/dist-lib/lottie/search/search-1.json +0 -1
- package/dist-lib/lottie/search/search-2.json +0 -1
- package/dist-lib/lottie/search/search-3.json +0 -1
- package/dist-lib/lottie/security/lock-1.json +0 -1
- package/dist-lib/lottie/security/lock-2.json +0 -1
- package/dist-lib/lottie/security/lock-3.json +0 -1
- package/dist-lib/lottie/settings/gear-1.json +0 -1
- package/dist-lib/lottie/settings/gear-2.json +0 -1
- package/dist-lib/lottie/settings/gear-3.json +0 -1
- package/dist-lib/lottie/success/check-1.json +0 -1
- package/dist-lib/lottie/success/check-2.json +0 -1
- package/dist-lib/lottie/success/check-3.json +0 -1
- package/dist-lib/lottie/upload/upload-1.json +0 -1
- package/dist-lib/lottie/upload/upload-2.json +0 -1
- package/dist-lib/lottie/upload/upload-3.json +0 -1
- package/dist-lib/lottie/user/profile-1.json +0 -1
- package/dist-lib/lottie/user/profile-2.json +0 -1
- package/dist-lib/lottie/user/profile-3.json +0 -1
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { createContext as t, useCallback as n, useContext as r, useLayoutEffect as i, useMemo as a, useState as o } from "react";
|
|
4
|
+
import { Slot as s } from "radix-ui";
|
|
5
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
6
|
+
import { DndContext as l, DragOverlay as u, KeyboardSensor as d, MeasuringStrategy as f, MouseSensor as p, TouchSensor as m, defaultDropAnimationSideEffects as h, useSensor as g, useSensors as _ } from "@dnd-kit/core";
|
|
7
|
+
import { SortableContext as v, arrayMove as y, defaultAnimateLayoutChanges as b, rectSortingStrategy as x, sortableKeyboardCoordinates as S, useSortable as C, verticalListSortingStrategy as w } from "@dnd-kit/sortable";
|
|
8
|
+
import { CSS as T } from "@dnd-kit/utilities";
|
|
9
|
+
import { createPortal as E } from "react-dom";
|
|
10
|
+
//#region src/components/reui/kanban.tsx
|
|
11
|
+
var D = t({
|
|
12
|
+
columns: {},
|
|
13
|
+
setColumns: () => {},
|
|
14
|
+
getItemId: () => "",
|
|
15
|
+
columnIds: [],
|
|
16
|
+
activeId: null,
|
|
17
|
+
setActiveId: () => {},
|
|
18
|
+
findContainer: () => void 0,
|
|
19
|
+
isColumn: () => !1,
|
|
20
|
+
modifiers: void 0
|
|
21
|
+
}), O = t({
|
|
22
|
+
attributes: {},
|
|
23
|
+
listeners: void 0,
|
|
24
|
+
isDragging: !1,
|
|
25
|
+
disabled: !1
|
|
26
|
+
}), k = t({
|
|
27
|
+
listeners: void 0,
|
|
28
|
+
isDragging: !1,
|
|
29
|
+
disabled: !1
|
|
30
|
+
}), A = t(!1), j = (e) => b({
|
|
31
|
+
...e,
|
|
32
|
+
wasDragging: !0
|
|
33
|
+
}), M = { sideEffects: h({ styles: { active: { opacity: "0.4" } } }) };
|
|
34
|
+
function N({ value: t, onValueChange: r, getItemValue: i, children: u, className: h, asChild: v = !1, onMove: b, modifiers: x, ...C }) {
|
|
35
|
+
let w = t, T = r, [E, O] = o(null), k = _(g(p, { activationConstraint: { distance: 10 } }), g(m, { activationConstraint: {
|
|
36
|
+
delay: 250,
|
|
37
|
+
tolerance: 5
|
|
38
|
+
} }), g(d, { coordinateGetter: S })), A = a(() => Object.keys(w), [w]), j = n((e) => A.includes(e), [A]), M = n((e) => j(e) ? e : A.find((t) => w[t].some((t) => i(t) === e)), [
|
|
39
|
+
w,
|
|
40
|
+
A,
|
|
41
|
+
i,
|
|
42
|
+
j
|
|
43
|
+
]), N = n((e) => {
|
|
44
|
+
O(e.active.id);
|
|
45
|
+
}, []), P = n((e) => {
|
|
46
|
+
if (b) return;
|
|
47
|
+
let { active: t, over: n } = e;
|
|
48
|
+
if (!n || j(t.id)) return;
|
|
49
|
+
let r = M(t.id), a = M(n.id);
|
|
50
|
+
if (!(!r || !a)) if (r !== a) {
|
|
51
|
+
let e = w[r], o = w[a], s = e.findIndex((e) => i(e) === t.id), c = o.findIndex((e) => i(e) === n.id);
|
|
52
|
+
j(n.id) && (c = o.length);
|
|
53
|
+
let l = [...e], u = [...o], [d] = l.splice(s, 1);
|
|
54
|
+
u.splice(c, 0, d), T({
|
|
55
|
+
...w,
|
|
56
|
+
[r]: l,
|
|
57
|
+
[a]: u
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
let e = r, a = w[e].findIndex((e) => i(e) === t.id), o = w[e].findIndex((e) => i(e) === n.id);
|
|
61
|
+
a !== o && T({
|
|
62
|
+
...w,
|
|
63
|
+
[e]: y(w[e], a, o)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, [
|
|
67
|
+
M,
|
|
68
|
+
i,
|
|
69
|
+
j,
|
|
70
|
+
T,
|
|
71
|
+
w,
|
|
72
|
+
b
|
|
73
|
+
]), F = n(() => {
|
|
74
|
+
O(null);
|
|
75
|
+
}, []), I = n((e) => {
|
|
76
|
+
let { active: t, over: n } = e;
|
|
77
|
+
if (O(null), !n) return;
|
|
78
|
+
if (b && !j(t.id)) {
|
|
79
|
+
let r = M(t.id), a = M(n.id);
|
|
80
|
+
r && a && b({
|
|
81
|
+
event: e,
|
|
82
|
+
activeContainer: r,
|
|
83
|
+
activeIndex: w[r].findIndex((e) => i(e) === t.id),
|
|
84
|
+
overContainer: a,
|
|
85
|
+
overIndex: j(n.id) ? w[a].length : w[a].findIndex((e) => i(e) === n.id)
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (j(t.id) && j(n.id)) {
|
|
90
|
+
let e = A.indexOf(t.id), r = A.indexOf(n.id);
|
|
91
|
+
if (e !== r) {
|
|
92
|
+
let t = y(Object.keys(w), e, r), n = {};
|
|
93
|
+
t.forEach((e) => {
|
|
94
|
+
n[e] = w[e];
|
|
95
|
+
}), T(n);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
let r = M(t.id), a = M(n.id);
|
|
100
|
+
if (r && a && r === a) {
|
|
101
|
+
let e = r, a = w[e].findIndex((e) => i(e) === t.id), o = w[e].findIndex((e) => i(e) === n.id);
|
|
102
|
+
a !== o && T({
|
|
103
|
+
...w,
|
|
104
|
+
[e]: y(w[e], a, o)
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}, [
|
|
108
|
+
A,
|
|
109
|
+
w,
|
|
110
|
+
M,
|
|
111
|
+
i,
|
|
112
|
+
j,
|
|
113
|
+
T,
|
|
114
|
+
b
|
|
115
|
+
]), L = a(() => ({
|
|
116
|
+
columns: w,
|
|
117
|
+
setColumns: T,
|
|
118
|
+
getItemId: i,
|
|
119
|
+
columnIds: A,
|
|
120
|
+
activeId: E,
|
|
121
|
+
setActiveId: O,
|
|
122
|
+
findContainer: M,
|
|
123
|
+
isColumn: j,
|
|
124
|
+
modifiers: x
|
|
125
|
+
}), [
|
|
126
|
+
w,
|
|
127
|
+
T,
|
|
128
|
+
i,
|
|
129
|
+
A,
|
|
130
|
+
E,
|
|
131
|
+
M,
|
|
132
|
+
j,
|
|
133
|
+
x
|
|
134
|
+
]), R = v ? s.Root : "div";
|
|
135
|
+
return /* @__PURE__ */ c(D.Provider, {
|
|
136
|
+
value: L,
|
|
137
|
+
children: /* @__PURE__ */ c(l, {
|
|
138
|
+
sensors: k,
|
|
139
|
+
modifiers: x,
|
|
140
|
+
measuring: { droppable: { strategy: f.Always } },
|
|
141
|
+
onDragStart: N,
|
|
142
|
+
onDragOver: P,
|
|
143
|
+
onDragEnd: I,
|
|
144
|
+
onDragCancel: F,
|
|
145
|
+
children: /* @__PURE__ */ c(R, {
|
|
146
|
+
"data-slot": "kanban",
|
|
147
|
+
"data-dragging": E !== null,
|
|
148
|
+
className: e(E !== null && "cursor-grabbing!", h),
|
|
149
|
+
...C,
|
|
150
|
+
children: u
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function P({ className: t, asChild: n = !1, children: i, ...a }) {
|
|
156
|
+
let { columnIds: o } = r(D);
|
|
157
|
+
return /* @__PURE__ */ c(v, {
|
|
158
|
+
items: o,
|
|
159
|
+
strategy: x,
|
|
160
|
+
children: /* @__PURE__ */ c(n ? s.Root : "div", {
|
|
161
|
+
"data-slot": "kanban-board",
|
|
162
|
+
className: e("grid auto-rows-fr gap-4 sm:grid-cols-3", t),
|
|
163
|
+
...a,
|
|
164
|
+
children: i
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function F({ value: t, className: n, asChild: i = !1, disabled: a, children: o, ...l }) {
|
|
169
|
+
let u = r(A), { setNodeRef: d, transform: f, transition: p, attributes: m, listeners: h, isDragging: g } = C({
|
|
170
|
+
id: t,
|
|
171
|
+
disabled: a || u,
|
|
172
|
+
animateLayoutChanges: j
|
|
173
|
+
}), { activeId: _, isColumn: v } = r(D), y = _ ? v(_) : !1, b = {
|
|
174
|
+
transition: p,
|
|
175
|
+
transform: T.Transform.toString(f)
|
|
176
|
+
}, x = i ? s.Root : "div";
|
|
177
|
+
return u ? /* @__PURE__ */ c(O.Provider, {
|
|
178
|
+
value: {
|
|
179
|
+
attributes: {},
|
|
180
|
+
listeners: void 0,
|
|
181
|
+
isDragging: !0,
|
|
182
|
+
disabled: !1
|
|
183
|
+
},
|
|
184
|
+
children: /* @__PURE__ */ c(x, {
|
|
185
|
+
"data-slot": "kanban-column",
|
|
186
|
+
"data-value": t,
|
|
187
|
+
"data-dragging": !0,
|
|
188
|
+
className: e("group/kanban-column flex flex-col", n),
|
|
189
|
+
...l,
|
|
190
|
+
children: o
|
|
191
|
+
})
|
|
192
|
+
}) : /* @__PURE__ */ c(O.Provider, {
|
|
193
|
+
value: {
|
|
194
|
+
attributes: m,
|
|
195
|
+
listeners: h,
|
|
196
|
+
isDragging: y,
|
|
197
|
+
disabled: a
|
|
198
|
+
},
|
|
199
|
+
children: /* @__PURE__ */ c(x, {
|
|
200
|
+
"data-slot": "kanban-column",
|
|
201
|
+
"data-value": t,
|
|
202
|
+
"data-dragging": g,
|
|
203
|
+
"data-disabled": a,
|
|
204
|
+
ref: d,
|
|
205
|
+
style: b,
|
|
206
|
+
className: e("group/kanban-column flex flex-col", g && "z-50 opacity-50", a && "opacity-50", n),
|
|
207
|
+
...l,
|
|
208
|
+
children: o
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function I({ className: t, asChild: n = !1, cursor: i = !0, children: a, ...o }) {
|
|
213
|
+
let { attributes: l, listeners: u, isDragging: d, disabled: f } = r(O);
|
|
214
|
+
return /* @__PURE__ */ c(n ? s.Root : "div", {
|
|
215
|
+
"data-slot": "kanban-column-handle",
|
|
216
|
+
"data-dragging": d,
|
|
217
|
+
"data-disabled": f,
|
|
218
|
+
...l,
|
|
219
|
+
...u,
|
|
220
|
+
className: e("opacity-0 transition-opacity group-hover/kanban-column:opacity-100", i && (d ? "cursor-grabbing!" : "cursor-grab!"), t),
|
|
221
|
+
...o,
|
|
222
|
+
children: a
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
function L({ value: t, className: n, asChild: i = !1, disabled: a, children: o, ...l }) {
|
|
226
|
+
let u = r(A), { setNodeRef: d, transform: f, transition: p, attributes: m, listeners: h, isDragging: g } = C({
|
|
227
|
+
id: t,
|
|
228
|
+
disabled: a || u,
|
|
229
|
+
animateLayoutChanges: j
|
|
230
|
+
}), { activeId: _, isColumn: v } = r(D), y = _ ? !v(_) : !1, b = {
|
|
231
|
+
transition: p,
|
|
232
|
+
transform: T.Transform.toString(f)
|
|
233
|
+
}, x = i ? s.Root : "div";
|
|
234
|
+
return u ? /* @__PURE__ */ c(k.Provider, {
|
|
235
|
+
value: {
|
|
236
|
+
listeners: void 0,
|
|
237
|
+
isDragging: !0,
|
|
238
|
+
disabled: !1
|
|
239
|
+
},
|
|
240
|
+
children: /* @__PURE__ */ c(x, {
|
|
241
|
+
"data-slot": "kanban-item",
|
|
242
|
+
"data-value": t,
|
|
243
|
+
"data-dragging": !0,
|
|
244
|
+
className: e(n),
|
|
245
|
+
...l,
|
|
246
|
+
children: o
|
|
247
|
+
})
|
|
248
|
+
}) : /* @__PURE__ */ c(k.Provider, {
|
|
249
|
+
value: {
|
|
250
|
+
listeners: h,
|
|
251
|
+
isDragging: y,
|
|
252
|
+
disabled: a
|
|
253
|
+
},
|
|
254
|
+
children: /* @__PURE__ */ c(x, {
|
|
255
|
+
"data-slot": "kanban-item",
|
|
256
|
+
"data-value": t,
|
|
257
|
+
"data-dragging": g,
|
|
258
|
+
"data-disabled": a,
|
|
259
|
+
ref: d,
|
|
260
|
+
style: b,
|
|
261
|
+
...m,
|
|
262
|
+
className: e(g && "z-50 opacity-50", a && "opacity-50", n),
|
|
263
|
+
...l,
|
|
264
|
+
children: o
|
|
265
|
+
})
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function R({ className: t, asChild: n = !1, cursor: i = !0, children: a, ...o }) {
|
|
269
|
+
let { listeners: l, isDragging: u, disabled: d } = r(k);
|
|
270
|
+
return /* @__PURE__ */ c(n ? s.Root : "div", {
|
|
271
|
+
"data-slot": "kanban-item-handle",
|
|
272
|
+
"data-dragging": u,
|
|
273
|
+
"data-disabled": d,
|
|
274
|
+
...l,
|
|
275
|
+
className: e(i && (u ? "cursor-grabbing!" : "cursor-grab!"), t),
|
|
276
|
+
...o,
|
|
277
|
+
children: a
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function z({ value: t, className: n, asChild: i = !1, children: o, ...l }) {
|
|
281
|
+
let { columns: u, getItemId: d } = r(D);
|
|
282
|
+
return /* @__PURE__ */ c(v, {
|
|
283
|
+
items: a(() => u[t].map(d), [
|
|
284
|
+
u,
|
|
285
|
+
d,
|
|
286
|
+
t
|
|
287
|
+
]),
|
|
288
|
+
strategy: w,
|
|
289
|
+
children: /* @__PURE__ */ c(i ? s.Root : "div", {
|
|
290
|
+
"data-slot": "kanban-column-content",
|
|
291
|
+
className: e("flex flex-col gap-2", n),
|
|
292
|
+
...l,
|
|
293
|
+
children: o
|
|
294
|
+
})
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function B({ children: t, className: n, ...a }) {
|
|
298
|
+
let { activeId: s, isColumn: l, modifiers: d } = r(D), [f, p] = o(!1);
|
|
299
|
+
i(() => p(!0), []);
|
|
300
|
+
let m = s && l(s) ? "column" : "item", h = s && t ? typeof t == "function" ? t({
|
|
301
|
+
value: s,
|
|
302
|
+
variant: m
|
|
303
|
+
}) : t : null;
|
|
304
|
+
return f ? E(/* @__PURE__ */ c(u, {
|
|
305
|
+
dropAnimation: M,
|
|
306
|
+
modifiers: d,
|
|
307
|
+
className: e("z-50", s && "cursor-grabbing", n),
|
|
308
|
+
...a,
|
|
309
|
+
children: /* @__PURE__ */ c(A.Provider, {
|
|
310
|
+
value: !0,
|
|
311
|
+
children: h
|
|
312
|
+
})
|
|
313
|
+
}), document.body) : null;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
export { N as Kanban, P as KanbanBoard, F as KanbanColumn, z as KanbanColumnContent, I as KanbanColumnHandle, L as KanbanItem, R as KanbanItemHandle, B as KanbanOverlay };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/reui/kbd.tsx
|
|
4
|
+
function n({ className: n, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t("kbd", {
|
|
6
|
+
"data-slot": "kbd",
|
|
7
|
+
className: e("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", n),
|
|
8
|
+
...r
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function r({ className: n, ...r }) {
|
|
12
|
+
return /* @__PURE__ */ t("kbd", {
|
|
13
|
+
"data-slot": "kbd-group",
|
|
14
|
+
className: e("inline-flex items-center gap-1", n),
|
|
15
|
+
...r
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { n as Kbd, r as KbdGroup };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Label as t } from "radix-ui";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/reui/label.tsx
|
|
6
|
+
function r({ className: r, ...i }) {
|
|
7
|
+
return /* @__PURE__ */ n(t.Root, {
|
|
8
|
+
"data-slot": "label",
|
|
9
|
+
className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", r),
|
|
10
|
+
...i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as Label };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CheckIcon as t, ChevronRightIcon as n, CircleIcon as r } from "lucide-react";
|
|
4
|
+
import { Menubar as i } from "radix-ui";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/reui/menubar.tsx
|
|
7
|
+
function s({ className: t, ...n }) {
|
|
8
|
+
return /* @__PURE__ */ a(i.Root, {
|
|
9
|
+
"data-slot": "menubar",
|
|
10
|
+
className: e("flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs", t),
|
|
11
|
+
...n
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function c({ ...e }) {
|
|
15
|
+
return /* @__PURE__ */ a(i.Menu, {
|
|
16
|
+
"data-slot": "menubar-menu",
|
|
17
|
+
...e
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function l({ ...e }) {
|
|
21
|
+
return /* @__PURE__ */ a(i.Group, {
|
|
22
|
+
"data-slot": "menubar-group",
|
|
23
|
+
...e
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function u({ ...e }) {
|
|
27
|
+
return /* @__PURE__ */ a(i.Portal, {
|
|
28
|
+
"data-slot": "menubar-portal",
|
|
29
|
+
...e
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function d({ ...e }) {
|
|
33
|
+
return /* @__PURE__ */ a(i.RadioGroup, {
|
|
34
|
+
"data-slot": "menubar-radio-group",
|
|
35
|
+
...e
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function f({ className: t, ...n }) {
|
|
39
|
+
return /* @__PURE__ */ a(i.Trigger, {
|
|
40
|
+
"data-slot": "menubar-trigger",
|
|
41
|
+
className: e("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", t),
|
|
42
|
+
...n
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function p({ className: t, align: n = "start", alignOffset: r = -4, sideOffset: o = 8, ...s }) {
|
|
46
|
+
return /* @__PURE__ */ a(u, { children: /* @__PURE__ */ a(i.Content, {
|
|
47
|
+
"data-slot": "menubar-content",
|
|
48
|
+
align: n,
|
|
49
|
+
alignOffset: r,
|
|
50
|
+
sideOffset: o,
|
|
51
|
+
className: e("z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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", t),
|
|
52
|
+
...s
|
|
53
|
+
}) });
|
|
54
|
+
}
|
|
55
|
+
function m({ className: t, inset: n, variant: r = "default", ...o }) {
|
|
56
|
+
return /* @__PURE__ */ a(i.Item, {
|
|
57
|
+
"data-slot": "menubar-item",
|
|
58
|
+
"data-inset": n,
|
|
59
|
+
"data-variant": r,
|
|
60
|
+
className: e("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", t),
|
|
61
|
+
...o
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function h({ className: n, children: r, checked: s, ...c }) {
|
|
65
|
+
return /* @__PURE__ */ o(i.CheckboxItem, {
|
|
66
|
+
"data-slot": "menubar-checkbox-item",
|
|
67
|
+
className: e("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
|
|
68
|
+
checked: s,
|
|
69
|
+
...c,
|
|
70
|
+
children: [/* @__PURE__ */ a("span", {
|
|
71
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
72
|
+
children: /* @__PURE__ */ a(i.ItemIndicator, { children: /* @__PURE__ */ a(t, { className: "size-4" }) })
|
|
73
|
+
}), r]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function g({ className: t, children: n, ...s }) {
|
|
77
|
+
return /* @__PURE__ */ o(i.RadioItem, {
|
|
78
|
+
"data-slot": "menubar-radio-item",
|
|
79
|
+
className: e("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
80
|
+
...s,
|
|
81
|
+
children: [/* @__PURE__ */ a("span", {
|
|
82
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
83
|
+
children: /* @__PURE__ */ a(i.ItemIndicator, { children: /* @__PURE__ */ a(r, { className: "size-2 fill-current" }) })
|
|
84
|
+
}), n]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function _({ className: t, inset: n, ...r }) {
|
|
88
|
+
return /* @__PURE__ */ a(i.Label, {
|
|
89
|
+
"data-slot": "menubar-label",
|
|
90
|
+
"data-inset": n,
|
|
91
|
+
className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
|
|
92
|
+
...r
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function v({ className: t, ...n }) {
|
|
96
|
+
return /* @__PURE__ */ a(i.Separator, {
|
|
97
|
+
"data-slot": "menubar-separator",
|
|
98
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
99
|
+
...n
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function y({ className: t, ...n }) {
|
|
103
|
+
return /* @__PURE__ */ a("span", {
|
|
104
|
+
"data-slot": "menubar-shortcut",
|
|
105
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
106
|
+
...n
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function b({ ...e }) {
|
|
110
|
+
return /* @__PURE__ */ a(i.Sub, {
|
|
111
|
+
"data-slot": "menubar-sub",
|
|
112
|
+
...e
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function x({ className: t, inset: r, children: s, ...c }) {
|
|
116
|
+
return /* @__PURE__ */ o(i.SubTrigger, {
|
|
117
|
+
"data-slot": "menubar-sub-trigger",
|
|
118
|
+
"data-inset": r,
|
|
119
|
+
className: e("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t),
|
|
120
|
+
...c,
|
|
121
|
+
children: [s, /* @__PURE__ */ a(n, { className: "ml-auto h-4 w-4" })]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function S({ className: t, ...n }) {
|
|
125
|
+
return /* @__PURE__ */ a(i.SubContent, {
|
|
126
|
+
"data-slot": "menubar-sub-content",
|
|
127
|
+
className: e("z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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]:animate-out 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", t),
|
|
128
|
+
...n
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
export { s as Menubar, h as MenubarCheckboxItem, p as MenubarContent, l as MenubarGroup, m as MenubarItem, _ as MenubarLabel, c as MenubarMenu, u as MenubarPortal, d as MenubarRadioGroup, g as MenubarRadioItem, v as MenubarSeparator, y as MenubarShortcut, b as MenubarSub, S as MenubarSubContent, x as MenubarSubTrigger, f as MenubarTrigger };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronDownIcon as t } from "lucide-react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/reui/native-select.tsx
|
|
6
|
+
function i({ className: i, size: a = "default", ...o }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
9
|
+
"data-slot": "native-select-wrapper",
|
|
10
|
+
children: [/* @__PURE__ */ n("select", {
|
|
11
|
+
"data-slot": "native-select",
|
|
12
|
+
"data-size": a,
|
|
13
|
+
className: e("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", i),
|
|
14
|
+
...o
|
|
15
|
+
}), /* @__PURE__ */ n(t, {
|
|
16
|
+
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none",
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
"data-slot": "native-select-icon"
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function a({ className: t, ...r }) {
|
|
23
|
+
return /* @__PURE__ */ n("option", {
|
|
24
|
+
"data-slot": "native-select-option",
|
|
25
|
+
className: e("bg-[Canvas] text-[CanvasText]", t),
|
|
26
|
+
...r
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function o({ className: t, ...r }) {
|
|
30
|
+
return /* @__PURE__ */ n("optgroup", {
|
|
31
|
+
"data-slot": "native-select-optgroup",
|
|
32
|
+
className: e("bg-[Canvas] text-[CanvasText]", t),
|
|
33
|
+
...r
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { i as NativeSelect, o as NativeSelectOptGroup, a as NativeSelectOption };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronDownIcon as t } from "lucide-react";
|
|
4
|
+
import { NavigationMenu as n } from "radix-ui";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { cva as a } from "class-variance-authority";
|
|
7
|
+
//#region src/components/reui/navigation-menu.tsx
|
|
8
|
+
function o({ className: t, children: a, viewport: o = !0, ...s }) {
|
|
9
|
+
return /* @__PURE__ */ i(n.Root, {
|
|
10
|
+
"data-slot": "navigation-menu",
|
|
11
|
+
"data-viewport": o,
|
|
12
|
+
className: e("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", t),
|
|
13
|
+
...s,
|
|
14
|
+
children: [a, o && /* @__PURE__ */ r(f, {})]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function s({ className: t, ...i }) {
|
|
18
|
+
return /* @__PURE__ */ r(n.List, {
|
|
19
|
+
"data-slot": "navigation-menu-list",
|
|
20
|
+
className: e("group flex flex-1 list-none items-center justify-center gap-1", t),
|
|
21
|
+
...i
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function c({ className: t, ...i }) {
|
|
25
|
+
return /* @__PURE__ */ r(n.Item, {
|
|
26
|
+
"data-slot": "navigation-menu-item",
|
|
27
|
+
className: e("relative", t),
|
|
28
|
+
...i
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
var l = a("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-[3px] focus-visible:ring-ring/50 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");
|
|
32
|
+
function u({ className: a, children: o, ...s }) {
|
|
33
|
+
return /* @__PURE__ */ i(n.Trigger, {
|
|
34
|
+
"data-slot": "navigation-menu-trigger",
|
|
35
|
+
className: e(l(), "group", a),
|
|
36
|
+
...s,
|
|
37
|
+
children: [
|
|
38
|
+
o,
|
|
39
|
+
" ",
|
|
40
|
+
/* @__PURE__ */ r(t, {
|
|
41
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function d({ className: t, ...i }) {
|
|
48
|
+
return /* @__PURE__ */ r(n.Content, {
|
|
49
|
+
"data-slot": "navigation-menu-content",
|
|
50
|
+
className: e("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 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", t),
|
|
51
|
+
...i
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function f({ className: t, ...i }) {
|
|
55
|
+
return /* @__PURE__ */ r("div", {
|
|
56
|
+
className: e("absolute top-full left-0 isolate z-50 flex justify-center"),
|
|
57
|
+
children: /* @__PURE__ */ r(n.Viewport, {
|
|
58
|
+
"data-slot": "navigation-menu-viewport",
|
|
59
|
+
className: e("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 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)]", t),
|
|
60
|
+
...i
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function p({ className: t, ...i }) {
|
|
65
|
+
return /* @__PURE__ */ r(n.Link, {
|
|
66
|
+
"data-slot": "navigation-menu-link",
|
|
67
|
+
className: e("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-[3px] focus-visible:ring-ring/50 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", t),
|
|
68
|
+
...i
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function m({ className: t, ...i }) {
|
|
72
|
+
return /* @__PURE__ */ r(n.Indicator, {
|
|
73
|
+
"data-slot": "navigation-menu-indicator",
|
|
74
|
+
className: e("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", t),
|
|
75
|
+
...i,
|
|
76
|
+
children: /* @__PURE__ */ r("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { o as NavigationMenu, d as NavigationMenuContent, m as NavigationMenuIndicator, c as NavigationMenuItem, p as NavigationMenuLink, s as NavigationMenuList, u as NavigationMenuTrigger, f as NavigationMenuViewport, l as navigationMenuTriggerStyle };
|