lucent-ui 0.17.0 → 0.18.1
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
CHANGED
|
@@ -277,7 +277,7 @@ export declare interface ColorPalette {
|
|
|
277
277
|
dark: ThemeAnchors;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
export declare function ColorPicker({ value, onChange, label, size, inline, disabled, presetGroups, id, style, }: ColorPickerProps): JSX_2.Element;
|
|
280
|
+
export declare function ColorPicker({ value, onChange, label, size, inline, disabled, presetGroups, portalContainer, id, style, }: ColorPickerProps): JSX_2.Element;
|
|
281
281
|
|
|
282
282
|
export declare namespace ColorPicker {
|
|
283
283
|
var displayName: string;
|
|
@@ -293,6 +293,8 @@ export declare interface ColorPickerProps {
|
|
|
293
293
|
inline?: boolean;
|
|
294
294
|
disabled?: boolean;
|
|
295
295
|
presetGroups?: ColorPresetGroup[];
|
|
296
|
+
/** DOM element to portal the popover into. Defaults to document.body. Use this to preserve CSS custom property inheritance for per-section theming. */
|
|
297
|
+
portalContainer?: HTMLElement | null;
|
|
296
298
|
id?: string;
|
|
297
299
|
style?: CSSProperties;
|
|
298
300
|
}
|
|
@@ -772,6 +774,69 @@ export declare function makeLibraryCSS(tokens: LucentTokens, selector?: string):
|
|
|
772
774
|
|
|
773
775
|
export declare const MANIFEST_SPEC_VERSION = "1.0";
|
|
774
776
|
|
|
777
|
+
export declare function Menu({ trigger, children, placement, size, open: controlledOpen, onOpenChange, portalContainer, style, }: MenuProps): JSX_2.Element;
|
|
778
|
+
|
|
779
|
+
export declare function MenuGroup({ label, children, style }: MenuGroupProps): JSX_2.Element;
|
|
780
|
+
|
|
781
|
+
export declare interface MenuGroupProps {
|
|
782
|
+
/** Label shown above the group. */
|
|
783
|
+
label: string;
|
|
784
|
+
children: ReactNode;
|
|
785
|
+
style?: CSSProperties;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export declare function MenuItem({ onSelect, children, icon, shortcut, disabled, danger, selected, style, }: MenuItemProps): JSX_2.Element;
|
|
789
|
+
|
|
790
|
+
export declare interface MenuItemProps {
|
|
791
|
+
/** Fires when item is selected (click or Enter). */
|
|
792
|
+
onSelect: () => void;
|
|
793
|
+
/** Label content. */
|
|
794
|
+
children: ReactNode;
|
|
795
|
+
/** Leading icon. */
|
|
796
|
+
icon?: ReactNode;
|
|
797
|
+
/** Trailing shortcut hint text. */
|
|
798
|
+
shortcut?: string;
|
|
799
|
+
/** Disables selection and grays out. */
|
|
800
|
+
disabled?: boolean;
|
|
801
|
+
/** Renders in danger color. */
|
|
802
|
+
danger?: boolean;
|
|
803
|
+
/** Marks the item as currently selected (shows checkmark). */
|
|
804
|
+
selected?: boolean;
|
|
805
|
+
/** Style overrides. */
|
|
806
|
+
style?: CSSProperties;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export declare const MenuManifest: ComponentManifest;
|
|
810
|
+
|
|
811
|
+
export declare type MenuPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right';
|
|
812
|
+
|
|
813
|
+
export declare interface MenuProps {
|
|
814
|
+
/** Element that toggles the menu on click. */
|
|
815
|
+
trigger: ReactNode;
|
|
816
|
+
/** MenuItem, MenuSeparator, or MenuGroup elements. */
|
|
817
|
+
children: ReactNode;
|
|
818
|
+
/** Preferred placement relative to the trigger. */
|
|
819
|
+
placement?: MenuPlacement;
|
|
820
|
+
/** Size of the menu items. */
|
|
821
|
+
size?: MenuSize;
|
|
822
|
+
/** Controlled open state. */
|
|
823
|
+
open?: boolean;
|
|
824
|
+
/** Callback when open state changes. */
|
|
825
|
+
onOpenChange?: (open: boolean) => void;
|
|
826
|
+
/** DOM element to portal the popover into. Defaults to document.body. Use this to preserve CSS custom property inheritance for per-section theming. */
|
|
827
|
+
portalContainer?: HTMLElement | null;
|
|
828
|
+
/** Style overrides for the popover panel. */
|
|
829
|
+
style?: CSSProperties;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export declare function MenuSeparator({ style }: MenuSeparatorProps): JSX_2.Element;
|
|
833
|
+
|
|
834
|
+
export declare interface MenuSeparatorProps {
|
|
835
|
+
style?: CSSProperties;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export declare type MenuSize = 'sm' | 'md' | 'lg';
|
|
839
|
+
|
|
775
840
|
export declare const modernPreset: DesignPreset;
|
|
776
841
|
|
|
777
842
|
declare interface MotionTokens {
|