@ama-pt/agora-design-system 3.5.1 → 3.5.3

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 (35) hide show
  1. package/artifacts/dist/agora-line-CAGTnTRu.mjs +15 -0
  2. package/artifacts/dist/agora-line-CAGTnTRu.mjs.map +1 -0
  3. package/artifacts/dist/index.mjs +4121 -4143
  4. package/artifacts/dist/index.mjs.map +1 -1
  5. package/artifacts/dist/index.umd.js +2 -2
  6. package/artifacts/dist/index.umd.js.map +1 -1
  7. package/artifacts/dist/line-copy-BaJKTDcY.mjs +16 -0
  8. package/artifacts/dist/line-copy-BaJKTDcY.mjs.map +1 -0
  9. package/artifacts/dist/solid-copy-DQaYbvus.mjs +9 -0
  10. package/artifacts/dist/solid-copy-DQaYbvus.mjs.map +1 -0
  11. package/artifacts/dist/style.css +1 -1
  12. package/artifacts/dist/tailwind.css +1497 -15
  13. package/artifacts/dist/types/components/avatar/avatar.d.ts +25 -0
  14. package/artifacts/dist/types/components/avatar/index.d.ts +1 -1
  15. package/artifacts/dist/types/components/header/header.d.ts +1 -2
  16. package/artifacts/dist/types/components/header/index.d.ts +0 -6
  17. package/artifacts/dist/types/components/header/internals/context/data-context/header-data-context.d.ts +0 -3
  18. package/artifacts/dist/types/components/header/internals/context/menu-context/menu-type.enum.d.ts +3 -1
  19. package/artifacts/dist/types/components/header/internals/shared/panel-menu/panel-menu.d.ts +2 -0
  20. package/artifacts/dist/types/components/icon/assets/line/line-copy.d.ts +4 -0
  21. package/artifacts/dist/types/components/icon/assets/solid/solid-copy.d.ts +4 -0
  22. package/artifacts/dist/types/components/panel-switcher/desktop/panel-switcher-desktop.d.ts +2 -1
  23. package/artifacts/dist/types/components/panel-switcher/helper.d.ts +36 -0
  24. package/artifacts/dist/types/components/panel-switcher/index.d.ts +1 -1
  25. package/artifacts/dist/types/components/panel-switcher/mobile/panel-switcher-mobile.d.ts +2 -1
  26. package/artifacts/dist/types/components/panel-switcher/panel-switcher-container.d.ts +5 -1
  27. package/artifacts/dist/types/components/panel-switcher/panel-switcher.d.ts +2 -23
  28. package/package.json +1 -1
  29. package/artifacts/dist/agora-line-NPWOQuk9.mjs +0 -15
  30. package/artifacts/dist/agora-line-NPWOQuk9.mjs.map +0 -1
  31. package/artifacts/dist/types/components/header/ecosystem-bar/ecosystem-bar-content.d.ts +0 -5
  32. package/artifacts/dist/types/components/header/ecosystem-bar/ecosystem-bar-title.d.ts +0 -5
  33. package/artifacts/dist/types/components/header/ecosystem-bar/ecosystem-bar.d.ts +0 -5
  34. package/artifacts/dist/types/components/header/internals/context/data-context/utils/ecosystem-utils.d.ts +0 -5
  35. package/artifacts/dist/types/components/header/internals/ecosystem-bar/internal-ecosystem-bar.d.ts +0 -3
@@ -11,6 +11,18 @@ export type AvatarType = 'image' | 'icon' | 'initials' | 'empty';
11
11
  * The available badge positions. Each of them defines the location of the badge on the avatar.
12
12
  */
13
13
  export type AvatarBadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
14
+ /**
15
+ * The available badge variants. Each of them defines the color of the badge.
16
+ */
17
+ export type AvatarBadgeVariant = 'primary' | 'secondary' | 'neutral' | 'informative' | 'success' | 'warning' | 'danger';
18
+ /**
19
+ * The available badge appearances. Defines solid or outline style.
20
+ */
21
+ export type AvatarBadgeAppearance = 'solid' | 'outline';
22
+ /**
23
+ * The available badge sizes. Defines badge size.
24
+ */
25
+ export type AvatarBadgeSize = 'default' | 'large';
14
26
  export interface AvatarProps extends ComponentProps<'div'> {
15
27
  /**
16
28
  * Defines the appearance of the avatar.
@@ -45,10 +57,23 @@ export interface AvatarProps extends ComponentProps<'div'> {
45
57
  * Defines the position of the avatar tooltip.
46
58
  */
47
59
  tooltipPosition?: TooltipPosition;
60
+ /**
61
+ * Defines the avatar badge variant. This variant will define the color of the badge.
62
+ */
63
+ badgeVariant?: AvatarBadgeVariant;
64
+ /**
48
65
  /**
49
66
  * The defines the align the avatar tooltip alignment.
50
67
  */
51
68
  tooltipAlignment?: TooltipAlignment;
69
+ /**
70
+ * Defines the avatar badge appearance.
71
+ */
72
+ badgeAppearance?: AvatarBadgeAppearance;
73
+ /**
74
+ * Defines the avatar badge size.
75
+ */
76
+ badgeSize?: AvatarBadgeSize;
52
77
  /**
53
78
  * Makes the avatar interactive. An interactive avatar can be focused by clicking on it, or pressing Space, Enter or NumpadEnter.
54
79
  */
@@ -1,2 +1,2 @@
1
1
  export { Avatar } from './avatar';
2
- export type { AvatarBadgePosition, AvatarProps, AvatarType } from './avatar';
2
+ export type { AvatarBadgeAppearance, AvatarBadgePosition, AvatarBadgeSize, AvatarBadgeVariant, AvatarProps, AvatarType } from './avatar';
@@ -3,7 +3,6 @@ import { ComponentProps, FC, ReactElement, Ref } from 'react';
3
3
  import { BrandProps } from './brand/brand';
4
4
  import { GeneralBarProps } from './general-bar/general-bar';
5
5
  import { NavigationBarProps } from './navigation-bar/navigation-bar';
6
- import { EcosystemBarProps } from './ecosystem-bar/ecosystem-bar';
7
6
  export interface HeaderElement extends ComponentProps<'div'> {
8
7
  focusActiveArea: () => void;
9
8
  setActiveArea: (areaValue: string) => void;
@@ -23,7 +22,7 @@ export interface HeaderElement extends ComponentProps<'div'> {
23
22
  openNavigationMenuOption: (index: number) => void;
24
23
  closeAll: () => void;
25
24
  }
26
- export type HeaderChildrenComponents = ReactElement<BrandProps | GeneralBarProps | NavigationBarProps> | ReactElement<BrandProps | GeneralBarProps | EcosystemBarProps>[];
25
+ export type HeaderChildrenComponents = ReactElement<BrandProps | GeneralBarProps | NavigationBarProps> | ReactElement<BrandProps | GeneralBarProps | NavigationBarProps>[];
27
26
  export interface HeaderProps {
28
27
  ref?: Ref<HeaderElement>;
29
28
  darkMode?: BooleanProp;
@@ -58,11 +58,5 @@ export { NavigationLink } from './navigation-bar/navigation-link';
58
58
  export type { NavigationLinkProps } from './navigation-bar/navigation-link';
59
59
  export { RelatedNavigationLink } from './navigation-bar/related-navigation-link';
60
60
  export type { RelatedNavigationLinkProps } from './navigation-bar/related-navigation-link';
61
- export { EcosystemBar } from './ecosystem-bar/ecosystem-bar';
62
- export type { EcosystemBarProps } from './ecosystem-bar/ecosystem-bar';
63
- export { EcosystemBarTitle } from './ecosystem-bar/ecosystem-bar-title';
64
- export type { EcosystemBarTitleProps } from './ecosystem-bar/ecosystem-bar-title';
65
- export { EcosystemBarContent } from './ecosystem-bar/ecosystem-bar-content';
66
- export type { EcosystemBarContentProps } from './ecosystem-bar/ecosystem-bar-content';
67
61
  export { NavigationFreestyle } from './navigation-bar/navigation-freestyle';
68
62
  export type { NavigationFreestyleProps } from './navigation-bar/navigation-freestyle';
@@ -57,9 +57,6 @@ export interface HeaderDataContextProps {
57
57
  getModalAriaLabel: () => string;
58
58
  getModalCloseLabel: () => string;
59
59
  darkMode: boolean;
60
- getEcosystemBarTitle: () => ReactNode;
61
- getEcosystemBarContent: () => ReactNode;
62
- hasEcosystemBar: () => boolean;
63
60
  }
64
61
  export declare const HeaderDataContext: import("react").Context<HeaderDataContextProps>;
65
62
  export declare const useHeaderDataContext: () => HeaderDataContextProps;
@@ -11,5 +11,7 @@ export declare enum MenuTypeEnum {
11
11
  MenuBurger = "MenuBurger",
12
12
  Modal = "Modal",
13
13
  NavigationList = "NavigationList",
14
- NavigationBurgerLayout = "NavigationBurgerLayout"
14
+ NavigationBurgerLayout = "NavigationBurgerLayout",
15
+ GeneralBarPortal = "GeneralBarPortal",
16
+ NavigationBarPortal = "NavigationBarPortal"
15
17
  }
@@ -1,6 +1,7 @@
1
1
  import { ButtonProps } from '../../../../../components/button';
2
2
  import { ComponentProps, FC, ReactElement } from 'react';
3
3
  import { LayoutProps } from './layout.interface';
4
+ import { MenuTypeEnum } from '../../context/menu-context/menu-type.enum';
4
5
  import './panel-menu.css';
5
6
  export interface PanelMenuElement extends HTMLDivElement {
6
7
  /**
@@ -36,6 +37,7 @@ export interface PanelMenuProps extends ComponentProps<'div'> {
36
37
  trailingIconHover?: string;
37
38
  };
38
39
  isDrawerPanel?: boolean;
40
+ portalRefType: MenuTypeEnum.GeneralBarPortal | MenuTypeEnum.NavigationBarPortal;
39
41
  }
40
42
  declare const PanelMenu: FC<PanelMenuProps>;
41
43
  export { PanelMenu };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SVGIconProps } from '../../../../models';
3
+ declare const _default: (props: SVGIconProps) => React.JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SVGIconProps } from '../../../../models';
3
+ declare const _default: (props: SVGIconProps) => React.JSX.Element;
4
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { TabBodyProps } from '../../../components/tabs';
2
2
  import React, { ComponentProps, FC, ReactElement } from 'react';
3
3
  import './panel-switcher-desktop.css';
4
- import { ButtonsHeaderData } from '../panel-switcher';
4
+ import { ButtonsHeaderData } from '../../../components/panel-switcher';
5
5
  export interface PanelSwitcherDesktopProps extends ComponentProps<'div'> {
6
6
  buttonListRef: React.RefObject<HTMLDivElement | null>;
7
7
  panelRef: React.RefObject<HTMLDivElement | null>;
@@ -9,5 +9,6 @@ export interface PanelSwitcherDesktopProps extends ComponentProps<'div'> {
9
9
  activateButton: (index: number) => void;
10
10
  buttonsHeaderData: Array<ButtonsHeaderData>;
11
11
  buttonsBodyData: Array<ReactElement<TabBodyProps>>;
12
+ darkMode?: boolean;
12
13
  }
13
14
  export declare const PanelSwitcherDesktop: FC<PanelSwitcherDesktopProps>;
@@ -0,0 +1,36 @@
1
+ import { FC, ReactElement, ReactNode } from 'react';
2
+ import { BooleanProp } from '../../models';
3
+ import { TabBodyProps } from '../tabs';
4
+ type ReactNodeOrFC = ReactNode | FC<{
5
+ darkMode?: BooleanProp;
6
+ }>;
7
+ export type PanelData = {
8
+ text: string;
9
+ withIcon?: boolean;
10
+ leadingIcon?: string;
11
+ content: ReactNodeOrFC;
12
+ leadingIconHover?: string;
13
+ };
14
+ export type ButtonsHeaderData = {
15
+ withIcon: boolean;
16
+ leadingIcon: string;
17
+ leadingIconHover: string;
18
+ child: ReactElement<TabBodyProps>;
19
+ };
20
+ export interface PanelSwitcherProps {
21
+ /**
22
+ * Collection of PanelData to be displayed by panel.
23
+ */
24
+ data: PanelData[];
25
+ /**
26
+ * Defines the label of the modal close button.
27
+ */
28
+ modalCloseButtonLabel: string;
29
+ /**
30
+ * The flag to set if the footer is in dark mode or light mode.
31
+ */
32
+ darkMode?: boolean;
33
+ }
34
+ export declare const convertContentToNode: (content: ReactNodeOrFC, darkMode?: boolean) => ReactNode;
35
+ export declare const handleIcons: (hasIcon: boolean, icon: string, leadingIcon: boolean) => string | undefined;
36
+ export {};
@@ -1,2 +1,2 @@
1
1
  export { PanelSwitcher } from './panel-switcher';
2
- export type { PanelSwitcherProps } from './panel-switcher';
2
+ export type { PanelSwitcherProps, PanelData, ButtonsHeaderData } from './helper';
@@ -1,13 +1,14 @@
1
1
  import React, { FC, ReactElement, RefObject } from 'react';
2
2
  import { TabBodyProps } from '../../../components/tabs';
3
3
  import './panel-switcher-mobile.css';
4
- import { ButtonsHeaderData } from '../panel-switcher';
4
+ import { ButtonsHeaderData } from '../../../components/panel-switcher';
5
5
  export interface PanelSwitcherMobileProps {
6
6
  modalCloseButtonLabel: string;
7
7
  buttonListRef: RefObject<HTMLDivElement | null>;
8
8
  buttonsHeaderData: Array<ButtonsHeaderData>;
9
9
  buttonsBodyData: Array<ReactElement<TabBodyProps>>;
10
10
  activeButton?: number;
11
+ darkMode?: boolean;
11
12
  }
12
13
  export declare const ModalContent: FC<{
13
14
  content: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactElement } from 'react';
2
2
  import { TabProps } from '../tabs';
3
- import { PanelData } from './panel-switcher';
3
+ import { PanelData } from '../../components/panel-switcher';
4
4
  export interface PanelSwitcherContainerProps {
5
5
  /**
6
6
  * Collection of PanelData to be displayed by panel.
@@ -14,5 +14,9 @@ export interface PanelSwitcherContainerProps {
14
14
  * Defines the label of the modal close button.
15
15
  */
16
16
  modalCloseButtonLabel: string;
17
+ /**
18
+ * The flag to set if the footer is in dark mode or light mode.
19
+ */
20
+ darkMode?: boolean;
17
21
  }
18
22
  export declare const PanelSwitcherContainer: FC<PanelSwitcherContainerProps>;
@@ -1,24 +1,3 @@
1
- import { FC, ReactElement, ReactNode } from 'react';
2
- import { TabBodyProps } from '../tabs';
3
- export type PanelData = {
4
- text: string;
5
- content: ReactNode;
6
- leadingIcon?: string;
7
- leadingIconHover?: string;
8
- };
9
- export type ButtonsHeaderData = {
10
- leadingIcon: string;
11
- leadingIconHover: string;
12
- child: ReactElement<TabBodyProps>;
13
- };
14
- export interface PanelSwitcherProps {
15
- /**
16
- * Collection of PanelData to be displayed by panel.
17
- */
18
- data: PanelData[];
19
- /**
20
- * Defines the label of the modal close button.
21
- */
22
- modalCloseButtonLabel: string;
23
- }
1
+ import { FC } from 'react';
2
+ import { PanelSwitcherProps } from './helper';
24
3
  export declare const PanelSwitcher: FC<PanelSwitcherProps>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ama-pt/agora-design-system",
3
3
  "description": "Ágora Design system",
4
- "version": "3.5.1",
4
+ "version": "3.5.3",
5
5
  "main": "artifacts/dist/index.mjs",
6
6
  "module": "artifacts/dist/index.umd.js",
7
7
  "files": [
@@ -1,15 +0,0 @@
1
- import l from "react";
2
- const n = (e) => {
3
- const t = { ...e };
4
- return delete t.alt, delete t.title, /* @__PURE__ */ l.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", ...t, role: "img" }, e.title && /* @__PURE__ */ l.createElement("title", null, e.title), /* @__PURE__ */ l.createElement(
5
- "path",
6
- {
7
- d: "M13.2637 2.5L8.69727 14.0156L8.42578 14.7002H15.7539L15.5068 14.0273L13.4678 8.4834L14.8838 4.86035L21.2725 21.5H18.4307L16.9121 17.6182L16.7881 17.2998H7.38672L7.25977 17.6104L5.66406 21.5H2.74023L4.15234 17.9863L5.60156 14.3867L5.60254 14.3848L10.3398 2.5H13.2637Z",
8
- stroke: "#034AD8"
9
- }
10
- ));
11
- };
12
- export {
13
- n as default
14
- };
15
- //# sourceMappingURL=agora-line-NPWOQuk9.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agora-line-NPWOQuk9.mjs","sources":["../../src/components/icon/assets/other/agora-line.tsx"],"sourcesContent":["import React from 'react';\n\nimport { SVGIconProps } from '@/models/';\n\nexport default (props: SVGIconProps) => {\n const newProps = { ...props };\n delete newProps.alt;\n delete newProps.title;\n\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" {...newProps} role=\"img\">\n {props.title && <title>{props.title}</title>}\n <path\n d=\"M13.2637 2.5L8.69727 14.0156L8.42578 14.7002H15.7539L15.5068 14.0273L13.4678 8.4834L14.8838 4.86035L21.2725 21.5H18.4307L16.9121 17.6182L16.7881 17.2998H7.38672L7.25977 17.6104L5.66406 21.5H2.74023L4.15234 17.9863L5.60156 14.3867L5.60254 14.3848L10.3398 2.5H13.2637Z\"\n stroke=\"#034AD8\"\n />\n </svg>\n );\n};\n"],"names":["agoraLine","props","newProps","React"],"mappings":";AAIA,MAAAA,IAAe,CAACC,MAAwB;AACtC,QAAMC,IAAW,EAAE,GAAGD,EAAA;AACtB,gBAAOC,EAAS,KAChB,OAAOA,EAAS,OAGd,gBAAAC,EAAA,cAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,OAAM,8BAA6B,MAAK,QAAQ,GAAGD,GAAU,MAAK,MAAA,GAC/GD,EAAM,SAAS,gBAAAE,EAAA,cAAC,SAAA,MAAOF,EAAM,KAAM,GACpC,gBAAAE,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,QAAO;AAAA,IAAA;AAAA,EAAA,CAEX;AAEJ;"}
@@ -1,5 +0,0 @@
1
- import React, { FC } from 'react';
2
- export interface EcosystemBarContentProps {
3
- children?: React.ReactNode;
4
- }
5
- export declare const EcosystemBarContent: FC<EcosystemBarContentProps>;
@@ -1,5 +0,0 @@
1
- import React, { FC } from 'react';
2
- export interface EcosystemBarTitleProps {
3
- children?: React.ReactNode;
4
- }
5
- export declare const EcosystemBarTitle: FC<EcosystemBarTitleProps>;
@@ -1,5 +0,0 @@
1
- import React, { FC } from 'react';
2
- export interface EcosystemBarProps {
3
- children?: React.ReactNode;
4
- }
5
- export declare const EcosystemBar: FC<EcosystemBarProps>;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { HeaderChildrenComponents } from '../../../../../../components/header/header';
3
- export declare const getEcosystemBarTitleInternal: (children?: HeaderChildrenComponents) => ReactNode | null;
4
- export declare const getEcosystemBarContentInternal: (children?: HeaderChildrenComponents) => ReactNode;
5
- export declare const hasEcosystemBarInternal: (children?: HeaderChildrenComponents) => boolean;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import './internal-ecosystem-bar.css';
3
- export declare const InternalEcosystemBar: () => React.JSX.Element;