@postxl/ui-components 1.5.4 → 1.6.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/dist/index.d.ts +273 -271
- package/dist/index.js +219 -170
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -91,11 +91,13 @@ import { DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringStrateg
|
|
|
91
91
|
import { SortableContext, arrayMove, defaultAnimateLayoutChanges, horizontalListSortingStrategy, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
92
92
|
import { CSS } from "@dnd-kit/utilities";
|
|
93
93
|
import * as ReactDOM from "react-dom";
|
|
94
|
+
import { createPortal } from "react-dom";
|
|
94
95
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
95
96
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
96
97
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
97
98
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
98
99
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
100
|
+
import useLocalStorageState from "use-local-storage-state";
|
|
99
101
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
100
102
|
import { useDirection } from "@radix-ui/react-direction";
|
|
101
103
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
@@ -9075,6 +9077,21 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
|
9075
9077
|
|
|
9076
9078
|
//#endregion
|
|
9077
9079
|
//#region src/sidebar/sidebar-context-provider.tsx
|
|
9080
|
+
/**
|
|
9081
|
+
* Stabilises a small object prop by structural equality so that inline objects
|
|
9082
|
+
* (e.g. `defaultOpenSidebars={{ left: true }}`) don't trigger unnecessary
|
|
9083
|
+
* re-renders. Uses JSON serialisation — suitable for small, plain objects only.
|
|
9084
|
+
*/
|
|
9085
|
+
function useStableValue(value) {
|
|
9086
|
+
const ref = React$13.useRef(value);
|
|
9087
|
+
const serialized = JSON.stringify(value);
|
|
9088
|
+
const prevSerialized = React$13.useRef(serialized);
|
|
9089
|
+
if (prevSerialized.current !== serialized) {
|
|
9090
|
+
prevSerialized.current = serialized;
|
|
9091
|
+
ref.current = value;
|
|
9092
|
+
}
|
|
9093
|
+
return ref.current;
|
|
9094
|
+
}
|
|
9078
9095
|
const SIDEBAR_WIDTH = "16rem";
|
|
9079
9096
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
9080
9097
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
@@ -9089,34 +9106,34 @@ const SIDEBAR_MAX_WIDTH = 600;
|
|
|
9089
9106
|
const SidebarContext = React$13.createContext(null);
|
|
9090
9107
|
/**
|
|
9091
9108
|
* Context that identifies which sidebar a component belongs to.
|
|
9092
|
-
* Set by `<Sidebar
|
|
9109
|
+
* Set by `<Sidebar side="...">`, consumed by `useSidebar()`.
|
|
9093
9110
|
*/
|
|
9094
|
-
const
|
|
9111
|
+
const SidebarSideContext = React$13.createContext(null);
|
|
9095
9112
|
/**
|
|
9096
9113
|
* Returns the state and controls for a specific sidebar.
|
|
9097
9114
|
*
|
|
9098
|
-
* @param
|
|
9099
|
-
* `
|
|
9115
|
+
* @param side - Optional explicit sidebar side. Falls back to the nearest
|
|
9116
|
+
* `SidebarSideContext` (set by the parent `<Sidebar>`), then to `"left"`.
|
|
9100
9117
|
*/
|
|
9101
|
-
function useSidebar(
|
|
9118
|
+
function useSidebar(side) {
|
|
9102
9119
|
const store = React$13.useContext(SidebarContext);
|
|
9103
|
-
const
|
|
9104
|
-
const
|
|
9120
|
+
const ctxSide = React$13.useContext(SidebarSideContext);
|
|
9121
|
+
const resolvedSide = side ?? ctxSide ?? "left";
|
|
9105
9122
|
if (!store) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
9106
|
-
const open = store.openStates[
|
|
9107
|
-
const openMobile = store.mobileStates[
|
|
9108
|
-
const width = store.widthStates[
|
|
9123
|
+
const open = store.openStates[resolvedSide] ?? store.defaultOpen;
|
|
9124
|
+
const openMobile = store.mobileStates[resolvedSide] ?? false;
|
|
9125
|
+
const width = store.widthStates[resolvedSide];
|
|
9109
9126
|
const { isMobile, isResizing } = store;
|
|
9110
|
-
const registry = store.sidebarRegistry[
|
|
9127
|
+
const registry = store.sidebarRegistry[resolvedSide];
|
|
9111
9128
|
const minWidth = registry?.minWidth ?? store.providerMinWidth;
|
|
9112
9129
|
const maxWidth = registry?.maxWidth ?? store.providerMaxWidth;
|
|
9113
|
-
const setOpen = React$13.useCallback((value) => store.setOpen(
|
|
9114
|
-
const setOpenMobile = React$13.useCallback((value) => store.setOpenMobile(
|
|
9115
|
-
const setWidth = React$13.useCallback((value) => store.setWidth(
|
|
9130
|
+
const setOpen = React$13.useCallback((value) => store.setOpen(resolvedSide, value), [store.setOpen, resolvedSide]);
|
|
9131
|
+
const setOpenMobile = React$13.useCallback((value) => store.setOpenMobile(resolvedSide, value), [store.setOpenMobile, resolvedSide]);
|
|
9132
|
+
const setWidth = React$13.useCallback((value) => store.setWidth(resolvedSide, value), [store.setWidth, resolvedSide]);
|
|
9116
9133
|
const toggleSidebar = React$13.useCallback(() => {
|
|
9117
|
-
if (store.isMobile) store.setOpenMobile(
|
|
9118
|
-
else store.setOpen(
|
|
9119
|
-
}, [store,
|
|
9134
|
+
if (store.isMobile) store.setOpenMobile(resolvedSide, !(store.mobileStates[resolvedSide] ?? false));
|
|
9135
|
+
else store.setOpen(resolvedSide, !(store.openStates[resolvedSide] ?? store.defaultOpen));
|
|
9136
|
+
}, [store, resolvedSide]);
|
|
9120
9137
|
const state = open ? "expanded" : "collapsed";
|
|
9121
9138
|
return React$13.useMemo(() => ({
|
|
9122
9139
|
state,
|
|
@@ -9147,118 +9164,119 @@ function useSidebar(sidebarId) {
|
|
|
9147
9164
|
]);
|
|
9148
9165
|
}
|
|
9149
9166
|
/**
|
|
9150
|
-
* Returns a list of all registered sidebars with their
|
|
9167
|
+
* Returns a list of all registered sidebars with their sides.
|
|
9151
9168
|
*/
|
|
9152
9169
|
function useRegisteredSidebars() {
|
|
9153
9170
|
const store = React$13.useContext(SidebarContext);
|
|
9154
9171
|
if (!store) throw new Error("useRegisteredSidebars must be used within a SidebarProvider.");
|
|
9155
|
-
return React$13.useMemo(() => Object.
|
|
9156
|
-
sidebarId,
|
|
9157
|
-
side: entry.side
|
|
9158
|
-
})), [store.sidebarRegistry]);
|
|
9172
|
+
return React$13.useMemo(() => Object.keys(store.sidebarRegistry).map((side) => ({ side })), [store.sidebarRegistry]);
|
|
9159
9173
|
}
|
|
9160
|
-
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, width: widthProp, onWidthChange, minWidth = SIDEBAR_MIN_WIDTH, maxWidth = SIDEBAR_MAX_WIDTH, storageKey, defaultOpenSidebars, defaultWidths, keyboardShortcuts, className, style, children,...props }) {
|
|
9174
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, controlledSide = "left", width: widthProp, onWidthChange, minWidth = SIDEBAR_MIN_WIDTH, maxWidth = SIDEBAR_MAX_WIDTH, storageKey, defaultOpenSidebars, defaultWidths, keyboardShortcuts, className, style, children,...props }) {
|
|
9161
9175
|
const isMobile = useIsMobile();
|
|
9162
9176
|
const [isResizing, setIsResizing] = React$13.useState(false);
|
|
9163
|
-
const
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
for (const [
|
|
9174
|
-
|
|
9175
|
-
|
|
9177
|
+
const fallbackKey = React$13.useId();
|
|
9178
|
+
const stableDefaultOpenSidebars = useStableValue(defaultOpenSidebars);
|
|
9179
|
+
const stableDefaultWidths = useStableValue(defaultWidths);
|
|
9180
|
+
const [storedStates, setStoredStates] = useLocalStorageState(storageKey ?? fallbackKey, {
|
|
9181
|
+
defaultValue: () => {
|
|
9182
|
+
const states = {};
|
|
9183
|
+
if (stableDefaultOpenSidebars) for (const [side, open] of Object.entries(stableDefaultOpenSidebars)) states[side] = {
|
|
9184
|
+
...states[side] ?? { open: defaultOpen },
|
|
9185
|
+
open
|
|
9186
|
+
};
|
|
9187
|
+
if (stableDefaultWidths) for (const [side, width] of Object.entries(stableDefaultWidths)) states[side] = {
|
|
9188
|
+
...states[side] ?? { open: defaultOpen },
|
|
9189
|
+
width
|
|
9190
|
+
};
|
|
9191
|
+
return states;
|
|
9192
|
+
},
|
|
9193
|
+
storageSync: !!storageKey
|
|
9176
9194
|
});
|
|
9195
|
+
const openStates = React$13.useMemo(() => {
|
|
9196
|
+
const states = {};
|
|
9197
|
+
if (stableDefaultOpenSidebars) Object.assign(states, stableDefaultOpenSidebars);
|
|
9198
|
+
for (const [side, data] of Object.entries(storedStates)) if (data && typeof data === "object" && "open" in data) states[side] = data.open;
|
|
9199
|
+
return states;
|
|
9200
|
+
}, [storedStates, stableDefaultOpenSidebars]);
|
|
9177
9201
|
const [mobileStates, setMobileStates] = React$13.useState({});
|
|
9178
|
-
React$13.useEffect(() => {
|
|
9179
|
-
if (openProp !== void 0) setOpenStates((prev) => prev["default"] === openProp ? prev : {
|
|
9180
|
-
...prev,
|
|
9181
|
-
default: openProp
|
|
9182
|
-
});
|
|
9183
|
-
}, [openProp]);
|
|
9184
9202
|
const effectiveOpenStates = React$13.useMemo(() => {
|
|
9185
9203
|
if (openProp !== void 0) return {
|
|
9186
9204
|
...openStates,
|
|
9187
|
-
|
|
9205
|
+
[controlledSide]: openProp
|
|
9188
9206
|
};
|
|
9189
9207
|
return openStates;
|
|
9190
|
-
}, [
|
|
9191
|
-
|
|
9208
|
+
}, [
|
|
9209
|
+
openStates,
|
|
9210
|
+
openProp,
|
|
9211
|
+
controlledSide
|
|
9212
|
+
]);
|
|
9213
|
+
const widthStates = React$13.useMemo(() => {
|
|
9192
9214
|
const states = {};
|
|
9193
|
-
if (
|
|
9194
|
-
|
|
9195
|
-
if (storedRef.current) {
|
|
9196
|
-
for (const [id, data] of Object.entries(storedRef.current)) if (data && typeof data === "object" && typeof data.width === "number") states[id] = data.width;
|
|
9197
|
-
}
|
|
9215
|
+
if (stableDefaultWidths) Object.assign(states, stableDefaultWidths);
|
|
9216
|
+
for (const [side, data] of Object.entries(storedStates)) if (data && typeof data === "object" && typeof data.width === "number") states[side] = data.width;
|
|
9198
9217
|
return states;
|
|
9199
|
-
});
|
|
9200
|
-
React$13.useEffect(() => {
|
|
9201
|
-
if (widthProp !== void 0) setWidthStates((prev) => prev["default"] === widthProp ? prev : {
|
|
9202
|
-
...prev,
|
|
9203
|
-
default: widthProp
|
|
9204
|
-
});
|
|
9205
|
-
}, [widthProp]);
|
|
9218
|
+
}, [storedStates, stableDefaultWidths]);
|
|
9206
9219
|
const effectiveWidthStates = React$13.useMemo(() => {
|
|
9207
9220
|
if (widthProp !== void 0) return {
|
|
9208
9221
|
...widthStates,
|
|
9209
|
-
|
|
9222
|
+
[controlledSide]: widthProp
|
|
9210
9223
|
};
|
|
9211
9224
|
return widthStates;
|
|
9212
|
-
}, [widthStates, widthProp]);
|
|
9213
|
-
React$13.useEffect(() => {
|
|
9214
|
-
if (!storageKey) return;
|
|
9215
|
-
const toStore = {};
|
|
9216
|
-
const allIds = new Set([...Object.keys(openStates), ...Object.keys(widthStates)]);
|
|
9217
|
-
for (const id of allIds) toStore[id] = {
|
|
9218
|
-
open: openStates[id] ?? defaultOpen,
|
|
9219
|
-
...widthStates[id] === void 0 ? {} : { width: widthStates[id] }
|
|
9220
|
-
};
|
|
9221
|
-
localStorage.setItem(storageKey, JSON.stringify(toStore));
|
|
9222
9225
|
}, [
|
|
9223
|
-
storageKey,
|
|
9224
|
-
openStates,
|
|
9225
9226
|
widthStates,
|
|
9226
|
-
|
|
9227
|
+
widthProp,
|
|
9228
|
+
controlledSide
|
|
9227
9229
|
]);
|
|
9228
|
-
const setOpen = React$13.useCallback((
|
|
9229
|
-
if (
|
|
9230
|
-
|
|
9230
|
+
const setOpen = React$13.useCallback((side, open) => {
|
|
9231
|
+
if (side === controlledSide && setOpenProp) setOpenProp(open);
|
|
9232
|
+
setStoredStates((prev) => ({
|
|
9231
9233
|
...prev,
|
|
9232
|
-
[
|
|
9234
|
+
[side]: {
|
|
9235
|
+
...prev[side] ?? { open: defaultOpen },
|
|
9236
|
+
open
|
|
9237
|
+
}
|
|
9233
9238
|
}));
|
|
9234
|
-
}, [
|
|
9235
|
-
|
|
9239
|
+
}, [
|
|
9240
|
+
controlledSide,
|
|
9241
|
+
setOpenProp,
|
|
9242
|
+
setStoredStates,
|
|
9243
|
+
defaultOpen
|
|
9244
|
+
]);
|
|
9245
|
+
const setOpenMobile = React$13.useCallback((side, open) => {
|
|
9236
9246
|
setMobileStates((prev) => ({
|
|
9237
9247
|
...prev,
|
|
9238
|
-
[
|
|
9248
|
+
[side]: open
|
|
9239
9249
|
}));
|
|
9240
9250
|
}, []);
|
|
9241
|
-
const setWidth = React$13.useCallback((
|
|
9242
|
-
if (
|
|
9243
|
-
|
|
9251
|
+
const setWidth = React$13.useCallback((side, width) => {
|
|
9252
|
+
if (side === controlledSide && onWidthChange) onWidthChange(width);
|
|
9253
|
+
setStoredStates((prev) => ({
|
|
9244
9254
|
...prev,
|
|
9245
|
-
[
|
|
9255
|
+
[side]: {
|
|
9256
|
+
...prev[side] ?? { open: defaultOpen },
|
|
9257
|
+
width
|
|
9258
|
+
}
|
|
9246
9259
|
}));
|
|
9247
|
-
}, [
|
|
9260
|
+
}, [
|
|
9261
|
+
controlledSide,
|
|
9262
|
+
onWidthChange,
|
|
9263
|
+
setStoredStates,
|
|
9264
|
+
defaultOpen
|
|
9265
|
+
]);
|
|
9248
9266
|
const [sidebarRegistry, setSidebarRegistry] = React$13.useState({});
|
|
9249
|
-
const registerSidebar = React$13.useCallback((
|
|
9267
|
+
const registerSidebar = React$13.useCallback((side, config) => {
|
|
9250
9268
|
setSidebarRegistry((prev) => {
|
|
9251
|
-
const existing = prev[
|
|
9252
|
-
if (existing && existing.
|
|
9269
|
+
const existing = prev[side];
|
|
9270
|
+
if (existing && existing.minWidth === config.minWidth && existing.maxWidth === config.maxWidth) return prev;
|
|
9253
9271
|
return {
|
|
9254
9272
|
...prev,
|
|
9255
|
-
[
|
|
9273
|
+
[side]: config
|
|
9256
9274
|
};
|
|
9257
9275
|
});
|
|
9258
9276
|
}, []);
|
|
9259
|
-
const unregisterSidebar = React$13.useCallback((
|
|
9277
|
+
const unregisterSidebar = React$13.useCallback((side) => {
|
|
9260
9278
|
setSidebarRegistry((prev) => {
|
|
9261
|
-
const { [
|
|
9279
|
+
const { [side]: _,...rest } = prev;
|
|
9262
9280
|
return rest;
|
|
9263
9281
|
});
|
|
9264
9282
|
}, []);
|
|
@@ -9266,22 +9284,22 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
9266
9284
|
effectiveOpenStatesRef.current = effectiveOpenStates;
|
|
9267
9285
|
const resolvedShortcuts = React$13.useMemo(() => {
|
|
9268
9286
|
if (keyboardShortcuts === false) return {};
|
|
9269
|
-
return keyboardShortcuts ?? { [SIDEBAR_KEYBOARD_SHORTCUT]: "
|
|
9287
|
+
return keyboardShortcuts ?? { [SIDEBAR_KEYBOARD_SHORTCUT]: "left" };
|
|
9270
9288
|
}, [keyboardShortcuts]);
|
|
9271
9289
|
React$13.useEffect(() => {
|
|
9272
9290
|
const entries = Object.entries(resolvedShortcuts);
|
|
9273
9291
|
if (entries.length === 0) return;
|
|
9274
9292
|
const handleKeyDown = (event) => {
|
|
9275
9293
|
if (!(event.metaKey || event.ctrlKey)) return;
|
|
9276
|
-
for (const [key,
|
|
9294
|
+
for (const [key, side] of entries) if (event.key === key) {
|
|
9277
9295
|
event.preventDefault();
|
|
9278
9296
|
if (isMobile) setMobileStates((prev) => ({
|
|
9279
9297
|
...prev,
|
|
9280
|
-
[
|
|
9298
|
+
[side]: !(prev[side] ?? false)
|
|
9281
9299
|
}));
|
|
9282
9300
|
else {
|
|
9283
|
-
const currentOpen = effectiveOpenStatesRef.current[
|
|
9284
|
-
setOpen(
|
|
9301
|
+
const currentOpen = effectiveOpenStatesRef.current[side] ?? defaultOpen;
|
|
9302
|
+
setOpen(side, !currentOpen);
|
|
9285
9303
|
}
|
|
9286
9304
|
return;
|
|
9287
9305
|
}
|
|
@@ -9326,7 +9344,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
9326
9344
|
minWidth,
|
|
9327
9345
|
maxWidth
|
|
9328
9346
|
]);
|
|
9329
|
-
const defaultWidth = effectiveWidthStates[
|
|
9347
|
+
const defaultWidth = effectiveWidthStates[controlledSide];
|
|
9330
9348
|
const sidebarWidthValue = defaultWidth ? `${defaultWidth}px` : SIDEBAR_WIDTH;
|
|
9331
9349
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
9332
9350
|
value: storeValue,
|
|
@@ -9349,22 +9367,20 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
9349
9367
|
|
|
9350
9368
|
//#endregion
|
|
9351
9369
|
//#region src/sidebar/sidebar.tsx
|
|
9352
|
-
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas",
|
|
9353
|
-
const { isMobile, state, openMobile, setOpenMobile, width, isResizing } = useSidebar(
|
|
9370
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", minWidth, maxWidth, className, children,...props }) {
|
|
9371
|
+
const { isMobile, state, openMobile, setOpenMobile, width, isResizing } = useSidebar(side);
|
|
9354
9372
|
const store = React$12.useContext(SidebarContext);
|
|
9355
9373
|
const storeRef = React$12.useRef(store);
|
|
9356
9374
|
storeRef.current = store;
|
|
9357
9375
|
const effectiveMinWidth = minWidth ?? store?.providerMinWidth ?? SIDEBAR_MIN_WIDTH;
|
|
9358
9376
|
const effectiveMaxWidth = maxWidth ?? store?.providerMaxWidth ?? SIDEBAR_MAX_WIDTH;
|
|
9359
9377
|
React$12.useEffect(() => {
|
|
9360
|
-
storeRef.current?.registerSidebar(
|
|
9361
|
-
side,
|
|
9378
|
+
storeRef.current?.registerSidebar(side, {
|
|
9362
9379
|
minWidth: effectiveMinWidth,
|
|
9363
9380
|
maxWidth: effectiveMaxWidth
|
|
9364
9381
|
});
|
|
9365
|
-
return () => storeRef.current?.unregisterSidebar(
|
|
9382
|
+
return () => storeRef.current?.unregisterSidebar(side);
|
|
9366
9383
|
}, [
|
|
9367
|
-
sidebarId,
|
|
9368
9384
|
side,
|
|
9369
9385
|
effectiveMinWidth,
|
|
9370
9386
|
effectiveMaxWidth
|
|
@@ -9374,8 +9390,8 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
9374
9390
|
"--sidebar-width": sidebarWidthValue,
|
|
9375
9391
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON
|
|
9376
9392
|
};
|
|
9377
|
-
const wrappedChildren = /* @__PURE__ */ jsx(
|
|
9378
|
-
value:
|
|
9393
|
+
const wrappedChildren = /* @__PURE__ */ jsx(SidebarSideContext.Provider, {
|
|
9394
|
+
value: side,
|
|
9379
9395
|
children
|
|
9380
9396
|
});
|
|
9381
9397
|
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
@@ -9436,13 +9452,11 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
9436
9452
|
})]
|
|
9437
9453
|
});
|
|
9438
9454
|
}
|
|
9439
|
-
function SidebarTrigger({ className, onClick,
|
|
9440
|
-
const
|
|
9441
|
-
const
|
|
9442
|
-
const
|
|
9443
|
-
const
|
|
9444
|
-
const side = store?.sidebarRegistry[resolvedId]?.side;
|
|
9445
|
-
const Icon = side === "right" ? PanelRightIcon : PanelLeftIcon;
|
|
9455
|
+
function SidebarTrigger({ className, onClick, side, children,...props }) {
|
|
9456
|
+
const ctxSide = React$12.useContext(SidebarSideContext);
|
|
9457
|
+
const resolvedSide = side ?? ctxSide ?? "left";
|
|
9458
|
+
const { toggleSidebar } = useSidebar(resolvedSide);
|
|
9459
|
+
const Icon = resolvedSide === "right" ? PanelRightIcon : PanelLeftIcon;
|
|
9446
9460
|
return /* @__PURE__ */ jsx(Button, {
|
|
9447
9461
|
"data-sidebar": "trigger",
|
|
9448
9462
|
"data-slot": "sidebar-trigger",
|
|
@@ -9465,8 +9479,8 @@ function SidebarRail({ className,...props }) {
|
|
|
9465
9479
|
const store = React$12.useContext(SidebarContext);
|
|
9466
9480
|
const startXRef = React$12.useRef(0);
|
|
9467
9481
|
const hasDraggedRef = React$12.useRef(false);
|
|
9468
|
-
const
|
|
9469
|
-
const isResizable = !!store?.sidebarRegistry[
|
|
9482
|
+
const side = React$12.useContext(SidebarSideContext);
|
|
9483
|
+
const isResizable = !!(side && store?.sidebarRegistry[side]);
|
|
9470
9484
|
const handleMouseDown = React$12.useCallback((e) => {
|
|
9471
9485
|
if (!isResizable) return;
|
|
9472
9486
|
e.preventDefault();
|
|
@@ -9475,11 +9489,11 @@ function SidebarRail({ className,...props }) {
|
|
|
9475
9489
|
store?.setIsResizing(true);
|
|
9476
9490
|
const sidebarEl = e.target.closest("[data-slot=\"sidebar-container\"]");
|
|
9477
9491
|
const sidebarLeft = sidebarEl?.getBoundingClientRect().left ?? 0;
|
|
9478
|
-
const side = e.target.closest("[data-side]")?.getAttribute("data-side");
|
|
9492
|
+
const side$1 = e.target.closest("[data-side]")?.getAttribute("data-side");
|
|
9479
9493
|
const handleMouseMove = (moveEvent) => {
|
|
9480
9494
|
if (Math.abs(moveEvent.clientX - startXRef.current) > 3) hasDraggedRef.current = true;
|
|
9481
9495
|
let newWidth;
|
|
9482
|
-
if (side === "right") {
|
|
9496
|
+
if (side$1 === "right") {
|
|
9483
9497
|
const sidebarRight = sidebarEl?.getBoundingClientRect().right ?? globalThis.innerWidth;
|
|
9484
9498
|
newWidth = sidebarRight - moveEvent.clientX;
|
|
9485
9499
|
} else newWidth = moveEvent.clientX - sidebarLeft;
|
|
@@ -9741,24 +9755,34 @@ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false,
|
|
|
9741
9755
|
//#endregion
|
|
9742
9756
|
//#region src/sidebar/sidebar-tab-context-provider.tsx
|
|
9743
9757
|
const SidebarTabsContext = React$11.createContext(null);
|
|
9744
|
-
function SidebarTabsProvider({ children }) {
|
|
9758
|
+
function SidebarTabsProvider({ children, storageKey }) {
|
|
9745
9759
|
const [tabsMap, setTabsMap] = React$11.useState({});
|
|
9746
|
-
const [
|
|
9747
|
-
const
|
|
9748
|
-
|
|
9760
|
+
const [portalTargets, setPortalTargets] = React$11.useState({});
|
|
9761
|
+
const fallbackKey = React$11.useId();
|
|
9762
|
+
const [storedActiveTabs, setStoredActiveTabs] = useLocalStorageState(storageKey ?? fallbackKey, {
|
|
9763
|
+
defaultValue: {},
|
|
9764
|
+
storageSync: !!storageKey
|
|
9765
|
+
});
|
|
9766
|
+
const [activeTab, setActiveTabState] = React$11.useState(storedActiveTabs);
|
|
9767
|
+
const setPortalTarget = React$11.useCallback((side, tabId, element) => {
|
|
9768
|
+
setPortalTargets((prev) => {
|
|
9749
9769
|
const next = new Map(prev[side]);
|
|
9750
|
-
next.set(
|
|
9770
|
+
if (element) next.set(tabId, element);
|
|
9771
|
+
else next.delete(tabId);
|
|
9751
9772
|
return {
|
|
9752
9773
|
...prev,
|
|
9753
9774
|
[side]: next
|
|
9754
9775
|
};
|
|
9755
9776
|
});
|
|
9756
|
-
|
|
9757
|
-
|
|
9777
|
+
}, []);
|
|
9778
|
+
const register = React$11.useCallback((side, tab) => {
|
|
9779
|
+
setTabsMap((prev) => {
|
|
9780
|
+
const next = new Map(prev[side]);
|
|
9781
|
+
next.set(tab.id, tab);
|
|
9782
|
+
return {
|
|
9758
9783
|
...prev,
|
|
9759
|
-
[side]:
|
|
9784
|
+
[side]: next
|
|
9760
9785
|
};
|
|
9761
|
-
return prev;
|
|
9762
9786
|
});
|
|
9763
9787
|
}, []);
|
|
9764
9788
|
const unregister = React$11.useCallback((side, tabId) => {
|
|
@@ -9770,13 +9794,6 @@ function SidebarTabsProvider({ children }) {
|
|
|
9770
9794
|
[side]: next
|
|
9771
9795
|
};
|
|
9772
9796
|
});
|
|
9773
|
-
setActiveTabState((prev) => {
|
|
9774
|
-
if (prev[side] === tabId) return {
|
|
9775
|
-
...prev,
|
|
9776
|
-
[side]: null
|
|
9777
|
-
};
|
|
9778
|
-
return prev;
|
|
9779
|
-
});
|
|
9780
9797
|
}, []);
|
|
9781
9798
|
const setActiveTab = React$11.useCallback((side, tabId) => {
|
|
9782
9799
|
setActiveTabState((prev) => {
|
|
@@ -9793,18 +9810,35 @@ function SidebarTabsProvider({ children }) {
|
|
|
9793
9810
|
for (const [side, map] of Object.entries(tabsMap)) result[side] = sort(map);
|
|
9794
9811
|
return result;
|
|
9795
9812
|
}, [tabsMap]);
|
|
9813
|
+
const resolvedActiveTab = React$11.useMemo(() => {
|
|
9814
|
+
const result = {};
|
|
9815
|
+
for (const [side, tabs] of Object.entries(sortedTabs)) {
|
|
9816
|
+
const desired = activeTab[side];
|
|
9817
|
+
if (desired && tabs.some((t) => t.id === desired)) result[side] = desired;
|
|
9818
|
+
else if (tabs.length > 0) result[side] = tabs[0].id;
|
|
9819
|
+
else result[side] = null;
|
|
9820
|
+
}
|
|
9821
|
+
return result;
|
|
9822
|
+
}, [sortedTabs, activeTab]);
|
|
9823
|
+
React$11.useEffect(() => {
|
|
9824
|
+
setStoredActiveTabs(resolvedActiveTab);
|
|
9825
|
+
}, [resolvedActiveTab, setStoredActiveTabs]);
|
|
9796
9826
|
const value = React$11.useMemo(() => ({
|
|
9797
9827
|
tabs: sortedTabs,
|
|
9798
|
-
activeTab,
|
|
9828
|
+
activeTab: resolvedActiveTab,
|
|
9799
9829
|
register,
|
|
9800
9830
|
unregister,
|
|
9801
|
-
setActiveTab
|
|
9831
|
+
setActiveTab,
|
|
9832
|
+
portalTargets,
|
|
9833
|
+
setPortalTarget
|
|
9802
9834
|
}), [
|
|
9803
9835
|
sortedTabs,
|
|
9804
|
-
|
|
9836
|
+
resolvedActiveTab,
|
|
9805
9837
|
register,
|
|
9806
9838
|
unregister,
|
|
9807
|
-
setActiveTab
|
|
9839
|
+
setActiveTab,
|
|
9840
|
+
portalTargets,
|
|
9841
|
+
setPortalTarget
|
|
9808
9842
|
]);
|
|
9809
9843
|
return /* @__PURE__ */ jsx(SidebarTabsContext.Provider, {
|
|
9810
9844
|
value,
|
|
@@ -9833,21 +9867,17 @@ function useSidebarTabs(side) {
|
|
|
9833
9867
|
|
|
9834
9868
|
//#endregion
|
|
9835
9869
|
//#region src/sidebar/sidebar-tab.tsx
|
|
9836
|
-
function SidebarTab({ side, id, icon, label,
|
|
9870
|
+
function SidebarTab({ side, id, icon, label, order, badge, children }) {
|
|
9837
9871
|
const ctx = React$10.useContext(SidebarTabsContext);
|
|
9838
9872
|
if (!ctx) throw new Error("SidebarTab must be used within a SidebarTabsProvider.");
|
|
9839
9873
|
const { register, unregister } = ctx;
|
|
9840
|
-
const renderRef = React$10.useRef(render);
|
|
9841
|
-
renderRef.current = render;
|
|
9842
9874
|
const iconRef = React$10.useRef(icon);
|
|
9843
9875
|
iconRef.current = icon;
|
|
9844
|
-
const stableRender = React$10.useCallback(() => renderRef.current(), []);
|
|
9845
9876
|
React$10.useEffect(() => {
|
|
9846
9877
|
register(side, {
|
|
9847
9878
|
id,
|
|
9848
9879
|
icon: iconRef.current,
|
|
9849
9880
|
label,
|
|
9850
|
-
render: stableRender,
|
|
9851
9881
|
order,
|
|
9852
9882
|
badge
|
|
9853
9883
|
});
|
|
@@ -9859,55 +9889,72 @@ function SidebarTab({ side, id, icon, label, render, order, badge }) {
|
|
|
9859
9889
|
order,
|
|
9860
9890
|
badge,
|
|
9861
9891
|
register,
|
|
9862
|
-
unregister
|
|
9863
|
-
stableRender
|
|
9892
|
+
unregister
|
|
9864
9893
|
]);
|
|
9865
|
-
|
|
9894
|
+
const target = ctx.portalTargets[side]?.get(id);
|
|
9895
|
+
if (!target) return null;
|
|
9896
|
+
return createPortal(children, target);
|
|
9866
9897
|
}
|
|
9867
9898
|
function DynamicTabbedSidebar({ side, orientation = "horizontal", collapsible = "offcanvas", className,...sidebarProps }) {
|
|
9868
9899
|
const ctx = React$10.useContext(SidebarTabsContext);
|
|
9869
9900
|
if (!ctx) throw new Error("DynamicTabbedSidebar must be used within a SidebarTabsProvider.");
|
|
9870
|
-
const { setActiveTab } = ctx;
|
|
9871
9901
|
const tabs = ctx.tabs[side] ?? [];
|
|
9872
9902
|
const activeTabId = ctx.activeTab[side] ?? null;
|
|
9873
|
-
const activeTab = tabs.find((t) => t.id === activeTabId);
|
|
9874
|
-
React$10.useEffect(() => {
|
|
9875
|
-
if (tabs.length > 0 && tabs[0] && !activeTab) setActiveTab(side, tabs[0].id);
|
|
9876
|
-
}, [
|
|
9877
|
-
tabs,
|
|
9878
|
-
activeTab,
|
|
9879
|
-
side,
|
|
9880
|
-
setActiveTab
|
|
9881
|
-
]);
|
|
9882
9903
|
const isVertical = orientation === "vertical";
|
|
9883
9904
|
const effectiveCollapsible = isVertical && collapsible === "offcanvas" ? "icon" : collapsible;
|
|
9884
|
-
|
|
9905
|
+
if (tabs.length === 0) return null;
|
|
9906
|
+
return /* @__PURE__ */ jsx(Sidebar, {
|
|
9885
9907
|
side,
|
|
9886
|
-
sidebarId: side,
|
|
9887
9908
|
collapsible: effectiveCollapsible,
|
|
9888
9909
|
className,
|
|
9889
9910
|
...sidebarProps,
|
|
9890
|
-
children: [/* @__PURE__ */ jsx(TabbedSidebarContent, {
|
|
9911
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TabbedSidebarContent, {
|
|
9891
9912
|
side,
|
|
9892
9913
|
tabs,
|
|
9893
9914
|
activeTabId,
|
|
9894
|
-
activeTab,
|
|
9895
9915
|
isVertical,
|
|
9896
9916
|
collapsible: effectiveCollapsible
|
|
9897
|
-
}), /* @__PURE__ */ jsx(SidebarRail, {})]
|
|
9917
|
+
}), /* @__PURE__ */ jsx(SidebarRail, {})] })
|
|
9898
9918
|
});
|
|
9899
9919
|
}
|
|
9900
|
-
function
|
|
9920
|
+
function TabPortalTargets({ side, tabs, activeTabId, hidden }) {
|
|
9921
|
+
const ctx = React$10.useContext(SidebarTabsContext);
|
|
9922
|
+
const callbackRefs = React$10.useRef(new Map());
|
|
9923
|
+
const getRef = (tabId) => {
|
|
9924
|
+
let ref = callbackRefs.current.get(tabId);
|
|
9925
|
+
if (!ref) {
|
|
9926
|
+
ref = (el) => {
|
|
9927
|
+
ctx.setPortalTarget(side, tabId, el);
|
|
9928
|
+
};
|
|
9929
|
+
callbackRefs.current.set(tabId, ref);
|
|
9930
|
+
}
|
|
9931
|
+
return ref;
|
|
9932
|
+
};
|
|
9933
|
+
return /* @__PURE__ */ jsx(Fragment, { children: tabs.map((tab) => {
|
|
9934
|
+
const isVisible = !hidden && tab.id === activeTabId;
|
|
9935
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9936
|
+
ref: getRef(tab.id),
|
|
9937
|
+
hidden: !isVisible || void 0,
|
|
9938
|
+
className: isVisible ? "flex flex-col flex-1 min-h-0" : void 0
|
|
9939
|
+
}, tab.id);
|
|
9940
|
+
}) });
|
|
9941
|
+
}
|
|
9942
|
+
function TabbedSidebarContent({ side, tabs, activeTabId, isVertical, collapsible }) {
|
|
9901
9943
|
const { state } = useSidebar(side);
|
|
9902
9944
|
const isCollapsed = state === "collapsed";
|
|
9903
9945
|
const isIconCollapsible = collapsible === "icon";
|
|
9904
|
-
if (isCollapsed && isIconCollapsible) return /* @__PURE__ */
|
|
9946
|
+
if (isCollapsed && isIconCollapsible) return /* @__PURE__ */ jsxs("div", {
|
|
9905
9947
|
className: "flex h-full flex-col",
|
|
9906
|
-
children: /* @__PURE__ */ jsx(VerticalTabBar, {
|
|
9948
|
+
children: [/* @__PURE__ */ jsx(VerticalTabBar, {
|
|
9907
9949
|
side,
|
|
9908
9950
|
tabs,
|
|
9909
9951
|
activeTabId
|
|
9910
|
-
})
|
|
9952
|
+
}), /* @__PURE__ */ jsx(TabPortalTargets, {
|
|
9953
|
+
side,
|
|
9954
|
+
tabs,
|
|
9955
|
+
activeTabId,
|
|
9956
|
+
hidden: true
|
|
9957
|
+
})]
|
|
9911
9958
|
});
|
|
9912
9959
|
if (isVertical) return /* @__PURE__ */ jsxs("div", {
|
|
9913
9960
|
className: "flex h-full flex-row",
|
|
@@ -9915,10 +9962,11 @@ function TabbedSidebarContent({ side, tabs, activeTabId, activeTab, isVertical,
|
|
|
9915
9962
|
side,
|
|
9916
9963
|
tabs,
|
|
9917
9964
|
activeTabId
|
|
9918
|
-
}), /* @__PURE__ */ jsx(
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9965
|
+
}), /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(TabPortalTargets, {
|
|
9966
|
+
side,
|
|
9967
|
+
tabs,
|
|
9968
|
+
activeTabId
|
|
9969
|
+
}) })]
|
|
9922
9970
|
});
|
|
9923
9971
|
return /* @__PURE__ */ jsxs("div", {
|
|
9924
9972
|
className: "flex h-full flex-col",
|
|
@@ -9929,10 +9977,11 @@ function TabbedSidebarContent({ side, tabs, activeTabId, activeTab, isVertical,
|
|
|
9929
9977
|
activeTabId
|
|
9930
9978
|
}),
|
|
9931
9979
|
tabs.length > 0 && /* @__PURE__ */ jsx(SidebarSeparator, {}),
|
|
9932
|
-
/* @__PURE__ */ jsx(
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9980
|
+
/* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(TabPortalTargets, {
|
|
9981
|
+
side,
|
|
9982
|
+
tabs,
|
|
9983
|
+
activeTabId
|
|
9984
|
+
}) })
|
|
9936
9985
|
]
|
|
9937
9986
|
});
|
|
9938
9987
|
}
|
|
@@ -11395,5 +11444,5 @@ const TreeView = React$1.forwardRef(({ data, onNodeSelect, onGroupSelect, onTogg
|
|
|
11395
11444
|
TreeView.displayName = "TreeView";
|
|
11396
11445
|
|
|
11397
11446
|
//#endregion
|
|
11398
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCreate, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, DeferredInput, DeferredNumberInput, DeferredTextarea, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HierarchyCell, HierarchyItem, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader,
|
|
11447
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCreate, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, DeferredInput, DeferredNumberInput, DeferredTextarea, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HierarchyCell, HierarchyItem, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSideContext, SidebarTab, SidebarTabsContext, SidebarTabsProvider, SidebarTrigger, Skeleton, Slicer, SlicerHierarchyItem, Slider, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, StepperSeparator, StepperTitle, StepperTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeBranch, TreeView, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getInitialExpandedIds, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useRegisteredSidebars, useSidebar, useSidebarTabs, useStore as useStepper };
|
|
11399
11448
|
//# sourceMappingURL=index.js.map
|