@zealicsolutions/web-ui 0.2.61 → 0.2.62

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.
@@ -7,6 +7,7 @@ export declare type TabOption<T = string> = {
7
7
  isSelected?: boolean;
8
8
  };
9
9
  declare type TabElement = HTMLDivElement | null;
10
+ export declare type TabTheme = 'light' | 'dark';
10
11
  export declare type TabProps<T = string, K = string> = {
11
12
  tabKey: T;
12
13
  text: string;
@@ -16,8 +17,10 @@ export declare type TabProps<T = string, K = string> = {
16
17
  onClick?: (key: T) => void;
17
18
  options?: MenuItem<K>[];
18
19
  onOptionClick?: (optionKey: K) => void;
20
+ tabTheme?: TabTheme;
21
+ divider?: boolean;
19
22
  };
20
- declare const ZealTab: <T extends string, K extends string>({ options, onClick, text, tabKey, vertical, onOptionClick, ...tabProps }: TabProps<T, K>, ref: React.ForwardedRef<TabElement>) => JSX.Element;
23
+ declare const ZealTab: <T extends string, K extends string>({ options, onClick, text, tabKey, vertical, onOptionClick, tabTheme, ...tabProps }: TabProps<T, K>, ref: React.ForwardedRef<TabElement>) => JSX.Element;
21
24
  export declare const Tab: <T, K>(props: TabProps<T, K> & {
22
25
  ref?: React.ForwardedRef<TabElement> | undefined;
23
26
  }) => ReturnType<typeof ZealTab>;
@@ -1,7 +1,9 @@
1
- import { TabProps } from './Tab';
2
- declare type TabContainerProps = Pick<TabProps, 'isActive' | 'disabled'>;
3
- export declare const TabText: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").BoxTypeMap<{}, "div">>, import("styled-components").DefaultTheme, import("../../atoms/TextWrapper/TextWrapper").TextWrapperProps & {
1
+ import { TabProps, TabTheme } from './Tab';
2
+ declare type TabContainerProps = Pick<TabProps, 'isActive' | 'disabled' | 'tabTheme'>;
3
+ export declare const TabText: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").BoxTypeMap<{}, "div">>, import("styled-components").DefaultTheme, import("atoms").TextWrapperProps & {
4
4
  variant: string;
5
+ } & {
6
+ tabTheme?: TabTheme | undefined;
5
7
  }, "variant">;
6
8
  export declare const TabContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TabContainerProps, never>;
7
9
  export declare const CaretIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TabContainerProps, never>;
@@ -0,0 +1,2 @@
1
+ import { TabTheme } from 'molecules/Tab/Tab';
2
+ export declare const getColorForCaretDownIcon: (tabTheme?: TabTheme, disabled?: boolean) => string;
@@ -1,14 +1,15 @@
1
1
  /// <reference types="react" />
2
2
  import { CSSProperties } from 'styled-components';
3
3
  import { SizesTypes } from 'theme/types';
4
- import { TabProps } from '../Tab/Tab';
4
+ import { TabProps, TabTheme } from 'molecules/Tab/Tab';
5
5
  export declare type TabGroupProps<T = string, K = string> = {
6
- tabs: Pick<TabProps<T, K>, 'text' | 'tabKey' | 'disabled' | 'options'>[];
6
+ tabs: Pick<TabProps<T, K>, 'text' | 'tabKey' | 'disabled' | 'options' | 'divider'>[];
7
7
  activeTabKey: T;
8
8
  spacing?: SizesTypes;
9
9
  onTabChange?: (tabKey: T) => void;
10
10
  onOptionClick?: (optionKey: K) => void;
11
11
  style?: CSSProperties;
12
12
  vertical?: boolean;
13
+ tabTheme?: TabTheme;
13
14
  };
14
- export declare const TabGroup: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, }: TabGroupProps<T, K>) => JSX.Element;
15
+ export declare const TabGroup: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, tabTheme, }: TabGroupProps<T, K>) => JSX.Element;
@@ -3,7 +3,7 @@ import type { ComponentStory } from '@storybook/react';
3
3
  import { TabGroup as TabGroupComponent } from './TabGroup';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, }: import("./TabGroup").TabGroupProps<T, K>) => JSX.Element;
6
+ component: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, tabTheme, }: import("./TabGroup").TabGroupProps<T, K>) => JSX.Element;
7
7
  };
8
8
  export default _default;
9
9
  export declare const TabGroup: ComponentStory<typeof TabGroupComponent>;
@@ -1,3 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { TabTheme } from 'molecules/Tab/Tab';
1
3
  import { SizesTypes } from 'theme/types';
2
4
  export declare const TabsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
5
  spacing: SizesTypes;
@@ -7,6 +9,21 @@ export declare const TabGroupContainer: import("styled-components").StyledCompon
7
9
  declare type TabSliderProps = {
8
10
  width: number;
9
11
  left: number;
12
+ isActiveTab?: boolean;
13
+ vertical?: boolean;
14
+ tabTheme?: TabTheme;
10
15
  };
11
16
  export declare const TabSlider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TabSliderProps, never>;
17
+ export declare const TabWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
18
+ activeOpacity?: number | undefined;
19
+ withoutOpacityEffect?: boolean | undefined;
20
+ disabled?: boolean | undefined;
21
+ } & {
22
+ children?: import("react").ReactNode;
23
+ } & {
24
+ withoutOpacityEffect: boolean;
25
+ } & {
26
+ disabled?: boolean | undefined;
27
+ tabTheme?: TabTheme | undefined;
28
+ }, "withoutOpacityEffect">;
12
29
  export {};
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const useTabAnimation: (activeTab: string) => {
3
- setActiveTabIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
4
- tabUnderlineLeft: number;
5
- tabUnderlineWidth: number;
3
+ tabsUnderlineLeft: number[];
4
+ tabsUnderlineWidth: number[];
6
5
  tabsRef: import("react").MutableRefObject<(HTMLDivElement | null)[]>;
7
6
  };
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ import { IconNames as IconNames$2, TouchableOpacityProps as TouchableOpacityProp
19
19
  import { Control, ControllerProps } from 'react-hook-form/dist/types';
20
20
  import { SelectOption as SelectOption$1 } from 'atoms/Select/types';
21
21
  import { ControllerProps as ControllerProps$1, DeepPartial, FieldValues, FormState, Control as Control$1 } from 'react-hook-form';
22
+ import { TabProps as TabProps$1, TabTheme as TabTheme$1 } from 'molecules/Tab/Tab';
22
23
  import { ProcessTrackerStatus as ProcessTrackerStatus$1, FilteredFeedContentType as FilteredFeedContentType$1, ConsentProps as ConsentProps$1, HeroSliderProps as HeroSliderProps$1, ProcessTrackerProps as ProcessTrackerProps$1 } from 'organisms';
23
24
  import { FieldSectionProps as FieldSectionProps$1, MenuItemsProps as MenuItemsProps$1, InputFieldProps as InputFieldProps$1, HeroImageProps as HeroImageProps$1, ColumnsProps as ColumnsProps$1, EmphasizedTextProps as EmphasizedTextProps$1, TabGroupProps as TabGroupProps$1, AvatarDropdownProps as AvatarDropdownProps$1, FeedContentHeaderProps as FeedContentHeaderProps$1, AlertProps as AlertProps$1, BottomNaVBarItemProps as BottomNaVBarItemProps$1 } from 'molecules';
24
25
  import { SetPasswordFields, MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
@@ -562,27 +563,17 @@ declare type AvatarDropdownProps<T> = {
562
563
  };
563
564
  declare const AvatarDropdown: <T extends string | number>({ avatarProps, menuConfig, }: AvatarDropdownProps<T>) => JSX.Element;
564
565
 
565
- declare type TabProps<T = string, K = string> = {
566
- tabKey: T;
567
- text: string;
568
- disabled?: boolean;
569
- vertical?: boolean;
570
- isActive?: boolean;
571
- onClick?: (key: T) => void;
572
- options?: MenuItem<K>[];
573
- onOptionClick?: (optionKey: K) => void;
574
- };
575
-
576
566
  declare type TabGroupProps<T = string, K = string> = {
577
- tabs: Pick<TabProps<T, K>, 'text' | 'tabKey' | 'disabled' | 'options'>[];
567
+ tabs: Pick<TabProps$1<T, K>, 'text' | 'tabKey' | 'disabled' | 'options' | 'divider'>[];
578
568
  activeTabKey: T;
579
569
  spacing?: SizesTypes$2;
580
570
  onTabChange?: (tabKey: T) => void;
581
571
  onOptionClick?: (optionKey: K) => void;
582
572
  style?: CSSProperties;
583
573
  vertical?: boolean;
574
+ tabTheme?: TabTheme$1;
584
575
  };
585
- declare const TabGroup: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, }: TabGroupProps<T, K>) => JSX.Element;
576
+ declare const TabGroup: <T extends string, K extends string>({ tabs, spacing, vertical, activeTabKey, onTabChange, style, tabTheme, }: TabGroupProps<T, K>) => JSX.Element;
586
577
 
587
578
  declare type FieldSectionProps<T extends object> = {
588
579
  label: string;
@@ -812,6 +803,20 @@ declare type FooterLink = {
812
803
  location: string;
813
804
  };
814
805
 
806
+ declare type TabTheme = 'light' | 'dark';
807
+ declare type TabProps<T = string, K = string> = {
808
+ tabKey: T;
809
+ text: string;
810
+ disabled?: boolean;
811
+ vertical?: boolean;
812
+ isActive?: boolean;
813
+ onClick?: (key: T) => void;
814
+ options?: MenuItem<K>[];
815
+ onOptionClick?: (optionKey: K) => void;
816
+ tabTheme?: TabTheme;
817
+ divider?: boolean;
818
+ };
819
+
815
820
  declare type ProfileInformationProps<TabKeys extends string> = {
816
821
  backgroundImageUrl: string;
817
822
  avatarProps: AvatarProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "0.2.61",
3
+ "version": "0.2.62",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"