@cognite/aura 0.2.0 → 0.3.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 +36 -3
- package/dist/colors.css +30 -0
- package/dist/components/index.d.ts +6 -36
- package/dist/components/index.js +311 -347
- package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
- package/dist/components/ui/core/accordion/accordion.js +49 -47
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
- package/dist/components/ui/core/alert/alert.d.ts +23 -12
- package/dist/components/ui/core/alert/alert.js +123 -120
- package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
- package/dist/components/ui/core/badge/badge.d.ts +11 -8
- package/dist/components/ui/core/banner/banner.d.ts +18 -28
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
- package/dist/components/ui/core/button/button.d.ts +8 -5
- package/dist/components/ui/core/button/button.js +22 -19
- package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
- package/dist/components/ui/core/card/card.d.ts +17 -16
- package/dist/components/ui/core/chart/chart.d.ts +69 -0
- package/dist/components/ui/core/chart/chart.js +215 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -0
- package/dist/components/ui/core/chart/index.js +8 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -9
- package/dist/components/ui/core/checkbox/checkbox.js +38 -34
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +52 -48
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
- package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
- package/dist/components/ui/core/command/command.d.ts +11 -78
- package/dist/components/ui/core/command/command.js +53 -52
- package/dist/components/ui/core/count/count.d.ts +7 -6
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +6 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
- package/dist/components/ui/core/dialog/dialog.js +12 -3
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
- package/dist/components/ui/core/empty-state/empty-state.js +139 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
- package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
- package/dist/components/ui/core/hover-card/hover-card.js +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
- package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
- package/dist/components/ui/core/input/input.d.ts +2 -1
- package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
- package/dist/components/ui/core/input-group/input-group.js +35 -36
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
- package/dist/components/ui/core/label/label.d.ts +3 -2
- package/dist/components/ui/core/loader/loader.d.ts +2 -2
- package/dist/components/ui/core/message/message.d.ts +18 -17
- package/dist/components/ui/core/message/message.js +15 -13
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
- package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
- package/dist/components/ui/core/pagination/pagination.js +335 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -16
- package/dist/components/ui/core/popover/popover.js +52 -51
- package/dist/components/ui/core/progress/progress.d.ts +7 -4
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
- package/dist/components/ui/core/prompt-input/prompt-input.js +193 -180
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
- package/dist/components/ui/core/radio-group/radio-group.js +58 -55
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
- package/dist/components/ui/core/search/search.d.ts +10 -0
- package/dist/components/ui/core/search/search.js +99 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +7 -4
- package/dist/components/ui/core/select/select.d.ts +13 -13
- package/dist/components/ui/core/select/select.js +13 -10
- package/dist/components/ui/core/separator/separator.d.ts +2 -4
- package/dist/components/ui/core/separator/separator.js +4 -5
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -5
- package/dist/components/ui/core/shimmer/shimmer.js +25 -26
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
- package/dist/components/ui/core/sources/sources.d.ts +3 -3
- package/dist/components/ui/core/sources/sources.js +6 -1
- package/dist/components/ui/core/switch/switch.d.ts +11 -0
- package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
- package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
- package/dist/components/ui/core/tabs/tabs.js +14 -12
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
- package/dist/components/ui/core/textarea/textarea.js +20 -18
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +48 -44
- package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
- package/dist/components/ui/core/tooltip/tooltip.js +10 -8
- package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
- package/dist/eslint/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +302 -336
- package/dist/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +1 -3
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +9 -1
- package/package.json +22 -1
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
- package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
- package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
- package/dist/components/ui/core/alert/alert.metadata.js +0 -9
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
- package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
- package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
- package/dist/components/ui/core/badge/badge.metadata.js +0 -8
- package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
- package/dist/components/ui/core/banner/banner.metadata.js +0 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
- package/dist/components/ui/core/button/button.metadata.js +0 -9
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
- package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
- package/dist/components/ui/core/card/card.metadata.js +0 -9
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
- package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
- package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.js +0 -9
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
- package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
- package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
- package/dist/components/ui/core/input/input.metadata.js +0 -9
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
- package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
- package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
- package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
- package/dist/components/ui/core/label/label.metadata.js +0 -9
- package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
- package/dist/components/ui/core/loader/loader.metadata.js +0 -9
- package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.js +0 -9
- package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
- package/dist/components/ui/core/progress/progress.metadata.js +0 -9
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
- package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
- package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
- package/dist/components/ui/core/select/select.metadata.js +0 -9
- package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
- package/dist/components/ui/core/separator/separator.metadata.js +0 -8
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
- package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
- package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
- package/dist/components/ui/core/tool/tool.metadata.js +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
|
@@ -1,53 +1,30 @@
|
|
|
1
|
-
import { ComponentProps,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare function DropdownMenuPortal({ container, ...props }: MenuPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare namespace DropdownMenuPortal {
|
|
9
|
-
var displayName: string;
|
|
10
|
-
}
|
|
11
|
-
declare function DropdownMenuTrigger({ children, ...props }: MenuPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare namespace DropdownMenuTrigger {
|
|
13
|
-
var displayName: string;
|
|
14
|
-
}
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SeparatorProps } from '@base-ui/react';
|
|
3
|
+
import { MenuCheckboxItemProps, MenuGroupLabelProps, MenuItemProps, MenuRadioItemProps, MenuSubmenuTriggerProps, Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
4
|
+
declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): ReactNode;
|
|
5
|
+
declare function DropdownMenuPortal({ container, ...props }: MenuPrimitive.Portal.Props): ReactNode;
|
|
6
|
+
declare function DropdownMenuTrigger({ children, ...props }: MenuPrimitive.Trigger.Props): ReactNode;
|
|
15
7
|
declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, container, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'> & {
|
|
16
8
|
container?: MenuPrimitive.Portal.Props['container'];
|
|
17
|
-
}):
|
|
18
|
-
declare
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare namespace DropdownMenuGroup {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
25
|
-
declare const DropdownMenuItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuItemProps & {
|
|
9
|
+
}): ReactNode;
|
|
10
|
+
declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): ReactNode;
|
|
11
|
+
declare const DropdownMenuItem: ForwardRefExoticComponent<Omit<MenuItemProps & {
|
|
26
12
|
inset?: boolean;
|
|
27
|
-
variant?:
|
|
28
|
-
},
|
|
29
|
-
declare const DropdownMenuCheckboxItem:
|
|
30
|
-
declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props):
|
|
31
|
-
declare
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
declare const DropdownMenuRadioItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioItemProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
35
|
-
declare const DropdownMenuLabel: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuGroupLabelProps & {
|
|
13
|
+
variant?: 'default' | 'destructive';
|
|
14
|
+
}, 'ref'> & RefAttributes<HTMLElement>>;
|
|
15
|
+
declare const DropdownMenuCheckboxItem: ForwardRefExoticComponent<Omit<MenuCheckboxItemProps, 'ref'> & RefAttributes<HTMLElement>>;
|
|
16
|
+
declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): ReactNode;
|
|
17
|
+
declare const DropdownMenuRadioItem: ForwardRefExoticComponent<Omit<MenuRadioItemProps, 'ref'> & RefAttributes<HTMLElement>>;
|
|
18
|
+
declare const DropdownMenuLabel: ForwardRefExoticComponent<Omit<MenuGroupLabelProps & {
|
|
36
19
|
inset?: boolean;
|
|
37
|
-
},
|
|
38
|
-
declare const DropdownMenuHeader:
|
|
39
|
-
declare const DropdownMenuSeparator:
|
|
40
|
-
declare const DropdownMenuShortcut:
|
|
41
|
-
declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props):
|
|
42
|
-
declare
|
|
43
|
-
var displayName: string;
|
|
44
|
-
}
|
|
45
|
-
declare const DropdownMenuSubTrigger: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuSubmenuTriggerProps & {
|
|
20
|
+
}, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const DropdownMenuHeader: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: ForwardRefExoticComponent<Omit<SeparatorProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: ForwardRefExoticComponent<ComponentProps<'span'> & RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): ReactNode;
|
|
25
|
+
declare const DropdownMenuSubTrigger: ForwardRefExoticComponent<Omit<MenuSubmenuTriggerProps & {
|
|
46
26
|
inset?: boolean;
|
|
47
|
-
},
|
|
48
|
-
declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: ComponentProps<typeof DropdownMenuContent>):
|
|
49
|
-
declare
|
|
50
|
-
var displayName: string;
|
|
51
|
-
}
|
|
52
|
-
declare const DropdownMenuSectionLabel: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
27
|
+
}, 'ref'> & RefAttributes<HTMLElement>>;
|
|
28
|
+
declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: ComponentProps<typeof DropdownMenuContent>): ReactNode;
|
|
29
|
+
declare const DropdownMenuSectionLabel: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
53
30
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, DropdownMenuSectionLabel, };
|
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
3
|
import { Menu as r } from "@base-ui/react/menu";
|
|
4
|
-
import { IconCheck as
|
|
5
|
-
import { usePortalContainer as
|
|
4
|
+
import { IconCheck as l, IconChevronRight as m } from "@tabler/icons-react";
|
|
5
|
+
import { usePortalContainer as g } from "../../../../lib/portal-container-context.js";
|
|
6
6
|
import { cn as d } from "../../../../lib/utils.js";
|
|
7
|
-
function
|
|
7
|
+
function G({ ...e }) {
|
|
8
8
|
return /* @__PURE__ */ n(r.Root, { "data-slot": "dropdown-menu", ...e });
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
function l({
|
|
10
|
+
function f({
|
|
12
11
|
container: e,
|
|
13
|
-
...
|
|
12
|
+
...t
|
|
14
13
|
}) {
|
|
15
|
-
const
|
|
14
|
+
const o = g();
|
|
16
15
|
return /* @__PURE__ */ n(
|
|
17
16
|
r.Portal,
|
|
18
17
|
{
|
|
19
18
|
"data-slot": "dropdown-menu-portal",
|
|
20
|
-
container: e ??
|
|
21
|
-
...
|
|
19
|
+
container: e ?? o,
|
|
20
|
+
...t
|
|
22
21
|
}
|
|
23
22
|
);
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
function w({
|
|
24
|
+
function L({
|
|
27
25
|
children: e,
|
|
28
|
-
...
|
|
26
|
+
...t
|
|
29
27
|
}) {
|
|
30
|
-
return /* @__PURE__ */ n(r.Trigger, { "data-slot": "dropdown-menu-trigger", ...
|
|
28
|
+
return /* @__PURE__ */ n(r.Trigger, { "data-slot": "dropdown-menu-trigger", ...t, children: e });
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
function m({
|
|
30
|
+
function b({
|
|
34
31
|
align: e = "start",
|
|
35
|
-
alignOffset:
|
|
36
|
-
side:
|
|
32
|
+
alignOffset: t = 0,
|
|
33
|
+
side: o = "bottom",
|
|
37
34
|
sideOffset: a = 4,
|
|
38
35
|
className: s,
|
|
39
|
-
container:
|
|
40
|
-
...
|
|
36
|
+
container: u,
|
|
37
|
+
...p
|
|
41
38
|
}) {
|
|
42
|
-
return /* @__PURE__ */ n(
|
|
39
|
+
return /* @__PURE__ */ n(f, { container: u, children: /* @__PURE__ */ n(
|
|
43
40
|
r.Positioner,
|
|
44
41
|
{
|
|
45
42
|
className: "isolate z-50 outline-none",
|
|
46
43
|
align: e,
|
|
47
|
-
alignOffset:
|
|
48
|
-
side:
|
|
44
|
+
alignOffset: t,
|
|
45
|
+
side: o,
|
|
49
46
|
sideOffset: a,
|
|
50
47
|
children: /* @__PURE__ */ n(
|
|
51
48
|
r.Popup,
|
|
@@ -55,24 +52,22 @@ function m({
|
|
|
55
52
|
"bg-popover-background text-foreground p-1 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md outline-none",
|
|
56
53
|
s
|
|
57
54
|
),
|
|
58
|
-
...
|
|
55
|
+
...p
|
|
59
56
|
}
|
|
60
57
|
)
|
|
61
58
|
}
|
|
62
59
|
) });
|
|
63
60
|
}
|
|
64
|
-
|
|
65
|
-
function x({ ...e }) {
|
|
61
|
+
function P({ ...e }) {
|
|
66
62
|
return /* @__PURE__ */ n(r.Group, { "data-slot": "dropdown-menu-group", ...e });
|
|
67
63
|
}
|
|
68
|
-
|
|
69
|
-
const h = u(({ className: e, inset: o, variant: t = "default", children: a, ...s }, i) => /* @__PURE__ */ n(
|
|
64
|
+
const v = i(({ className: e, inset: t, variant: o = "default", children: a, ...s }, u) => /* @__PURE__ */ n(
|
|
70
65
|
r.Item,
|
|
71
66
|
{
|
|
72
|
-
ref:
|
|
67
|
+
ref: u,
|
|
73
68
|
"data-slot": "dropdown-menu-item",
|
|
74
|
-
"data-inset":
|
|
75
|
-
"data-variant":
|
|
69
|
+
"data-inset": t,
|
|
70
|
+
"data-variant": o,
|
|
76
71
|
className: d(
|
|
77
72
|
"focus:bg-accent-background focus:text-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive-background-hover dark:data-[variant=destructive]:focus:bg-destructive-background-hover data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:text-destructive-foreground data-[variant=destructive]:hover:bg-destructive-background-hover dark:data-[variant=destructive]:hover:bg-destructive-background-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm p-2 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
78
73
|
e
|
|
@@ -81,8 +76,8 @@ const h = u(({ className: e, inset: o, variant: t = "default", children: a, ...s
|
|
|
81
76
|
children: a
|
|
82
77
|
}
|
|
83
78
|
));
|
|
84
|
-
|
|
85
|
-
const
|
|
79
|
+
v.displayName = "DropdownMenuItem";
|
|
80
|
+
const x = i(({ className: e, children: t, checked: o, ...a }, s) => /* @__PURE__ */ c(
|
|
86
81
|
r.CheckboxItem,
|
|
87
82
|
{
|
|
88
83
|
ref: s,
|
|
@@ -91,16 +86,18 @@ const M = u(({ className: e, children: o, checked: t, ...a }, s) => /* @__PURE__
|
|
|
91
86
|
"focus:bg-accent-background focus:text-foreground h-9 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
92
87
|
e
|
|
93
88
|
),
|
|
94
|
-
checked:
|
|
89
|
+
checked: o,
|
|
95
90
|
...a,
|
|
96
91
|
children: [
|
|
97
|
-
/* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.CheckboxItemIndicator, { children: /* @__PURE__ */ n(
|
|
98
|
-
|
|
92
|
+
/* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.CheckboxItemIndicator, { children: /* @__PURE__ */ n(l, { className: "size-4 text-foreground" }) }) }),
|
|
93
|
+
t
|
|
99
94
|
]
|
|
100
95
|
}
|
|
101
96
|
));
|
|
102
|
-
|
|
103
|
-
function
|
|
97
|
+
x.displayName = "DropdownMenuCheckboxItem";
|
|
98
|
+
function T({
|
|
99
|
+
...e
|
|
100
|
+
}) {
|
|
104
101
|
return /* @__PURE__ */ n(
|
|
105
102
|
r.RadioGroup,
|
|
106
103
|
{
|
|
@@ -109,8 +106,7 @@ function D({ ...e }) {
|
|
|
109
106
|
}
|
|
110
107
|
);
|
|
111
108
|
}
|
|
112
|
-
|
|
113
|
-
const N = u(({ className: e, children: o, ...t }, a) => /* @__PURE__ */ c(
|
|
109
|
+
const w = i(({ className: e, children: t, ...o }, a) => /* @__PURE__ */ c(
|
|
114
110
|
r.RadioItem,
|
|
115
111
|
{
|
|
116
112
|
ref: a,
|
|
@@ -119,137 +115,143 @@ const N = u(({ className: e, children: o, ...t }, a) => /* @__PURE__ */ c(
|
|
|
119
115
|
"focus:bg-accent-background focus:text-foreground h-9 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
120
116
|
e
|
|
121
117
|
),
|
|
122
|
-
...
|
|
118
|
+
...o,
|
|
123
119
|
children: [
|
|
124
|
-
/* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.RadioItemIndicator, { children: /* @__PURE__ */ n(
|
|
125
|
-
|
|
120
|
+
/* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.RadioItemIndicator, { children: /* @__PURE__ */ n(l, { className: "size-4 text-foreground" }) }) }),
|
|
121
|
+
t
|
|
126
122
|
]
|
|
127
123
|
}
|
|
128
124
|
));
|
|
129
|
-
|
|
130
|
-
const
|
|
125
|
+
w.displayName = "DropdownMenuRadioItem";
|
|
126
|
+
const h = i(({ className: e, inset: t, ...o }, a) => /* @__PURE__ */ n(
|
|
131
127
|
r.GroupLabel,
|
|
132
128
|
{
|
|
133
129
|
ref: a,
|
|
134
130
|
"data-slot": "dropdown-menu-label",
|
|
135
|
-
"data-inset":
|
|
131
|
+
"data-inset": t,
|
|
136
132
|
className: d(
|
|
137
133
|
"-mx-1 -mt-1 mb-1 px-2 py-1.5 text-sm border-b border-border font-medium data-inset:pl-8 text-foreground dark:text-foreground",
|
|
138
134
|
e
|
|
139
135
|
),
|
|
140
|
-
...t
|
|
141
|
-
}
|
|
142
|
-
));
|
|
143
|
-
y.displayName = "DropdownMenuLabel";
|
|
144
|
-
const k = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
ref: t,
|
|
148
|
-
"data-slot": "dropdown-menu-header",
|
|
149
|
-
className: d(
|
|
150
|
-
"-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-border px-2 py-2 pointer-events-none",
|
|
151
|
-
e
|
|
152
|
-
),
|
|
153
136
|
...o
|
|
154
137
|
}
|
|
155
138
|
));
|
|
156
|
-
|
|
157
|
-
const
|
|
139
|
+
h.displayName = "DropdownMenuLabel";
|
|
140
|
+
const M = i(
|
|
141
|
+
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
ref: o,
|
|
145
|
+
"data-slot": "dropdown-menu-header",
|
|
146
|
+
className: d(
|
|
147
|
+
"-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-border px-2 py-2 pointer-events-none",
|
|
148
|
+
e
|
|
149
|
+
),
|
|
150
|
+
...t
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
M.displayName = "DropdownMenuHeader";
|
|
155
|
+
const D = i(({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
158
156
|
r.Separator,
|
|
159
157
|
{
|
|
160
|
-
ref:
|
|
158
|
+
ref: o,
|
|
161
159
|
"data-slot": "dropdown-menu-separator",
|
|
162
160
|
className: d("bg-border -mx-1 my-1 h-px", e),
|
|
163
|
-
...
|
|
164
|
-
}
|
|
165
|
-
));
|
|
166
|
-
z.displayName = "DropdownMenuSeparator";
|
|
167
|
-
const I = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
|
|
168
|
-
"span",
|
|
169
|
-
{
|
|
170
|
-
ref: t,
|
|
171
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
172
|
-
className: d(
|
|
173
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
174
|
-
e
|
|
175
|
-
),
|
|
176
|
-
...o
|
|
161
|
+
...t
|
|
177
162
|
}
|
|
178
163
|
));
|
|
179
|
-
|
|
180
|
-
|
|
164
|
+
D.displayName = "DropdownMenuSeparator";
|
|
165
|
+
const N = i(
|
|
166
|
+
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
167
|
+
"span",
|
|
168
|
+
{
|
|
169
|
+
ref: o,
|
|
170
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
171
|
+
className: d(
|
|
172
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
173
|
+
e
|
|
174
|
+
),
|
|
175
|
+
...t
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
);
|
|
179
|
+
N.displayName = "DropdownMenuShortcut";
|
|
180
|
+
function j({
|
|
181
|
+
...e
|
|
182
|
+
}) {
|
|
181
183
|
return /* @__PURE__ */ n(r.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...e });
|
|
182
184
|
}
|
|
183
|
-
|
|
184
|
-
const _ = u(({ className: e, inset: o, children: t, ...a }, s) => /* @__PURE__ */ c(
|
|
185
|
+
const k = i(({ className: e, inset: t, children: o, ...a }, s) => /* @__PURE__ */ c(
|
|
185
186
|
r.SubmenuTrigger,
|
|
186
187
|
{
|
|
187
188
|
ref: s,
|
|
188
189
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
189
|
-
"data-inset":
|
|
190
|
+
"data-inset": t,
|
|
190
191
|
className: d(
|
|
191
192
|
"focus:bg-accent-background focus:text-foreground data-open:bg-accent-background data-open:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
192
193
|
e
|
|
193
194
|
),
|
|
194
195
|
...a,
|
|
195
196
|
children: [
|
|
196
|
-
|
|
197
|
-
/* @__PURE__ */ n(
|
|
197
|
+
o,
|
|
198
|
+
/* @__PURE__ */ n(m, { className: "ml-auto size-4" })
|
|
198
199
|
]
|
|
199
200
|
}
|
|
200
201
|
));
|
|
201
|
-
|
|
202
|
-
function
|
|
202
|
+
k.displayName = "DropdownMenuSubTrigger";
|
|
203
|
+
function H({
|
|
203
204
|
align: e = "start",
|
|
204
|
-
alignOffset:
|
|
205
|
-
side:
|
|
205
|
+
alignOffset: t = -3,
|
|
206
|
+
side: o = "right",
|
|
206
207
|
sideOffset: a = 0,
|
|
207
208
|
className: s,
|
|
208
|
-
...
|
|
209
|
+
...u
|
|
209
210
|
}) {
|
|
210
211
|
return /* @__PURE__ */ n(
|
|
211
|
-
|
|
212
|
+
b,
|
|
212
213
|
{
|
|
213
214
|
"data-slot": "dropdown-menu-sub-content",
|
|
214
215
|
className: d("min-w-32 w-auto", s),
|
|
215
216
|
align: e,
|
|
216
|
-
alignOffset:
|
|
217
|
-
side:
|
|
217
|
+
alignOffset: t,
|
|
218
|
+
side: o,
|
|
218
219
|
sideOffset: a,
|
|
219
|
-
...
|
|
220
|
+
...u
|
|
220
221
|
}
|
|
221
222
|
);
|
|
222
223
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)
|
|
236
|
-
|
|
224
|
+
const y = i(
|
|
225
|
+
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
226
|
+
"div",
|
|
227
|
+
{
|
|
228
|
+
ref: o,
|
|
229
|
+
"data-slot": "dropdown-menu-section-label",
|
|
230
|
+
className: d(
|
|
231
|
+
"px-2 py-1 text-sm text-muted-foreground dark:text-muted-foreground",
|
|
232
|
+
e
|
|
233
|
+
),
|
|
234
|
+
...t
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
y.displayName = "DropdownMenuSectionLabel";
|
|
237
239
|
export {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
240
|
+
G as DropdownMenu,
|
|
241
|
+
x as DropdownMenuCheckboxItem,
|
|
242
|
+
b as DropdownMenuContent,
|
|
243
|
+
P as DropdownMenuGroup,
|
|
244
|
+
M as DropdownMenuHeader,
|
|
245
|
+
v as DropdownMenuItem,
|
|
246
|
+
h as DropdownMenuLabel,
|
|
247
|
+
f as DropdownMenuPortal,
|
|
248
|
+
T as DropdownMenuRadioGroup,
|
|
249
|
+
w as DropdownMenuRadioItem,
|
|
250
|
+
y as DropdownMenuSectionLabel,
|
|
251
|
+
D as DropdownMenuSeparator,
|
|
252
|
+
N as DropdownMenuShortcut,
|
|
253
|
+
j as DropdownMenuSub,
|
|
254
|
+
H as DropdownMenuSubContent,
|
|
255
|
+
k as DropdownMenuSubTrigger,
|
|
256
|
+
L as DropdownMenuTrigger
|
|
255
257
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
type EmptyStateType = 'error-generic' | 'new-object' | 'no-access' | 'no-results' | 'not-found' | 'new-chat' | 'unknown';
|
|
3
|
+
type EmptyStateContextValue = {
|
|
4
|
+
variant: 'compact' | 'full';
|
|
5
|
+
type?: EmptyStateType;
|
|
6
|
+
};
|
|
7
|
+
declare const EmptyStateContext: Context<EmptyStateContextValue>;
|
|
8
|
+
declare const useEmptyState: () => EmptyStateContextValue;
|
|
9
|
+
export { EmptyStateContext, useEmptyState };
|
|
10
|
+
export type { EmptyStateType };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { EmptyStateType } from './empty-state.context';
|
|
3
|
+
declare const EmptyState: ForwardRefExoticComponent<Omit<ComponentProps<'div'>, 'ref'> & ({
|
|
4
|
+
variant?: 'compact';
|
|
5
|
+
type?: EmptyStateType;
|
|
6
|
+
} | {
|
|
7
|
+
variant: 'full';
|
|
8
|
+
type: EmptyStateType;
|
|
9
|
+
}) & RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const EmptyStateIcon: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
type TitleAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
|
|
12
|
+
type EmptyStateTitleProps = ComponentProps<'h2'> & {
|
|
13
|
+
as?: TitleAs;
|
|
14
|
+
};
|
|
15
|
+
declare function EmptyStateTitle({ className, as: Component, ...props }: EmptyStateTitleProps): ReactNode;
|
|
16
|
+
declare const EmptyStateDescription: ForwardRefExoticComponent<ComponentProps<'p'> & RefAttributes<HTMLParagraphElement>>;
|
|
17
|
+
declare const EmptyStateActions: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export { EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, useMemo as d } from "react";
|
|
3
|
+
import { IconQuestionMark as u, IconMessageDots as p, IconZoomQuestion as f, IconSearchOff as x, IconLock as y, IconPlus as k, IconAlertOctagon as v } from "@tabler/icons-react";
|
|
4
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
5
|
+
import { EmptyStateContext as h, useEmptyState as m } from "./empty-state.context.js";
|
|
6
|
+
const w = {
|
|
7
|
+
"error-generic": "[background-image:var(--gradient-fall)]",
|
|
8
|
+
"new-object": "[background-image:var(--gradient-spring)]",
|
|
9
|
+
"no-access": "[background-image:var(--gradient-fall)]",
|
|
10
|
+
"no-results": "[background-image:var(--gradient-spring)]",
|
|
11
|
+
"not-found": "[background-image:var(--gradient-spring)]",
|
|
12
|
+
"new-chat": "[background-image:var(--gradient-summer)]",
|
|
13
|
+
unknown: "[background-image:var(--gradient-spring)]"
|
|
14
|
+
}, b = {
|
|
15
|
+
"error-generic": /* @__PURE__ */ t(v, {}),
|
|
16
|
+
"new-object": /* @__PURE__ */ t(k, {}),
|
|
17
|
+
"no-access": /* @__PURE__ */ t(y, {}),
|
|
18
|
+
"no-results": /* @__PURE__ */ t(x, {}),
|
|
19
|
+
"not-found": /* @__PURE__ */ t(f, {}),
|
|
20
|
+
"new-chat": /* @__PURE__ */ t(p, {}),
|
|
21
|
+
unknown: /* @__PURE__ */ t(u, {})
|
|
22
|
+
}, S = g(
|
|
23
|
+
({ className: n, variant: e = "compact", type: a, children: o, ...i }, r) => {
|
|
24
|
+
const c = e === "full", l = d(() => ({ variant: e, type: a }), [e, a]);
|
|
25
|
+
return /* @__PURE__ */ t(h.Provider, { value: l, children: /* @__PURE__ */ t(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref: r,
|
|
29
|
+
"data-slot": "empty-state",
|
|
30
|
+
"data-variant": e,
|
|
31
|
+
className: s(
|
|
32
|
+
"flex min-w-0 flex-col items-center text-center text-foreground",
|
|
33
|
+
c ? "gap-8 p-10" : "gap-2",
|
|
34
|
+
!c && "w-full max-w-100",
|
|
35
|
+
n
|
|
36
|
+
),
|
|
37
|
+
...i,
|
|
38
|
+
children: o
|
|
39
|
+
}
|
|
40
|
+
) });
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
S.displayName = "EmptyState";
|
|
44
|
+
const E = g(
|
|
45
|
+
({ className: n, children: e, ...a }, o) => {
|
|
46
|
+
const { variant: i, type: r } = m(), c = i === "full", l = e ?? (r ? b[r] : null);
|
|
47
|
+
return c ? /* @__PURE__ */ t(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref: o,
|
|
51
|
+
"data-slot": "empty-state-icon",
|
|
52
|
+
className: s(
|
|
53
|
+
"flex size-20 shrink-0 items-center justify-center rounded-2xl p-5 text-foreground [&_svg]:size-10 [&_svg]:stroke-[1.75]",
|
|
54
|
+
r && w[r],
|
|
55
|
+
n
|
|
56
|
+
),
|
|
57
|
+
...a,
|
|
58
|
+
children: l
|
|
59
|
+
}
|
|
60
|
+
) : /* @__PURE__ */ t(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
ref: o,
|
|
64
|
+
"data-slot": "empty-state-icon",
|
|
65
|
+
className: s(
|
|
66
|
+
"flex size-6 shrink-0 items-center justify-center text-muted-foreground [&_svg]:size-6 [&_svg]:stroke-[1.75]",
|
|
67
|
+
n
|
|
68
|
+
),
|
|
69
|
+
...a,
|
|
70
|
+
children: l
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
E.displayName = "EmptyStateIcon";
|
|
76
|
+
function A({
|
|
77
|
+
className: n,
|
|
78
|
+
as: e = "h2",
|
|
79
|
+
...a
|
|
80
|
+
}) {
|
|
81
|
+
const { variant: o } = m();
|
|
82
|
+
return /* @__PURE__ */ t(
|
|
83
|
+
e,
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "empty-state-title",
|
|
86
|
+
className: s(
|
|
87
|
+
"max-w-100 break-words font-medium text-foreground",
|
|
88
|
+
o === "full" ? "text-xl leading-6 tracking-tightest" : "text-base leading-5 tracking-tighter",
|
|
89
|
+
n
|
|
90
|
+
),
|
|
91
|
+
...a
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const I = g(
|
|
96
|
+
({ className: n, ...e }, a) => {
|
|
97
|
+
const { variant: o } = m();
|
|
98
|
+
return /* @__PURE__ */ t(
|
|
99
|
+
"p",
|
|
100
|
+
{
|
|
101
|
+
ref: a,
|
|
102
|
+
"data-slot": "empty-state-description",
|
|
103
|
+
className: s(
|
|
104
|
+
"max-w-100 break-words text-muted-foreground",
|
|
105
|
+
o === "full" ? "text-lg leading-6 tracking-tightest" : "text-sm leading-4.5 tracking-tight",
|
|
106
|
+
n
|
|
107
|
+
),
|
|
108
|
+
...e
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
I.displayName = "EmptyStateDescription";
|
|
114
|
+
const N = g(
|
|
115
|
+
({ className: n, ...e }, a) => {
|
|
116
|
+
const { variant: o } = m();
|
|
117
|
+
return /* @__PURE__ */ t(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
ref: a,
|
|
121
|
+
"data-slot": "empty-state-actions",
|
|
122
|
+
className: s(
|
|
123
|
+
"flex flex-col items-center",
|
|
124
|
+
o === "compact" ? "gap-2" : "gap-4",
|
|
125
|
+
n
|
|
126
|
+
),
|
|
127
|
+
...e
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
N.displayName = "EmptyStateActions";
|
|
133
|
+
export {
|
|
134
|
+
S as EmptyState,
|
|
135
|
+
N as EmptyStateActions,
|
|
136
|
+
I as EmptyStateDescription,
|
|
137
|
+
E as EmptyStateIcon,
|
|
138
|
+
A as EmptyStateTitle
|
|
139
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
interface HelperTextVariantProps {
|
|
5
|
+
size?: 'xs' | 'sm' | null;
|
|
6
|
+
}
|
|
7
|
+
declare const helperTextVariants: (props?: (HelperTextVariantProps & ClassProp) | undefined) => string;
|
|
6
8
|
interface HelperTextProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof helperTextVariants> {
|
|
7
9
|
isError?: boolean;
|
|
8
10
|
isSuccess?: boolean;
|
|
9
11
|
icon?: ReactNode;
|
|
10
12
|
}
|
|
11
|
-
declare const HelperText:
|
|
13
|
+
declare const HelperText: ForwardRefExoticComponent<HelperTextProps & RefAttributes<HTMLDivElement>>;
|
|
12
14
|
export { HelperText };
|