@app-studio/web 0.8.77 → 0.8.80

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.
Files changed (41) hide show
  1. package/dist/components/Accordion/Accordion/Accordion.view.d.ts +2 -1
  2. package/dist/components/Alert/Alert/Alert.props.d.ts +7 -1
  3. package/dist/components/Alert/Alert/Alert.style.d.ts +9 -1
  4. package/dist/components/Alert/Alert/Alert.view.d.ts +1 -1
  5. package/dist/components/Alert/Alert.d.ts +1 -1
  6. package/dist/components/Alert/examples/darkMode.d.ts +2 -0
  7. package/dist/components/Badge/Badge/Badge.style.d.ts +5 -1
  8. package/dist/components/Badge/Badge.d.ts +1 -1
  9. package/dist/components/Badge/examples/darkMode.d.ts +2 -0
  10. package/dist/components/Badge/examples/index.d.ts +1 -0
  11. package/dist/components/Card/Card/Card.style.d.ts +7 -3
  12. package/dist/components/Card/examples/darkModeExample.d.ts +2 -0
  13. package/dist/components/Command/Command/Command.style.d.ts +1 -0
  14. package/dist/components/ContextMenu/ContextMenu/ContextMenu.view.d.ts +2 -1
  15. package/dist/components/DragAndDrop/DragAndDrop/DragAndDrop.props.d.ts +1 -1
  16. package/dist/components/DropdownMenu/DropdownMenu/DropdownMenu.view.d.ts +2 -1
  17. package/dist/components/Form/Label/Label/Label.type.d.ts +1 -1
  18. package/dist/components/Form/TextArea/TextArea/TextArea.type.d.ts +4 -2
  19. package/dist/components/Input/Input.type.d.ts +2 -1
  20. package/dist/components/Menubar/Menubar/Menubar.view.d.ts +2 -1
  21. package/dist/components/NavigationMenu/NavigationMenu/NavigationMenu.view.d.ts +2 -1
  22. package/dist/components/OTPInput/OTPInput/OTPInput.type.d.ts +1 -2
  23. package/dist/components/Resizable/Resizable/Resizable.style.d.ts +1 -0
  24. package/dist/components/Separator/Separator/Separator.style.d.ts +1 -0
  25. package/dist/components/Sidebar/Sidebar/Sidebar.style.d.ts +1 -0
  26. package/dist/components/Slider/Slider/Slider.style.d.ts +1 -0
  27. package/dist/components/Table/Table/Table.props.d.ts +2 -2
  28. package/dist/components/Toast/Toast/Toast.props.d.ts +2 -1
  29. package/dist/components/Tooltip/Tooltip/Tooltip.style.d.ts +1 -0
  30. package/dist/components/Tooltip/Tooltip/Tooltip.view.d.ts +2 -1
  31. package/dist/web.cjs.development.js +559 -663
  32. package/dist/web.cjs.development.js.map +1 -1
  33. package/dist/web.cjs.production.min.js +1 -1
  34. package/dist/web.cjs.production.min.js.map +1 -1
  35. package/dist/web.esm.js +560 -664
  36. package/dist/web.esm.js.map +1 -1
  37. package/dist/web.umd.development.js +559 -663
  38. package/dist/web.umd.development.js.map +1 -1
  39. package/dist/web.umd.production.min.js +1 -1
  40. package/dist/web.umd.production.min.js.map +1 -1
  41. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { AccordionContextType } from './Accordion.type';
3
4
  import { AccordionTriggerProps, AccordionContentProps, AccordionItemProps } from './Accordion.props';
4
5
  export declare const AccordionProvider: React.FC<{
@@ -28,4 +29,4 @@ export declare const AccordionView: React.FC<{
28
29
  baseId: string;
29
30
  type: 'single' | 'multiple';
30
31
  collapsible: boolean;
31
- }>;
32
+ } & ViewProps>;
@@ -1,9 +1,15 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { AlertStyles, Variant } from './Alert.type';
3
- export interface AlertProps {
4
+ export interface AlertProps extends ViewProps {
4
5
  icon?: React.ReactNode;
5
6
  title: string;
6
7
  description: string | React.ReactNode;
7
8
  variant?: Variant;
8
9
  views?: AlertStyles;
10
+ /**
11
+ * Optional theme mode override ('light' or 'dark')
12
+ * If not provided, the component will use the theme mode from context
13
+ */
14
+ themeMode?: 'light' | 'dark';
9
15
  }
@@ -11,7 +11,15 @@
11
11
  import { ViewProps } from 'app-studio';
12
12
  import { Variant } from './Alert.type';
13
13
  /**
14
- * Theme styles for different alert variants
14
+ * Get theme styles for different alert variants based on theme mode
15
+ */
16
+ export declare const getThemes: (themeMode: string) => Record<Variant, {
17
+ container: ViewProps;
18
+ content: ViewProps;
19
+ icon: ViewProps;
20
+ }>;
21
+ /**
22
+ * Default themes for backward compatibility
15
23
  */
16
24
  export declare const Themes: Record<Variant, {
17
25
  container: ViewProps;
@@ -8,4 +8,4 @@ import { AlertProps } from './Alert.props';
8
8
  /**
9
9
  * Alert component that displays important messages to users
10
10
  */
11
- export declare const AlertView: ({ icon, title, views, description, variant, }: AlertProps) => React.JSX.Element;
11
+ export declare const AlertView: ({ icon, title, views, description, variant, themeMode: elementMode, ...props }: AlertProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { AlertProps } from './Alert/Alert.props';
3
- export declare const Alert: ({ icon, title, views, description, variant, }: AlertProps) => React.JSX.Element;
3
+ export declare const Alert: (props: AlertProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DarkModeDemo: () => React.JSX.Element;
@@ -26,6 +26,10 @@ export declare const PositionStyles: {
26
26
  [key: string]: React.CSSProperties;
27
27
  };
28
28
  /**
29
- * Badge variants with consistent styling
29
+ * Get badge variants with consistent styling based on theme mode
30
+ */
31
+ export declare const getBadgeVariants: (themeMode: string) => Record<Variant, ViewProps>;
32
+ /**
33
+ * Default badge variants for backward compatibility
30
34
  */
31
35
  export declare const BadgeVariants: Record<Variant, ViewProps>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { BadgeProps } from './Badge/Badge.props';
3
- export declare const Badge: ({ content, shape, position, variant, size, views, }: BadgeProps) => React.JSX.Element;
3
+ export declare const Badge: (props: BadgeProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DarkModeDemo: () => React.JSX.Element;
@@ -6,3 +6,4 @@ export * from './shape';
6
6
  export * from './size';
7
7
  export * from './styles';
8
8
  export * from './variant';
9
+ export * from './darkMode';
@@ -19,11 +19,15 @@ export declare const CardSizes: Record<Size, ViewProps>;
19
19
  */
20
20
  export declare const CardShapes: Record<Shape, number | string>;
21
21
  /**
22
- * Card variants with consistent styling
22
+ * Get card variants with consistent styling based on theme mode
23
+ */
24
+ export declare const getCardVariants: (themeMode: string) => Record<Variant, ViewProps>;
25
+ /**
26
+ * Default card variants (for backward compatibility)
23
27
  */
24
28
  export declare const CardVariants: Record<Variant, ViewProps>;
25
29
  /**
26
30
  * Function to get default styles for Card components
27
- * @param theme - Theme object (not used directly but kept for compatibility)
31
+ * @param theme - Theme object from useTheme hook
28
32
  */
29
- export declare const getDefaultCardStyles: (_theme: any) => CardStyles;
33
+ export declare const getDefaultCardStyles: (theme: any) => CardStyles;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DarkModeExample: () => React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { ViewProps } from 'app-studio';
2
2
  import { CommandSize, CommandVariant } from './Command.type';
3
3
  export declare const CommandSizes: Record<CommandSize, ViewProps>;
4
+ export declare const getCommand: (themeMode: string) => Record<CommandVariant, ViewProps>;
4
5
  export declare const CommandVariants: Record<CommandVariant, ViewProps>;
5
6
  export declare const CommandInputStyles: ViewProps;
6
7
  export declare const CommandListStyles: ViewProps;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { ContextMenuContextType, Size, Variant, ContextMenuItem as ContextMenuItemType } from './ContextMenu.type';
3
4
  import { ContextMenuTriggerProps, ContextMenuContentProps, ContextMenuItemProps, ContextMenuDividerProps, ContextMenuSeparatorProps } from './ContextMenu.props';
4
5
  export declare const ContextMenuProvider: React.FC<{
@@ -18,4 +19,4 @@ export declare const ContextMenuView: React.FC<{
18
19
  variant?: Variant;
19
20
  disableNativeContextMenu?: boolean;
20
21
  views?: any;
21
- }>;
22
+ } & ViewProps>;
@@ -7,7 +7,7 @@ export interface DragAndDropProps {
7
7
  containerProps?: ViewProps;
8
8
  itemProps?: ViewProps;
9
9
  }
10
- export interface DragAndDropViewProps extends DragAndDropProps {
10
+ export interface DragAndDropViewProps extends DragAndDropProps, ViewProps {
11
11
  draggedIndex: number | null;
12
12
  itemRefs: React.MutableRefObject<(HTMLDivElement | null)[]>;
13
13
  renderItem?: (item: any, index: number) => React.ReactNode;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { DropdownMenuContextType, DropdownMenuItem as DropdownMenuItemType, Position, Alignment } from './DropdownMenu.type';
3
4
  import { DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuDividerProps } from './DropdownMenu.props';
4
5
  export declare const DropdownMenuProvider: React.FC<{
@@ -16,4 +17,4 @@ export declare const DropdownMenuView: React.FC<{
16
17
  side?: Position;
17
18
  align?: Alignment;
18
19
  views?: any;
19
- }>;
20
+ } & ViewProps>;
@@ -1,3 +1,3 @@
1
1
  export declare type TextWeights = 'hairline' | 'thin' | 'light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'black';
2
- export declare type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
2
+ export declare type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  export declare type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -3,9 +3,11 @@ export declare type Variant = 'outline' | 'default' | 'none';
3
3
  export declare type Shape = 'default' | 'sharp' | 'rounded';
4
4
  export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  export declare type TextAreaStyles = {
6
- box?: ViewProps;
7
- text?: ViewProps;
6
+ warper?: ViewProps;
7
+ container?: ViewProps;
8
8
  label?: ViewProps;
9
9
  helperText?: ViewProps;
10
10
  field?: ViewProps;
11
+ content?: ViewProps;
12
+ textarea?: ViewProps;
11
13
  };
@@ -3,10 +3,11 @@ export declare type Variant = 'outline' | 'default' | 'none';
3
3
  export declare type Shape = 'default' | 'sharp' | 'rounded' | 'pillShaped';
4
4
  export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  export declare type TextFieldStyles = {
6
- box?: ViewProps;
7
6
  text?: ViewProps;
8
7
  label?: ViewProps;
8
+ error?: ViewProps;
9
9
  helperText?: ViewProps;
10
+ container?: ViewProps;
10
11
  };
11
12
  export declare type Wrap = 'wrap' | 'nowrap' | 'wrap-reverse';
12
13
  export declare type Justify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { MenubarContextType, MenubarItem as MenubarItemType, Orientation, Size, Variant } from './Menubar.type';
3
4
  import { MenubarRootProps, MenubarMenuProps, MenubarTriggerProps, MenubarContentProps, MenubarItemProps, MenubarSeparatorProps } from './Menubar.props';
4
5
  export declare const useMenubarContext: () => MenubarContextType;
@@ -18,4 +19,4 @@ export declare const MenubarView: React.FC<{
18
19
  size: Size;
19
20
  variant: Variant;
20
21
  views?: any;
21
- }>;
22
+ } & ViewProps>;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { NavigationMenuContextType, NavigationItem, Orientation, Size, Variant } from './NavigationMenu.type';
3
4
  import { NavigationMenuItemProps, NavigationMenuListProps, NavigationMenuTriggerProps, NavigationMenuContentProps } from './NavigationMenu.props';
4
5
  export declare const NavigationMenuProvider: React.FC<{
@@ -22,4 +23,4 @@ export declare const NavigationMenuView: React.FC<{
22
23
  size: Size;
23
24
  variant: Variant;
24
25
  views?: any;
25
- }>;
26
+ } & ViewProps>;
@@ -7,9 +7,8 @@ export declare type OTPInputType = 'text' | 'password' | 'number';
7
7
  * Styles for different parts of the OTP input component
8
8
  */
9
9
  export declare type OTPInputStyles = {
10
- container?: ViewProps;
11
10
  input?: ViewProps;
12
- box?: ViewProps;
11
+ container?: ViewProps;
13
12
  text?: ViewProps;
14
13
  label?: ViewProps;
15
14
  helperText?: ViewProps;
@@ -2,5 +2,6 @@ import { ViewProps } from 'app-studio';
2
2
  import { Orientation, Size, Variant } from './Resizable.type';
3
3
  export declare const ResizableOrientations: Record<Orientation, ViewProps>;
4
4
  export declare const getHandleSizeStyles: (size: Size, orientation: Orientation) => ViewProps;
5
+ export declare const getHandle: (themeMode: string) => Record<Variant, ViewProps>;
5
6
  export declare const HandleVariants: Record<Variant, ViewProps>;
6
7
  export declare const HandleIconStyles: Record<Orientation, ViewProps>;
@@ -16,6 +16,7 @@ export declare const SeparatorOrientations: Record<Orientation, ViewProps>;
16
16
  /**
17
17
  * Variant configurations for the Separator component
18
18
  */
19
+ export declare const getSeparator: (themeMode: string) => Record<Variant, string>;
19
20
  export declare const SeparatorVariants: Record<Variant, string>;
20
21
  /**
21
22
  * Thickness configurations for the Separator component
@@ -21,6 +21,7 @@ export declare const SidebarSizes: Record<Size, {
21
21
  /**
22
22
  * Variant styles for the Sidebar component
23
23
  */
24
+ export declare const getSidebar: (themeMode: string) => Record<Variant, ViewProps>;
24
25
  export declare const SidebarVariants: Record<Variant, ViewProps>;
25
26
  /**
26
27
  * Position styles for the Sidebar component
@@ -3,6 +3,7 @@ import { Orientation, Shape, Size, Variant } from './Slider.type';
3
3
  export declare const SliderSizes: Record<Size, ViewProps>;
4
4
  export declare const ThumbSizes: Record<Size, ViewProps>;
5
5
  export declare const SliderShapes: Record<Shape, number | string>;
6
+ export declare const getSlider: (themeMode: string) => Record<Variant, ViewProps>;
6
7
  export declare const SliderVariants: Record<Variant, ViewProps>;
7
8
  export declare const EnhancedSliderSizes: Record<Size, {
8
9
  trackCrossAxisSize: number;
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import { Column, FooterCell, TableViewStyles } from './Table.type';
3
+ import { ViewProps } from 'app-studio';
3
4
  export interface TableProps {
4
5
  data: any[];
5
6
  columns: Column[];
6
7
  footer?: FooterCell[];
7
8
  caption?: React.ReactNode;
8
9
  views?: TableViewStyles;
9
- onClick?: Function;
10
10
  }
11
- export interface TableViewProps extends TableProps {
11
+ export interface TableViewProps extends TableProps, Omit<ViewProps, 'size'> {
12
12
  }
13
13
  export interface TableLayoutProps {
14
14
  Head?: React.FC<any>;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import { ViewProps } from 'app-studio';
2
3
  import { ToastItem, ToastOptions, ToastPosition, ToastStyles, ToastVariant, ThemesType } from './Toast.type';
3
- export interface ToastProps {
4
+ export interface ToastProps extends Omit<ViewProps, 'theme'> {
4
5
  /**
5
6
  * Unique identifier for the toast
6
7
  */
@@ -1,6 +1,7 @@
1
1
  import { ViewProps } from 'app-studio';
2
2
  import { Size, Variant, Position, Alignment } from './Tooltip.type';
3
3
  export declare const TooltipSizes: Record<Size, ViewProps>;
4
+ export declare const getTooltip: (themeMode: string) => Record<Variant, ViewProps>;
4
5
  export declare const TooltipVariants: Record<Variant, ViewProps>;
5
6
  export declare const getTooltipPositionStyles: (position: Position, align: Alignment) => ViewProps;
6
7
  export declare const getArrowStyles: (position: Position) => ViewProps;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ViewProps } from 'app-studio';
2
3
  import { TooltipContextType, Position, Alignment } from './Tooltip.type';
3
4
  import { TooltipTriggerProps, TooltipContentProps } from './Tooltip.props';
4
5
  export declare const useTooltipContext: () => TooltipContextType;
@@ -17,4 +18,4 @@ export declare const TooltipView: React.FC<{
17
18
  variant?: string;
18
19
  showArrow?: boolean;
19
20
  views?: any;
20
- }>;
21
+ } & Omit<ViewProps, 'position'>>;