@algenium/blocks 1.4.0 → 1.5.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.cjs +95 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +92 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -290,6 +290,38 @@ type EnvironmentSwitcherLabels = {
|
|
|
290
290
|
staging?: string;
|
|
291
291
|
development?: string;
|
|
292
292
|
};
|
|
293
|
+
/** Tailwind background class for the environment status dot. */
|
|
294
|
+
declare function getEnvironmentDotClass(env: BlocksDataEnvironment): string;
|
|
295
|
+
/** Resolved menu label for an environment (uses merged `labels`). */
|
|
296
|
+
declare function getEnvironmentLabel(env: BlocksDataEnvironment, labels: Required<EnvironmentSwitcherLabels>): string;
|
|
297
|
+
declare const environmentDotSizeClasses: {
|
|
298
|
+
readonly xs: "size-1.5";
|
|
299
|
+
readonly sm: "size-2";
|
|
300
|
+
readonly md: "size-2.5";
|
|
301
|
+
};
|
|
302
|
+
type EnvironmentDotProps = {
|
|
303
|
+
env: BlocksDataEnvironment;
|
|
304
|
+
size?: keyof typeof environmentDotSizeClasses;
|
|
305
|
+
className?: string;
|
|
306
|
+
};
|
|
307
|
+
/** Non-interactive colored dot for an environment (e.g. overlays, menus). */
|
|
308
|
+
declare function EnvironmentDot({ env, size, className, }: EnvironmentDotProps): react_jsx_runtime.JSX.Element;
|
|
309
|
+
type EnvironmentMiniBadgeProps = {
|
|
310
|
+
className?: string;
|
|
311
|
+
/** Current environment; falls back to `EnvironmentContext` when omitted. */
|
|
312
|
+
environment?: BlocksDataEnvironment;
|
|
313
|
+
labels?: EnvironmentSwitcherLabels;
|
|
314
|
+
/**
|
|
315
|
+
* When true (default), shows short Prod / Stg / Dev text.
|
|
316
|
+
* When false, uses `getEnvironmentLabel` with merged labels (i18n-friendly).
|
|
317
|
+
*/
|
|
318
|
+
abbreviated?: boolean;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Compact pill (dot + label) for embedding in other controls (e.g. org switcher trigger).
|
|
322
|
+
* Not a button — parent provides interaction.
|
|
323
|
+
*/
|
|
324
|
+
declare function EnvironmentMiniBadge({ className, environment: propEnvironment, labels: userLabels, abbreviated, }: EnvironmentMiniBadgeProps): react_jsx_runtime.JSX.Element;
|
|
293
325
|
type EnvironmentSwitcherProps = {
|
|
294
326
|
className?: string;
|
|
295
327
|
/** Current environment. Overrides context when set. */
|
|
@@ -723,4 +755,4 @@ declare function ScrollBar({ className, orientation, ...props }: React.Component
|
|
|
723
755
|
|
|
724
756
|
declare function cn(...inputs: ClassValue[]): string;
|
|
725
757
|
|
|
726
|
-
export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
|
758
|
+
export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -290,6 +290,38 @@ type EnvironmentSwitcherLabels = {
|
|
|
290
290
|
staging?: string;
|
|
291
291
|
development?: string;
|
|
292
292
|
};
|
|
293
|
+
/** Tailwind background class for the environment status dot. */
|
|
294
|
+
declare function getEnvironmentDotClass(env: BlocksDataEnvironment): string;
|
|
295
|
+
/** Resolved menu label for an environment (uses merged `labels`). */
|
|
296
|
+
declare function getEnvironmentLabel(env: BlocksDataEnvironment, labels: Required<EnvironmentSwitcherLabels>): string;
|
|
297
|
+
declare const environmentDotSizeClasses: {
|
|
298
|
+
readonly xs: "size-1.5";
|
|
299
|
+
readonly sm: "size-2";
|
|
300
|
+
readonly md: "size-2.5";
|
|
301
|
+
};
|
|
302
|
+
type EnvironmentDotProps = {
|
|
303
|
+
env: BlocksDataEnvironment;
|
|
304
|
+
size?: keyof typeof environmentDotSizeClasses;
|
|
305
|
+
className?: string;
|
|
306
|
+
};
|
|
307
|
+
/** Non-interactive colored dot for an environment (e.g. overlays, menus). */
|
|
308
|
+
declare function EnvironmentDot({ env, size, className, }: EnvironmentDotProps): react_jsx_runtime.JSX.Element;
|
|
309
|
+
type EnvironmentMiniBadgeProps = {
|
|
310
|
+
className?: string;
|
|
311
|
+
/** Current environment; falls back to `EnvironmentContext` when omitted. */
|
|
312
|
+
environment?: BlocksDataEnvironment;
|
|
313
|
+
labels?: EnvironmentSwitcherLabels;
|
|
314
|
+
/**
|
|
315
|
+
* When true (default), shows short Prod / Stg / Dev text.
|
|
316
|
+
* When false, uses `getEnvironmentLabel` with merged labels (i18n-friendly).
|
|
317
|
+
*/
|
|
318
|
+
abbreviated?: boolean;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Compact pill (dot + label) for embedding in other controls (e.g. org switcher trigger).
|
|
322
|
+
* Not a button — parent provides interaction.
|
|
323
|
+
*/
|
|
324
|
+
declare function EnvironmentMiniBadge({ className, environment: propEnvironment, labels: userLabels, abbreviated, }: EnvironmentMiniBadgeProps): react_jsx_runtime.JSX.Element;
|
|
293
325
|
type EnvironmentSwitcherProps = {
|
|
294
326
|
className?: string;
|
|
295
327
|
/** Current environment. Overrides context when set. */
|
|
@@ -723,4 +755,4 @@ declare function ScrollBar({ className, orientation, ...props }: React.Component
|
|
|
723
755
|
|
|
724
756
|
declare function cn(...inputs: ClassValue[]): string;
|
|
725
757
|
|
|
726
|
-
export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
|
758
|
+
export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
package/dist/index.js
CHANGED
|
@@ -3766,6 +3766,90 @@ var defaultLabels2 = {
|
|
|
3766
3766
|
staging: "Staging",
|
|
3767
3767
|
development: "Development"
|
|
3768
3768
|
};
|
|
3769
|
+
function getEnvironmentDotClass(env) {
|
|
3770
|
+
switch (env) {
|
|
3771
|
+
case "production":
|
|
3772
|
+
return "bg-emerald-500";
|
|
3773
|
+
case "staging":
|
|
3774
|
+
return "bg-orange-500";
|
|
3775
|
+
case "development":
|
|
3776
|
+
return "bg-amber-400";
|
|
3777
|
+
default:
|
|
3778
|
+
return "bg-muted-foreground";
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
function getEnvironmentLabel(env, labels) {
|
|
3782
|
+
switch (env) {
|
|
3783
|
+
case "production":
|
|
3784
|
+
return labels.live;
|
|
3785
|
+
case "staging":
|
|
3786
|
+
return labels.staging;
|
|
3787
|
+
case "development":
|
|
3788
|
+
return labels.development;
|
|
3789
|
+
default:
|
|
3790
|
+
return env;
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
function abbreviateEnvironment(env) {
|
|
3794
|
+
switch (env) {
|
|
3795
|
+
case "production":
|
|
3796
|
+
return "Prod";
|
|
3797
|
+
case "staging":
|
|
3798
|
+
return "Stg";
|
|
3799
|
+
case "development":
|
|
3800
|
+
return "Dev";
|
|
3801
|
+
default:
|
|
3802
|
+
return env;
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
var environmentDotSizeClasses = {
|
|
3806
|
+
xs: "size-1.5",
|
|
3807
|
+
sm: "size-2",
|
|
3808
|
+
md: "size-2.5"
|
|
3809
|
+
};
|
|
3810
|
+
function EnvironmentDot({
|
|
3811
|
+
env,
|
|
3812
|
+
size = "sm",
|
|
3813
|
+
className
|
|
3814
|
+
}) {
|
|
3815
|
+
const sizeClass = environmentDotSizeClasses[size];
|
|
3816
|
+
return /* @__PURE__ */ jsx(
|
|
3817
|
+
"span",
|
|
3818
|
+
{
|
|
3819
|
+
className: cn(
|
|
3820
|
+
"rounded-full shrink-0 ring-1 ring-background",
|
|
3821
|
+
sizeClass,
|
|
3822
|
+
getEnvironmentDotClass(env),
|
|
3823
|
+
className
|
|
3824
|
+
),
|
|
3825
|
+
"aria-hidden": true
|
|
3826
|
+
}
|
|
3827
|
+
);
|
|
3828
|
+
}
|
|
3829
|
+
function EnvironmentMiniBadge({
|
|
3830
|
+
className,
|
|
3831
|
+
environment: propEnvironment,
|
|
3832
|
+
labels: userLabels,
|
|
3833
|
+
abbreviated = true
|
|
3834
|
+
}) {
|
|
3835
|
+
const ctx = useEnvironmentContext();
|
|
3836
|
+
const labels = { ...defaultLabels2, ...userLabels };
|
|
3837
|
+
const environment = propEnvironment ?? ctx?.environment ?? "production";
|
|
3838
|
+
const text = abbreviated ? abbreviateEnvironment(environment) : getEnvironmentLabel(environment, labels);
|
|
3839
|
+
return /* @__PURE__ */ jsxs(
|
|
3840
|
+
"span",
|
|
3841
|
+
{
|
|
3842
|
+
className: cn(
|
|
3843
|
+
"inline-flex max-w-[4.5rem] items-center gap-1 rounded-full border border-border bg-muted/60 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-foreground",
|
|
3844
|
+
className
|
|
3845
|
+
),
|
|
3846
|
+
children: [
|
|
3847
|
+
/* @__PURE__ */ jsx(EnvironmentDot, { env: environment, size: "xs" }),
|
|
3848
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: text })
|
|
3849
|
+
]
|
|
3850
|
+
}
|
|
3851
|
+
);
|
|
3852
|
+
}
|
|
3769
3853
|
var sizeClasses3 = {
|
|
3770
3854
|
sm: {
|
|
3771
3855
|
container: "h-7 p-0.5 text-xs",
|
|
@@ -3793,30 +3877,6 @@ var shapeClasses3 = {
|
|
|
3793
3877
|
rounded: "rounded-md",
|
|
3794
3878
|
pill: "rounded-full"
|
|
3795
3879
|
};
|
|
3796
|
-
function envDotClass(env) {
|
|
3797
|
-
switch (env) {
|
|
3798
|
-
case "production":
|
|
3799
|
-
return "bg-emerald-500";
|
|
3800
|
-
case "staging":
|
|
3801
|
-
return "bg-orange-500";
|
|
3802
|
-
case "development":
|
|
3803
|
-
return "bg-amber-400";
|
|
3804
|
-
default:
|
|
3805
|
-
return "bg-muted-foreground";
|
|
3806
|
-
}
|
|
3807
|
-
}
|
|
3808
|
-
function labelForEnv(env, labels) {
|
|
3809
|
-
switch (env) {
|
|
3810
|
-
case "production":
|
|
3811
|
-
return labels.live;
|
|
3812
|
-
case "staging":
|
|
3813
|
-
return labels.staging;
|
|
3814
|
-
case "development":
|
|
3815
|
-
return labels.development;
|
|
3816
|
-
default:
|
|
3817
|
-
return env;
|
|
3818
|
-
}
|
|
3819
|
-
}
|
|
3820
3880
|
function EnvironmentSwitcher({
|
|
3821
3881
|
className,
|
|
3822
3882
|
environment: propEnvironment,
|
|
@@ -3867,12 +3927,12 @@ function EnvironmentSwitcher({
|
|
|
3867
3927
|
className: cn(
|
|
3868
3928
|
"rounded-full shrink-0 ring-1 ring-background",
|
|
3869
3929
|
sizes.dot,
|
|
3870
|
-
|
|
3930
|
+
getEnvironmentDotClass(environment)
|
|
3871
3931
|
),
|
|
3872
3932
|
"aria-hidden": true
|
|
3873
3933
|
}
|
|
3874
3934
|
),
|
|
3875
|
-
/* @__PURE__ */ jsx("span", { className: "max-w-[5.5rem] truncate", children:
|
|
3935
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-[5.5rem] truncate", children: getEnvironmentLabel(environment, labels) })
|
|
3876
3936
|
]
|
|
3877
3937
|
}
|
|
3878
3938
|
) }) }),
|
|
@@ -3901,12 +3961,12 @@ function EnvironmentSwitcher({
|
|
|
3901
3961
|
className: cn(
|
|
3902
3962
|
"rounded-full shrink-0 ring-1 ring-background",
|
|
3903
3963
|
sizes.dot,
|
|
3904
|
-
|
|
3964
|
+
getEnvironmentDotClass(env)
|
|
3905
3965
|
),
|
|
3906
3966
|
"aria-hidden": true
|
|
3907
3967
|
}
|
|
3908
3968
|
),
|
|
3909
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
3969
|
+
/* @__PURE__ */ jsx("span", { children: getEnvironmentLabel(env, labels) })
|
|
3910
3970
|
]
|
|
3911
3971
|
},
|
|
3912
3972
|
env
|
|
@@ -3937,7 +3997,7 @@ function EnvironmentSwitcher({
|
|
|
3937
3997
|
"button",
|
|
3938
3998
|
{
|
|
3939
3999
|
type: "button",
|
|
3940
|
-
"aria-label":
|
|
4000
|
+
"aria-label": getEnvironmentLabel(env, labels),
|
|
3941
4001
|
"aria-pressed": isActive,
|
|
3942
4002
|
className: cn(
|
|
3943
4003
|
"relative min-w-0 font-semibold capitalize",
|
|
@@ -3971,12 +4031,12 @@ function EnvironmentSwitcher({
|
|
|
3971
4031
|
className: cn(
|
|
3972
4032
|
"rounded-full shrink-0 ring-1 ring-background",
|
|
3973
4033
|
"h-1.5 w-1.5",
|
|
3974
|
-
|
|
4034
|
+
getEnvironmentDotClass(env)
|
|
3975
4035
|
),
|
|
3976
4036
|
"aria-hidden": true
|
|
3977
4037
|
}
|
|
3978
4038
|
),
|
|
3979
|
-
|
|
4039
|
+
getEnvironmentLabel(env, labels)
|
|
3980
4040
|
]
|
|
3981
4041
|
}
|
|
3982
4042
|
)
|
|
@@ -7263,6 +7323,6 @@ function formatRelativeTime(dateStr) {
|
|
|
7263
7323
|
return date.toLocaleDateString([], { month: "short", day: "numeric" });
|
|
7264
7324
|
}
|
|
7265
7325
|
|
|
7266
|
-
export { AvatarEditor, AvatarEditorDialog, BLOCKS_DATA_ENVIRONMENTS, Button, CalendarContext, CalendarSubscribeButton, CalendarView, CalendarWidget, ChatRoomView, ChatSidebar, ChatSidebarContext, ChatSidebarProvider, 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, EnvironmentBanner, EnvironmentContext, EnvironmentSwitcher, EventDialog, EventRsvpBadge, LanguageContext, LanguageSwitcher, MiniCalendar, NotificationsContext, NotificationsWidget, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, buttonVariants, cn, defaultLanguages, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
|
7326
|
+
export { AvatarEditor, AvatarEditorDialog, BLOCKS_DATA_ENVIRONMENTS, Button, CalendarContext, CalendarSubscribeButton, CalendarView, CalendarWidget, ChatRoomView, ChatSidebar, ChatSidebarContext, ChatSidebarProvider, 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, EnvironmentBanner, EnvironmentContext, EnvironmentDot, EnvironmentMiniBadge, EnvironmentSwitcher, EventDialog, EventRsvpBadge, LanguageContext, LanguageSwitcher, MiniCalendar, NotificationsContext, NotificationsWidget, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, buttonVariants, cn, defaultLanguages, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
|
7267
7327
|
//# sourceMappingURL=index.js.map
|
|
7268
7328
|
//# sourceMappingURL=index.js.map
|