@ama-pt/agora-design-system 3.3.1 → 3.3.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.
@@ -0,0 +1,9 @@
1
+ import { CardIllustrativeVariants } from './card-illustrative';
2
+ import { AnchorVariant } from '../../../components/anchor';
3
+ type CardIllustrativeAnchorVariantsBody = {
4
+ anchorVariant?: AnchorVariant;
5
+ anchorDarkMode?: boolean;
6
+ };
7
+ export type CardIllustrativeAnchorVariantsMap = Record<CardIllustrativeVariants, CardIllustrativeAnchorVariantsBody>;
8
+ export declare const cardIllustrativeAnchorVariantsMap: CardIllustrativeAnchorVariantsMap;
9
+ export {};
@@ -0,0 +1,53 @@
1
+ import { ComponentProps, FC, ReactNode } from 'react';
2
+ import './card-illustrative.css';
3
+ import { BooleanProp } from '../../../models';
4
+ import { AnchorProps } from '../../../components/anchor';
5
+ export type CardIllustrativeVariants = 'white' | 'neutral-100' | 'primary-100' | 'secondary-100' | 'primary-300' | 'secondary-300' | 'primary-500' | 'primary-700' | 'primary-900' | 'image';
6
+ export type CardImageFilterOptions = 'neutral-900' | 'primary-900' | 'secondary-900';
7
+ export interface CardIllustrativeProps extends Omit<ComponentProps<'div'>, 'title'> {
8
+ /**
9
+ * title of card
10
+ */
11
+ title: ReactNode;
12
+ /**
13
+ * subtitle of card
14
+ */
15
+ subtitle?: ReactNode;
16
+ /**
17
+ * description of card
18
+ */
19
+ description?: ReactNode;
20
+ /**
21
+ * Variant of card illustrative
22
+ */
23
+ variant?: CardIllustrativeVariants;
24
+ /**
25
+ * overlay filter to apply to the image
26
+ */
27
+ imageFilter?: CardImageFilterOptions;
28
+ /**
29
+ * show the card horizontally
30
+ */
31
+ isCardHorizontal?: BooleanProp;
32
+ /**
33
+ * show the bookmark icon
34
+ */
35
+ showBookmarkIcon?: BooleanProp;
36
+ /**
37
+ * Background illustration element can be SVG node or Img node
38
+ */
39
+ bgIllustration?: ReactNode;
40
+ /**
41
+ * Background illustration element on hover can be SVG node or Img node
42
+ */
43
+ bgIllustrationHover?: ReactNode;
44
+ /**
45
+ * Definition of the AgoraDS anchor to be draw if specified.
46
+ */
47
+ mainAnchor?: AnchorProps;
48
+ /**
49
+ * Definition of the main link of the card. It can be any framework specific link. Like NextJS Link component. It will override the mainAnchor prop.
50
+ */
51
+ mainLink?: ReactNode;
52
+ }
53
+ export declare const CardIllustrative: FC<CardIllustrativeProps>;
@@ -0,0 +1,2 @@
1
+ export { CardIllustrative } from './card-illustrative';
2
+ export type { CardIllustrativeProps } from './card-illustrative';
@@ -0,0 +1,3 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ export declare const getSVGElement: (children?: ReactNode) => ReactElement<SVGElement> | null;
3
+ export declare const getImageElement: (children?: ReactNode) => ReactElement<HTMLImageElement> | null;
@@ -16,3 +16,4 @@ export * from './card-no-results';
16
16
  export * from './card-single';
17
17
  export * from './card-topic';
18
18
  export * from './card-action';
19
+ export * from './card-illustrative';
@@ -1,6 +1,7 @@
1
1
  import { BooleanProp } from '../../../models';
2
2
  import { FC, ReactElement } from 'react';
3
3
  import { InternalDropdownOptionProps } from './internal-dropdown-option';
4
+ import './internal-dropdown-section.css';
4
5
  export interface InternalDropdownSectionProps {
5
6
  className?: string;
6
7
  name: string;
@@ -1,4 +1,4 @@
1
- import { FC, HTMLProps, SVGProps } from 'react';
1
+ import React, { HTMLProps, SVGProps } from 'react';
2
2
  import { IconName } from './assets/index';
3
3
  import './icon.css';
4
4
  /**
@@ -24,5 +24,5 @@ export interface IconProps extends BasicIconProps {
24
24
  */
25
25
  onIconError?: () => void;
26
26
  }
27
- export declare const Icon: FC<IconProps>;
27
+ export declare const Icon: React.NamedExoticComponent<IconProps>;
28
28
  export {};
@@ -1,11 +1,11 @@
1
1
  import { ChangeEvent, ComponentProps, FC, ReactNode } from 'react';
2
2
  import { BooleanProp, FeedbackState } from '../../models';
3
+ import { CountryPhoneProps } from './country-phone.model';
4
+ import './input-phone.css';
3
5
  export declare const PhoneCountryCodes: string[];
4
6
  export type PhoneCountryCode = (typeof PhoneCountryCodes)[number];
5
7
  export declare const PhoneCountryISOs: string[];
6
8
  export type PhoneCountryISO = (typeof PhoneCountryISOs)[number];
7
- import { CountryPhoneProps } from './country-phone.model';
8
- import './input-phone.css';
9
9
  export interface InputPhoneElement extends HTMLInputElement {
10
10
  iso: PhoneCountryISO;
11
11
  code: PhoneCountryCode;
@@ -87,6 +87,10 @@ export interface InputPhoneProps extends ComponentProps<'input'> {
87
87
  * allow you to say what is the acronym to Direct Dialing In, the default is DDI
88
88
  */
89
89
  acronymForDirectDialing?: string;
90
+ /**
91
+ * Use the given custom countries list instead of the default one (must be in the correct format).
92
+ */
93
+ customCountriesList?: CountryPhoneProps[];
90
94
  }
91
95
  declare const InputPhone: FC<InputPhoneProps>;
92
96
  export { InputPhone };
@@ -3,5 +3,6 @@ export interface SkipNavigationSingleProps extends ComponentProps<'div'> {
3
3
  className: string | undefined;
4
4
  containerSkipNavRef: RefObject<HTMLDivElement>;
5
5
  singleLink: ReactElement;
6
+ targetRef?: RefObject<HTMLElement>;
6
7
  }
7
8
  export declare const SkipNavigationSingle: FC<SkipNavigationSingleProps>;
@@ -234,6 +234,9 @@ declare const AgoraTailwindConfig: {
234
234
  backdrop: string;
235
235
  mask: {
236
236
  image: string;
237
+ 'neutral-900': string;
238
+ 'primary-900': string;
239
+ 'secondary-900': string;
237
240
  };
238
241
  neutral: {
239
242
  50: string;
@@ -1,3 +1,2 @@
1
1
  export { useWindowSize } from './use-window-size';
2
2
  export { useBreakpointScreenValues } from './use-breakpoints-to-number';
3
- export { useClientOrServerEffect } from './use-client-or-server-effect';
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.3.1",
4
+ "version": "3.3.3",
5
5
  "main": "artifacts/dist/index.mjs",
6
6
  "module": "artifacts/dist/index.umd.js",
7
7
  "files": [
@@ -1,3 +0,0 @@
1
- import { useEffect } from 'react';
2
- declare const useClientOrServerEffect: typeof useEffect;
3
- export { useClientOrServerEffect };