@acronis-platform/ui-react 0.53.0 → 0.55.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/components/ui/avatar/avatar.js +1 -1
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +5 -5
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/chip/chip.js +1 -1
- package/dist/components/ui/chip/chip.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +51 -47
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/data-table/data-table-column-header.js +7 -7
- package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/ui/data-table/data-table-view-options.js +4 -4
- package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +1 -1
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +36 -35
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +55 -54
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/filter-search/filter-search.js +28 -0
- package/dist/components/ui/filter-search/filter-search.js.map +1 -0
- package/dist/components/ui/input-date-picker/input-date-picker.js +8 -8
- package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
- package/dist/components/ui/input-search/input-search.js +11 -12
- package/dist/components/ui/input-search/input-search.js.map +1 -1
- package/dist/components/ui/input-select/input-select.js +72 -68
- package/dist/components/ui/input-select/input-select.js.map +1 -1
- package/dist/components/ui/input-text/input-text.js +6 -6
- package/dist/components/ui/input-text/input-text.js.map +1 -1
- package/dist/components/ui/popover/popover.js +18 -17
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/resizable/resizable.js +24 -32
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +61 -0
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/sheet/sheet.js +38 -37
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/sidebar-primary/sidebar-primary.js +203 -141
- package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +509 -351
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
- package/dist/components/ui/switch/switch.js +6 -6
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.js +7 -7
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +11 -11
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/toast/toast.js +35 -33
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +41 -37
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/index.js +353 -349
- package/dist/index.js.map +1 -1
- package/dist/lib/portal-container.js +14 -0
- package/dist/lib/portal-container.js.map +1 -0
- package/dist/react.js +353 -349
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/filter-search/filter-search.d.ts +6 -0
- package/dist/src/components/ui/filter-search/index.d.ts +2 -0
- package/dist/src/components/ui/resizable/index.d.ts +2 -1
- package/dist/src/components/ui/resizable/resizable.d.ts +2 -5
- package/dist/src/components/ui/scroll-area/index.d.ts +1 -0
- package/dist/src/components/ui/scroll-area/scroll-area.d.ts +10 -0
- package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +48 -3
- package/dist/src/components/ui/sidebar-secondary/index.d.ts +1 -1
- package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +38 -33
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/portal-container.d.ts +36 -0
- package/dist/ui-react.css +1 -1
- package/package.json +2 -3
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type FilterSearchProps = React.ComponentPropsWithoutRef<'div'>;
|
|
3
|
+
declare const FilterSearch: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type FilterSearchActionsProps = React.ComponentPropsWithoutRef<'div'>;
|
|
5
|
+
declare const FilterSearchActions: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FilterSearch, FilterSearchActions };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { ResizablePanelGroup, ResizablePanel, ResizableHandle,
|
|
1
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './resizable';
|
|
2
|
+
export type { ResizableHandleProps } from './resizable';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
2
2
|
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare function ResizablePanel(props: ResizablePrimitive.PanelProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
withHandle?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type ResizableHandleProps = ResizablePrimitive.SeparatorProps;
|
|
5
|
+
declare function ResizableHandle({ className, ...props }: ResizableHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
9
6
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ScrollArea, ScrollBar, type ScrollAreaProps, type ScrollBarProps, } from './scroll-area';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type ScrollBarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;
|
|
4
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ScrollAreaScrollbarProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
|
|
6
|
+
/** Which scrollbar(s) to render. @default 'vertical' */
|
|
7
|
+
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
8
|
+
}
|
|
9
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Tracks whether `ref`'s element is clipping its own content (`scrollWidth >
|
|
6
|
+
* clientWidth`) — used to gate a tooltip so it only opens when a truncated
|
|
7
|
+
* label is actually cut off. Re-measures via `ResizeObserver` (covers the
|
|
8
|
+
* rail's expand/collapse width transition); `enabled` skips measurement
|
|
9
|
+
* entirely (e.g. while collapsed, where the label is `sr-only`).
|
|
10
|
+
*/
|
|
11
|
+
declare function useIsOverflowing<T extends Element>(ref: React.RefObject<T | null>, { enabled }: {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
}): boolean;
|
|
4
14
|
export interface SidebarPrimaryProps extends React.ComponentPropsWithoutRef<'nav'> {
|
|
5
15
|
/** Controlled expanded (rail width) state. */
|
|
6
16
|
expanded?: boolean;
|
|
@@ -15,7 +25,22 @@ export interface SidebarPrimaryProps extends React.ComponentPropsWithoutRef<'nav
|
|
|
15
25
|
render?: useRender.RenderProp;
|
|
16
26
|
}
|
|
17
27
|
declare const SidebarPrimary: React.ForwardRefExoticComponent<SidebarPrimaryProps & React.RefAttributes<HTMLElement>>;
|
|
18
|
-
|
|
28
|
+
export interface SidebarPrimaryHeaderProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
29
|
+
/**
|
|
30
|
+
* Logo content shown while the rail is expanded (e.g. a full lockup).
|
|
31
|
+
* Pairs with `collapsedLogo` to swap distinct graphics per rail state
|
|
32
|
+
* instead of resizing one. When neither `logo` nor `collapsedLogo` is
|
|
33
|
+
* given, `children` renders in both states (the original single-slot
|
|
34
|
+
* behavior).
|
|
35
|
+
*/
|
|
36
|
+
logo?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Logo content shown while the rail is collapsed (e.g. a monogram mark).
|
|
39
|
+
* Falls back to `logo` when omitted.
|
|
40
|
+
*/
|
|
41
|
+
collapsedLogo?: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
declare const SidebarPrimaryHeader: React.ForwardRefExoticComponent<SidebarPrimaryHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
44
|
declare const SidebarPrimaryContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
45
|
declare const SidebarPrimaryFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
46
|
declare const SidebarPrimarySection: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -29,6 +54,15 @@ export interface SidebarPrimaryMenuItemProps extends Omit<React.ComponentPropsWi
|
|
|
29
54
|
/** Leading 16px icon (from `@acronis-platform/icons-react`). */
|
|
30
55
|
icon?: React.ReactNode;
|
|
31
56
|
children?: React.ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Trailing affordance — a `SidebarPrimaryMenuItemExtras` element. Rendered as
|
|
59
|
+
* a flex sibling of the label (its own `gap` from `_global/container/gap`),
|
|
60
|
+
* not nested inside the label's truncating span — nesting it there collapses
|
|
61
|
+
* the row gap and lets `truncate` clip the affordance. Hidden in collapsed/rail
|
|
62
|
+
* mode regardless of node type — the parent wraps it, so this holds even for
|
|
63
|
+
* a raw node rather than `SidebarPrimaryMenuItemExtras`.
|
|
64
|
+
*/
|
|
65
|
+
extras?: React.ReactNode;
|
|
32
66
|
/**
|
|
33
67
|
* Replace the rendered `<a>` with another element or component (e.g. a router
|
|
34
68
|
* `Link` or a `<button>`) via Base UI composition.
|
|
@@ -41,7 +75,12 @@ export interface SidebarPrimaryMenuItemExtrasProps extends React.ComponentPropsW
|
|
|
41
75
|
variant: 'tag' | 'externalLink' | 'shortcut' | 'tag-externalLink';
|
|
42
76
|
/** Shortcut text (e.g. "⌘H") for the `shortcut` variant. */
|
|
43
77
|
shortcut?: string;
|
|
44
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Tag content for the `tag` / `tag-externalLink` variants. Figma constrains
|
|
80
|
+
* this slot's `Tag` instance to `size="sm"` (no other size is offered on
|
|
81
|
+
* MenuItemExtras) — always pass a `<Tag variant="info" size="sm">`, never the
|
|
82
|
+
* default size.
|
|
83
|
+
*/
|
|
45
84
|
tag?: React.ReactNode;
|
|
46
85
|
}
|
|
47
86
|
declare const SidebarPrimaryMenuItemExtras: React.ForwardRefExoticComponent<SidebarPrimaryMenuItemExtrasProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -49,6 +88,12 @@ export interface SidebarPrimaryCollapseTriggerProps extends Omit<React.Component
|
|
|
49
88
|
/** Leading 16px icon (e.g. a panel-left glyph). */
|
|
50
89
|
icon?: React.ReactNode;
|
|
51
90
|
children?: React.ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Trailing affordance — a `SidebarPrimaryMenuItemExtras` element (Figma
|
|
93
|
+
* shows a `⌘H` shortcut here). Rendered as a flex sibling of the label, same
|
|
94
|
+
* as `SidebarPrimaryMenuItem`'s `extras` prop.
|
|
95
|
+
*/
|
|
96
|
+
extras?: React.ReactNode;
|
|
52
97
|
}
|
|
53
98
|
declare const SidebarPrimaryCollapseTrigger: React.ForwardRefExoticComponent<SidebarPrimaryCollapseTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
-
export { SidebarPrimary, SidebarPrimaryHeader, SidebarPrimaryContent, SidebarPrimaryFooter, SidebarPrimarySection, SidebarPrimaryMenu, SidebarPrimaryMenuItem, SidebarPrimaryMenuItemExtras, SidebarPrimaryCollapseTrigger, sidebarPrimaryMenuItemVariants, };
|
|
99
|
+
export { SidebarPrimary, SidebarPrimaryHeader, SidebarPrimaryContent, SidebarPrimaryFooter, SidebarPrimarySection, SidebarPrimaryMenu, SidebarPrimaryMenuItem, SidebarPrimaryMenuItemExtras, SidebarPrimaryCollapseTrigger, useIsOverflowing, sidebarPrimaryMenuItemVariants, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SidebarSecondary, SidebarSecondaryHeader, SidebarSecondaryContent,
|
|
1
|
+
export { SidebarSecondary, SidebarSecondaryHeader, SidebarSecondaryContent, SidebarSecondaryFooter, SidebarSecondarySection, SidebarSecondarySectionLabel, SidebarSecondaryMenu, SidebarSecondaryMenuItem, SidebarSecondaryMenuItemExtras, SidebarSecondaryCollapseTrigger, sidebarSecondaryMenuItemVariants, type SidebarSecondaryProps, type SidebarSecondaryHeaderProps, type SidebarSecondaryMenuItemProps, type SidebarSecondaryMenuItemExtrasProps, type SidebarSecondaryCollapseTriggerProps, } from './sidebar-secondary';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
-
import { Collapsible } from '@base-ui/react/collapsible';
|
|
3
2
|
import { VariantProps } from 'class-variance-authority';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'nav'> {
|
|
@@ -9,6 +8,22 @@ export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'n
|
|
|
9
8
|
defaultExpanded?: boolean;
|
|
10
9
|
/** Fires when the expanded state changes (e.g. a consumer toggle). */
|
|
11
10
|
onExpandedChange?: (expanded: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Enable the draggable resize edge on the right border.
|
|
13
|
+
* When `true`, the sidebar can be resized between the expanded-width token
|
|
14
|
+
* and twice that value.
|
|
15
|
+
*/
|
|
16
|
+
resizable?: boolean;
|
|
17
|
+
/** Controlled width in px (only used when `resizable`). */
|
|
18
|
+
width?: number;
|
|
19
|
+
/** Fires when the width changes due to a drag interaction. */
|
|
20
|
+
onWidthChange?: (width: number) => void;
|
|
21
|
+
/** Accessible label for the resize edge (`role="separator"`). Defaults to `'Resize sidebar'`. */
|
|
22
|
+
resizeAriaLabel?: string;
|
|
23
|
+
/** Tooltip content shown when the sidebar is expanded. Pass `null` to hide the tooltip entirely. */
|
|
24
|
+
resizeTooltipExpanded?: React.ReactNode;
|
|
25
|
+
/** Tooltip content shown when the sidebar is collapsed. Pass `null` to hide the tooltip entirely. */
|
|
26
|
+
resizeTooltipCollapsed?: React.ReactNode;
|
|
12
27
|
/**
|
|
13
28
|
* Replace the rendered `<nav>` with another element or component
|
|
14
29
|
* (Base UI composition). Accepts a React element or a render function.
|
|
@@ -23,11 +38,17 @@ export interface SidebarSecondaryHeaderProps extends React.ComponentPropsWithout
|
|
|
23
38
|
declare const SidebarSecondaryHeader: React.ForwardRefExoticComponent<SidebarSecondaryHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
39
|
declare const SidebarSecondaryContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
40
|
export interface SidebarSecondaryCollapsedBreadcrumbProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
/**
|
|
42
|
+
* The parent section label (breadcrumbLabel).
|
|
43
|
+
* Auto-derived from the `SidebarSecondaryHeader` label when omitted.
|
|
44
|
+
*/
|
|
45
|
+
parentLabel?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* The current page label (labelCurrentPage).
|
|
48
|
+
* Auto-derived from the selected `SidebarSecondaryMenuItem` when omitted.
|
|
49
|
+
*/
|
|
50
|
+
currentLabel?: React.ReactNode;
|
|
51
|
+
/** Separator between the two; defaults to a 16px ChevronDownIcon. */
|
|
31
52
|
separator?: React.ReactNode;
|
|
32
53
|
}
|
|
33
54
|
declare const SidebarSecondaryCollapsedBreadcrumb: React.ForwardRefExoticComponent<SidebarSecondaryCollapsedBreadcrumbProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -63,32 +84,15 @@ declare const sidebarSecondaryMenuItemVariants: (props?: ({
|
|
|
63
84
|
export interface SidebarSecondaryMenuItemProps extends Omit<React.ComponentPropsWithoutRef<'a'>, 'children'>, Omit<VariantProps<typeof sidebarSecondaryMenuItemVariants>, 'variant'> {
|
|
64
85
|
/** Marks the current route: sets the `selected` variant + `aria-current="page"`. */
|
|
65
86
|
selected?: boolean;
|
|
66
|
-
/** Optional leading 16px icon (
|
|
87
|
+
/** Optional leading 16px icon (`hasIcon` in Figma). */
|
|
67
88
|
icon?: React.ReactNode;
|
|
89
|
+
/** Trailing extras (tag, shortcut, external-link icon — `hasExtras` in Figma). */
|
|
90
|
+
extras?: React.ReactNode;
|
|
68
91
|
children?: React.ReactNode;
|
|
69
92
|
/** Replace the rendered `<a>` (e.g. a router `Link` or a `<button>`). */
|
|
70
93
|
render?: useRender.RenderProp;
|
|
71
94
|
}
|
|
72
95
|
declare const SidebarSecondaryMenuItem: React.ForwardRefExoticComponent<SidebarSecondaryMenuItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
73
|
-
export type SidebarSecondaryMenuSubProps = React.ComponentPropsWithoutRef<typeof Collapsible.Root>;
|
|
74
|
-
declare const SidebarSecondaryMenuSub: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsibleRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
-
export interface SidebarSecondaryMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Collapsible.Trigger> {
|
|
76
|
-
/** Marks the parent row as selected. */
|
|
77
|
-
selected?: boolean;
|
|
78
|
-
/** Optional leading 16px icon. */
|
|
79
|
-
icon?: React.ReactNode;
|
|
80
|
-
}
|
|
81
|
-
declare const SidebarSecondaryMenuSubTrigger: React.ForwardRefExoticComponent<SidebarSecondaryMenuSubTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
-
export type SidebarSecondaryMenuSubContentProps = React.ComponentPropsWithoutRef<typeof Collapsible.Panel>;
|
|
83
|
-
declare const SidebarSecondaryMenuSubContent: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsiblePanelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
-
export interface SidebarSecondaryMenuSubItemProps extends Omit<React.ComponentPropsWithoutRef<'a'>, 'children'> {
|
|
85
|
-
/** Marks the current route (Level-2 — no icon). */
|
|
86
|
-
selected?: boolean;
|
|
87
|
-
children?: React.ReactNode;
|
|
88
|
-
/** Replace the rendered `<a>` (e.g. a router `Link`). */
|
|
89
|
-
render?: useRender.RenderProp;
|
|
90
|
-
}
|
|
91
|
-
declare const SidebarSecondaryMenuSubItem: React.ForwardRefExoticComponent<SidebarSecondaryMenuSubItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
92
96
|
export interface SidebarSecondaryMenuItemExtrasProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
93
97
|
/** Which trailing affordance to render. */
|
|
94
98
|
variant: 'tag' | 'externalLink' | 'shortcut' | 'tag-externalLink';
|
|
@@ -99,14 +103,15 @@ export interface SidebarSecondaryMenuItemExtrasProps extends React.ComponentProp
|
|
|
99
103
|
}
|
|
100
104
|
declare const SidebarSecondaryMenuItemExtras: React.ForwardRefExoticComponent<SidebarSecondaryMenuItemExtrasProps & React.RefAttributes<HTMLSpanElement>>;
|
|
101
105
|
export interface SidebarSecondaryCollapseTriggerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'children'> {
|
|
102
|
-
/**
|
|
106
|
+
/** Icon shown when the sidebar is expanded (collapse affordance). */
|
|
103
107
|
icon?: React.ReactNode;
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
shortcut
|
|
108
|
+
/** Icon shown when the sidebar is collapsed (expand affordance). Falls back to `icon` when omitted. */
|
|
109
|
+
expandIcon?: React.ReactNode;
|
|
110
|
+
/** Tooltip text shown when the sidebar is collapsed. Defaults to `'Expand'`. */
|
|
111
|
+
expandTooltip?: React.ReactNode;
|
|
112
|
+
/** Trailing extras (e.g. a keyboard shortcut hint), same slot as `SidebarSecondaryMenuItem`. */
|
|
113
|
+
extras?: React.ReactNode;
|
|
109
114
|
children?: React.ReactNode;
|
|
110
115
|
}
|
|
111
116
|
declare const SidebarSecondaryCollapseTrigger: React.ForwardRefExoticComponent<SidebarSecondaryCollapseTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
112
|
-
export { SidebarSecondary, SidebarSecondaryHeader, SidebarSecondaryContent, SidebarSecondaryCollapsedBreadcrumb, SidebarSecondaryFooter, SidebarSecondarySection, SidebarSecondarySectionLabel, SidebarSecondaryMenu, SidebarSecondaryMenuItem,
|
|
117
|
+
export { SidebarSecondary, SidebarSecondaryHeader, SidebarSecondaryContent, SidebarSecondaryCollapsedBreadcrumb, SidebarSecondaryFooter, SidebarSecondarySection, SidebarSecondarySectionLabel, SidebarSecondaryMenu, SidebarSecondaryMenuItem, SidebarSecondaryMenuItemExtras, SidebarSecondaryCollapseTrigger, sidebarSecondaryMenuItemVariants, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
|
+
export { PortalContainerProvider, usePortalContainer, type PortalContainerProviderProps, } from './lib/portal-container';
|
|
2
3
|
export * from './components/ui/accordion';
|
|
3
4
|
export * from './components/ui/alert';
|
|
4
5
|
export * from './components/ui/app-shell';
|
|
@@ -38,6 +39,7 @@ export * from './components/ui/pagination';
|
|
|
38
39
|
export * from './components/ui/popover';
|
|
39
40
|
export * from './components/ui/progress';
|
|
40
41
|
export * from './components/ui/progress-circle';
|
|
42
|
+
export * from './components/ui/scroll-area';
|
|
41
43
|
export * from './components/ui/search-global';
|
|
42
44
|
export { InputText as Input, type InputTextProps as InputProps, } from './components/ui/input-text';
|
|
43
45
|
export { InputSearch as Search, type InputSearchProps as SearchProps, } from './components/ui/input-search';
|
|
@@ -54,6 +56,7 @@ export * from './components/ui/resizable';
|
|
|
54
56
|
export * from './components/ui/sidebar-primary';
|
|
55
57
|
export * from './components/ui/sidebar-secondary';
|
|
56
58
|
export * from './components/ui/button-icon';
|
|
59
|
+
export * from './components/ui/filter-search';
|
|
57
60
|
export * from './components/ui/switch';
|
|
58
61
|
export * from './components/ui/table';
|
|
59
62
|
export * from './components/ui/tabs';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PortalContainerProviderProps {
|
|
3
|
+
/**
|
|
4
|
+
* The DOM element portaled content should render into (e.g. a `<div>` inside
|
|
5
|
+
* a shadow root). When set, every ui-react portaling component
|
|
6
|
+
* (`Popover`, `DropdownMenu`, `Tooltip`, `Dialog`, `Sheet`, `Select`,
|
|
7
|
+
* `Combobox`, `Toast`) will mount its popup inside this element instead of
|
|
8
|
+
* `document.body`.
|
|
9
|
+
*/
|
|
10
|
+
container: HTMLElement | null;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Provides a default portal container for all ui-react portaling components.
|
|
15
|
+
*
|
|
16
|
+
* Wrap your app (or a subtree) so that popups, dialogs, tooltips, toasts, etc.
|
|
17
|
+
* render inside the given container instead of `document.body`. This is the
|
|
18
|
+
* recommended way for shadow-DOM MFEs to keep portaled content inside the
|
|
19
|
+
* shadow root where adopted stylesheets apply.
|
|
20
|
+
*
|
|
21
|
+
* Individual components' `portalContainer` prop overrides this context.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Inside a shadow-DOM MFE — all portals go into the shadow root
|
|
26
|
+
* <PortalContainerProvider container={shadowRootMountDiv}>
|
|
27
|
+
* <App />
|
|
28
|
+
* </PortalContainerProvider>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function PortalContainerProvider({ container, children }: PortalContainerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the portal container set by the nearest `PortalContainerProvider`,
|
|
34
|
+
* or `undefined` if none exists (letting Base UI default to `document.body`).
|
|
35
|
+
*/
|
|
36
|
+
export declare function usePortalContainer(): HTMLElement | null | undefined;
|