@ama-pt/agora-design-system 3.2.0 → 3.3.1

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 (25) hide show
  1. package/artifacts/dist/index.mjs +4687 -4456
  2. package/artifacts/dist/index.mjs.map +1 -1
  3. package/artifacts/dist/index.umd.js +2 -2
  4. package/artifacts/dist/index.umd.js.map +1 -1
  5. package/artifacts/dist/style.css +1 -1
  6. package/artifacts/dist/tailwind.css +61 -11
  7. package/artifacts/dist/types/components/anchor/anchor.d.ts +8 -0
  8. package/artifacts/dist/types/components/cards/card-action/{card-action-styles.d.ts → card-action-variants.d.ts} +4 -4
  9. package/artifacts/dist/types/components/cards/card-action/card-action.d.ts +9 -5
  10. package/artifacts/dist/types/components/cards/card-collection/card-collection.d.ts +1 -1
  11. package/artifacts/dist/types/components/cards/card-expandable/card-expandable.d.ts +2 -2
  12. package/artifacts/dist/types/components/cards/card-frame/card-frame.d.ts +14 -5
  13. package/artifacts/dist/types/components/cards/card-frame/index.d.ts +1 -1
  14. package/artifacts/dist/types/components/cards/card-links/card-links.d.ts +5 -1
  15. package/artifacts/dist/types/components/cards/index.d.ts +1 -0
  16. package/artifacts/dist/types/components/cards/shared/use-blocked-link-v2.d.ts +9 -0
  17. package/artifacts/dist/types/components/dropdown/dropdown.d.ts +9 -0
  18. package/artifacts/dist/types/components/dropdown/internals/internal-dropdown-context.d.ts +1 -0
  19. package/artifacts/dist/types/components/header/header.d.ts +1 -1
  20. package/artifacts/dist/types/components/input-date/input-date.d.ts +3 -1
  21. package/artifacts/dist/types/components/pill/pill.d.ts +1 -1
  22. package/artifacts/dist/types/components/toggle-group/toggle-group.d.ts +1 -1
  23. package/artifacts/dist/types/hooks/index.d.ts +1 -0
  24. package/artifacts/dist/types/hooks/use-client-or-server-effect.d.ts +3 -0
  25. package/package.json +1 -1
@@ -897,6 +897,10 @@ input[type]::placeholder{
897
897
  grid-column: span 8 / span 8;
898
898
  }
899
899
 
900
+ .col-span-full{
901
+ grid-column: 1 / -1;
902
+ }
903
+
900
904
  .col-start-1{
901
905
  grid-column-start: 1;
902
906
  }
@@ -1321,6 +1325,11 @@ input[type]::placeholder{
1321
1325
  width: calc(100% + 64px);
1322
1326
  }
1323
1327
 
1328
+ .w-fit{
1329
+ width: -moz-fit-content;
1330
+ width: fit-content;
1331
+ }
1332
+
1324
1333
  .w-full{
1325
1334
  width: 100%;
1326
1335
  }
@@ -1358,10 +1367,6 @@ input[type]::placeholder{
1358
1367
  max-width: 280px;
1359
1368
  }
1360
1369
 
1361
- .max-w-\[384px\]{
1362
- max-width: 384px;
1363
- }
1364
-
1365
1370
  .max-w-full{
1366
1371
  max-width: 100%;
1367
1372
  }
@@ -1783,10 +1788,6 @@ input[type]::placeholder{
1783
1788
  grid-template-rows: repeat(7, minmax(0, 1fr));
1784
1789
  }
1785
1790
 
1786
- .grid-rows-8{
1787
- grid-template-rows: repeat(8, minmax(0, 1fr));
1788
- }
1789
-
1790
1791
  .flex-row{
1791
1792
  flex-direction: row;
1792
1793
  }
@@ -1851,6 +1852,10 @@ input[type]::placeholder{
1851
1852
  gap: 32px;
1852
1853
  }
1853
1854
 
1855
+ .gap-48{
1856
+ gap: 48px;
1857
+ }
1858
+
1854
1859
  .gap-64{
1855
1860
  gap: 64px;
1856
1861
  }
@@ -5955,6 +5960,10 @@ input[type]::placeholder{
5955
5960
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;
5956
5961
  }
5957
5962
 
5963
+ .bg-\[--color-primary-900\]{
5964
+ background-color: var(--color-primary-900);
5965
+ }
5966
+
5958
5967
  .bg-\[var\(--color-backdrop\)\]{
5959
5968
  background-color: var(--color-backdrop);
5960
5969
  }
@@ -27724,9 +27733,9 @@ input[type]::placeholder{
27724
27733
  grid-column-end: 8;
27725
27734
  }
27726
27735
 
27727
- .md\:mx-auto{
27728
- margin-left: auto;
27729
- margin-right: auto;
27736
+ .md\:mx-64{
27737
+ margin-left: 64px;
27738
+ margin-right: 64px;
27730
27739
  }
27731
27740
 
27732
27741
  .md\:my-0{
@@ -27812,6 +27821,10 @@ input[type]::placeholder{
27812
27821
  display: block;
27813
27822
  }
27814
27823
 
27824
+ .md\:flex{
27825
+ display: flex;
27826
+ }
27827
+
27815
27828
  .md\:hidden{
27816
27829
  display: none;
27817
27830
  }
@@ -34281,6 +34294,20 @@ input[type]::placeholder{
34281
34294
  .md\:bg-blend-luminosity{
34282
34295
  background-blend-mode: luminosity;
34283
34296
  }
34297
+
34298
+ @media not all and (min-width: 1280px){
34299
+ .md\:max-xl\:col-span-8{
34300
+ grid-column: span 8 / span 8;
34301
+ }
34302
+
34303
+ .md\:max-xl\:col-span-full{
34304
+ grid-column: 1 / -1;
34305
+ }
34306
+
34307
+ .md\:max-xl\:p-64{
34308
+ padding: 64px;
34309
+ }
34310
+ }
34284
34311
  }
34285
34312
 
34286
34313
  @media (min-width: 1280px){
@@ -34468,6 +34495,10 @@ input[type]::placeholder{
34468
34495
  height: calc(100% - 2px);
34469
34496
  }
34470
34497
 
34498
+ .xl\:h-screen{
34499
+ height: 100vh;
34500
+ }
34501
+
34471
34502
  .xl\:w-\[1120px\]{
34472
34503
  width: 1120px;
34473
34504
  }
@@ -34857,6 +34888,10 @@ input[type]::placeholder{
34857
34888
  flex-direction: row;
34858
34889
  }
34859
34890
 
34891
+ .xl\:items-center{
34892
+ align-items: center;
34893
+ }
34894
+
34860
34895
  .xl\:justify-start{
34861
34896
  justify-content: flex-start;
34862
34897
  }
@@ -40076,11 +40111,26 @@ input[type]::placeholder{
40076
40111
  padding-right: 0px;
40077
40112
  }
40078
40113
 
40114
+ .xl\:px-\[112px\]{
40115
+ padding-left: 112px;
40116
+ padding-right: 112px;
40117
+ }
40118
+
40119
+ .xl\:py-0{
40120
+ padding-top: 0px;
40121
+ padding-bottom: 0px;
40122
+ }
40123
+
40079
40124
  .xl\:py-128{
40080
40125
  padding-top: 128px;
40081
40126
  padding-bottom: 128px;
40082
40127
  }
40083
40128
 
40129
+ .xl\:py-16{
40130
+ padding-top: 16px;
40131
+ padding-bottom: 16px;
40132
+ }
40133
+
40084
40134
  .xl\:py-64{
40085
40135
  padding-top: 64px;
40086
40136
  padding-bottom: 64px;
@@ -42,6 +42,10 @@ export interface AnchorProps extends ComponentProps<'a'> {
42
42
  * Defines the name of the leading icon to be displayed on mouse hover. If none specified, it will the appropriate variant of the icon.
43
43
  */
44
44
  leadingIconHover?: string;
45
+ /**
46
+ * Defines the name of the leading icon to be displayed when the anchor is active. If none specified, it will the appropriate variant of the icon.
47
+ */
48
+ leadingIconActive?: string;
45
49
  /**
46
50
  * Defines the name of the trailing icon to use.
47
51
  */
@@ -50,6 +54,10 @@ export interface AnchorProps extends ComponentProps<'a'> {
50
54
  * Defines the name of the trailing icon to be displayed on mouse hover. If none specified, it will the appropriate variant of the icon.
51
55
  */
52
56
  trailingIconHover?: string;
57
+ /**
58
+ * Defines the name of the trailing icon to be displayed when the anchor is active. If none specified, it will the appropriate variant of the icon.
59
+ */
60
+ trailingIconActive?: string;
53
61
  /**
54
62
  * Children content.
55
63
  */
@@ -1,6 +1,6 @@
1
- import { CardActionStyles } from './card-action';
1
+ import { CardActionVariants } from './card-action';
2
2
  import { ButtonVariant } from '../../button/button';
3
- type CardActionStylesBody = {
3
+ type CardActionVariantsBody = {
4
4
  backgroundColor: string;
5
5
  textColor?: string;
6
6
  titleColor?: string;
@@ -10,6 +10,6 @@ type CardActionStylesBody = {
10
10
  buttonDarkMode?: boolean;
11
11
  iconColor?: string;
12
12
  };
13
- export type CardActionStylesMap = Record<CardActionStyles, CardActionStylesBody>;
14
- export declare const cardActionStylesMap: CardActionStylesMap;
13
+ export type CardActionVariantsMap = Record<CardActionVariants, CardActionVariantsBody>;
14
+ export declare const cardActionVariantsMap: CardActionVariantsMap;
15
15
  export {};
@@ -3,21 +3,21 @@ import { ButtonProps } from '../../../components/button';
3
3
  import { IconProps } from '../../../components/icon';
4
4
  import './card-action.css';
5
5
  import { BooleanProp } from '../../../models';
6
- export type CardActionStyles = 'white' | 'neutral-100' | 'primary-100' | 'secondary-100' | 'primary-300' | 'secondary-300' | 'primary-500' | 'primary-700' | 'primary-900' | 'white-line' | 'primary-900-line';
6
+ export type CardActionVariants = 'white' | 'neutral-100' | 'primary-100' | 'secondary-100' | 'primary-300' | 'secondary-300' | 'primary-500' | 'primary-700' | 'primary-900' | 'white-line' | 'primary-900-line';
7
7
  export type CardActionAlignment = 'left' | 'center' | 'right';
8
8
  export interface CardActionProps {
9
9
  /**
10
10
  * title of card
11
11
  */
12
- title: string;
12
+ titleText: string;
13
13
  /**
14
14
  * text to show within the card
15
15
  */
16
- text: string;
16
+ descriptionText: string;
17
17
  /**
18
- * style of card action
18
+ * variant of card action
19
19
  */
20
- variant?: CardActionStyles;
20
+ variant?: CardActionVariants;
21
21
  /**
22
22
  * it allow you align title, text and button
23
23
  */
@@ -38,5 +38,9 @@ export interface CardActionProps {
38
38
  * props for the button component
39
39
  */
40
40
  button: ButtonProps;
41
+ /**
42
+ * turn button full width
43
+ */
44
+ buttonFullWidth?: BooleanProp;
41
45
  }
42
46
  export declare const CardAction: FC<CardActionProps>;
@@ -6,7 +6,7 @@ export interface CardCollectionProps extends Omit<ComponentPropsWithoutRef<'div'
6
6
  /**
7
7
  * Card Collection heading level title.
8
8
  */
9
- headingLevel: HeadingLevel;
9
+ headingLevel?: HeadingLevel;
10
10
  /**
11
11
  * Defines the subtitle
12
12
  */
@@ -16,7 +16,7 @@ export interface CardExpandableProps extends Omit<ComponentProps<'div'>, 'title'
16
16
  /**
17
17
  * Heading level to apply in the card.
18
18
  */
19
- cardHeadingLevel: HeadingLevel;
19
+ cardHeadingLevel?: HeadingLevel;
20
20
  /**
21
21
  * Card title.
22
22
  */
@@ -48,7 +48,7 @@ export interface CardExpandableProps extends Omit<ComponentProps<'div'>, 'title'
48
48
  /**
49
49
  * CardAccordion heading level title.
50
50
  */
51
- accordionHeadingLevel: HeadingLevel;
51
+ accordionHeadingLevel?: HeadingLevel;
52
52
  /**
53
53
  * CardAccordion header title.
54
54
  */
@@ -1,7 +1,8 @@
1
- import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
2
- import { BooleanProp, HeadingLevel } from '../../../models';
3
1
  import { AnchorProps } from '../../../components/anchor';
2
+ import { BooleanProp, HeadingLevel } from '../../../models';
3
+ import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
4
4
  import './card-frame.css';
5
+ export type CardFrameLinkPosition = 'bottom' | 'right';
5
6
  export interface CardFrameProps extends ComponentPropsWithoutRef<'div'> {
6
7
  /**
7
8
  * Children content.
@@ -10,18 +11,26 @@ export interface CardFrameProps extends ComponentPropsWithoutRef<'div'> {
10
11
  /**
11
12
  * Heading level to apply in the card.
12
13
  */
13
- headingLevel: HeadingLevel;
14
+ headingLevel?: HeadingLevel;
14
15
  /**
15
16
  * Label header.
16
17
  */
17
18
  label: ReactNode;
18
19
  /**
19
- * Definition of the anchor to be draw if specified.
20
+ * Definition of the AgoraDS anchor to be draw if specified.
20
21
  */
21
22
  mainAnchor?: AnchorProps;
22
23
  /**
23
- * Makes the whole card clickable and activates the link.
24
+ * 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.
25
+ */
26
+ mainLink?: ReactNode;
27
+ /**
28
+ * Makes the whole card clickable. When card is clicked the mainAnchor or mainLink will activate.
24
29
  */
25
30
  blockedLink?: BooleanProp;
31
+ /**
32
+ * Positions the link bellow or on the right side of the card.
33
+ */
34
+ linkPosition?: CardFrameLinkPosition;
26
35
  }
27
36
  export declare const CardFrame: FC<CardFrameProps>;
@@ -1,2 +1,2 @@
1
1
  export { CardFrame } from './card-frame';
2
- export type { CardFrameProps } from './card-frame';
2
+ export type { CardFrameProps, CardFrameLinkPosition } from './card-frame';
@@ -27,7 +27,7 @@ export interface CardLinksProps extends Omit<ComponentProps<'div'>, 'title'> {
27
27
  /**
28
28
  * The title of the card.
29
29
  */
30
- title: ReactNode;
30
+ title?: ReactNode;
31
31
  /**
32
32
  * The description of the card.
33
33
  */
@@ -40,6 +40,10 @@ export interface CardLinksProps extends Omit<ComponentProps<'div'>, 'title'> {
40
40
  * Anchor props to render in heading.
41
41
  */
42
42
  mainAnchor?: AnchorProps;
43
+ /**
44
+ * 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.
45
+ */
46
+ mainLink?: ReactNode;
43
47
  /**
44
48
  * The list of links of the card.
45
49
  */
@@ -15,3 +15,4 @@ export * from './card-links';
15
15
  export * from './card-no-results';
16
16
  export * from './card-single';
17
17
  export * from './card-topic';
18
+ export * from './card-action';
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ export interface IUseBlockedLink {
3
+ parentCardRef: RefObject<HTMLDivElement | null>;
4
+ anchorRef: RefObject<HTMLAnchorElement | null>;
5
+ mainLinkRef?: RefObject<HTMLSpanElement | null>;
6
+ blockedLink?: boolean;
7
+ }
8
+ declare const useBlockedLinkV2: ({ parentCardRef, anchorRef, mainLinkRef, blockedLink }: IUseBlockedLink) => void;
9
+ export { useBlockedLinkV2 };
@@ -3,12 +3,16 @@ import { ComponentProps, FC, ReactElement, ReactNode } from 'react';
3
3
  import { DropdownOptionProps } from './dropdown-option';
4
4
  import { DropdownSectionProps } from './dropdown-section';
5
5
  import { DropdownType } from './dropdown-type';
6
+ import { InternalDropdownContextProps } from './internals/internal-dropdown-context';
6
7
  export interface DropdownElement extends HTMLDivElement {
7
8
  visibility: boolean;
8
9
  show: () => void;
9
10
  hide: () => void;
10
11
  first: () => void;
11
12
  last: () => void;
13
+ selectedOptions: DropdownOptionProps[];
14
+ applyFilter: (filter: string) => void;
15
+ resetFilter: () => void;
12
16
  }
13
17
  export interface DropdownProps extends Omit<ComponentProps<'div'>, 'onChange'> {
14
18
  /**
@@ -67,6 +71,11 @@ export interface DropdownProps extends Omit<ComponentProps<'div'>, 'onChange'> {
67
71
  * Text to display in the "select all options across all sections" option.
68
72
  */
69
73
  selectAllLabel?: string;
74
+ /**
75
+ * Controls the visibility of the dropdown. If not provided, the component will manage its own state.
76
+ */
77
+ showDropdown?: boolean;
70
78
  }
79
+ export declare const showDropdownHandler: (showDropdown: boolean | undefined, dropdownState: InternalDropdownContextProps) => void;
71
80
  declare const Dropdown: FC<DropdownProps>;
72
81
  export { Dropdown };
@@ -5,6 +5,7 @@ export interface InternalDropdownContextProps {
5
5
  type: DropdownType;
6
6
  sections: InternalDropdownSectionProps[];
7
7
  options: InternalDropdownOptionProps[];
8
+ selectedOptions: InternalDropdownOptionProps[];
8
9
  visibility?: boolean;
9
10
  show: () => void;
10
11
  hide: () => void;
@@ -22,7 +22,7 @@ export interface HeaderElement extends ComponentProps<'div'> {
22
22
  closeAll: () => void;
23
23
  }
24
24
  export interface HeaderProps {
25
- ref: Ref<HeaderElement>;
25
+ ref?: Ref<HeaderElement>;
26
26
  darkMode?: BooleanProp;
27
27
  maxNavigationItems?: number;
28
28
  children?: ReactElement<BrandProps | GeneralBarProps> | ReactElement<BrandProps | GeneralBarProps>[];
@@ -1,6 +1,7 @@
1
- import { ComponentProps, FC, ReactNode } from 'react';
1
+ import React, { ComponentProps, Dispatch, FC, ReactNode } from 'react';
2
2
  import { BooleanProp, FeedbackState, Months, WeekDays } from '../../models';
3
3
  import './input-date.css';
4
+ import { IconSetState } from '../../components/shared/icon-set/icon-set';
4
5
  export interface InputDateProps extends ComponentProps<'input'> {
5
6
  /**
6
7
  * Input label text.
@@ -131,5 +132,6 @@ export interface InputDateProps extends ComponentProps<'input'> {
131
132
  */
132
133
  okAriaLabel?: string;
133
134
  }
135
+ export declare const callbackWith: (setInputWrapperHovered: Dispatch<React.SetStateAction<IconSetState>>, value: IconSetState) => () => void;
134
136
  declare const InputDate: FC<InputDateProps>;
135
137
  export { InputDate };
@@ -4,7 +4,7 @@ import './pill.css';
4
4
  /**
5
5
  * The available variants of the pill. This variants will define the background and border color of the pill.
6
6
  */
7
- export type PillVariant = 'primary' | 'secondary' | 'secondary-light' | 'neutral' | 'informative' | 'success' | 'warning' | 'danger';
7
+ export type PillVariant = 'primary' | 'secondary' | 'neutral' | 'informative' | 'success' | 'warning' | 'danger';
8
8
  /**
9
9
  * The available pill appearances. Defines the pill shape.
10
10
  */
@@ -55,6 +55,6 @@ export interface ToggleGroupProps extends Omit<ComponentProps<'div'>, 'onChange'
55
55
  */
56
56
  ref?: Ref<ToggleGroupElement>;
57
57
  }
58
- export declare const useHandlerOrientationChange: (orientation: ToggleGroupOrientation, innerRef: React.RefObject<HTMLDivElement | null>, orientationState: ToggleGroupOrientation, setOrientationState: React.Dispatch<React.SetStateAction<ToggleGroupOrientation>>, componentWidth: number, setComponentWidth: React.Dispatch<React.SetStateAction<number>>) => void;
58
+ export declare const useHandlerOrientationChange: (ignoreHandlerOrientation: boolean, innerRef: React.RefObject<HTMLDivElement | null>, orientationState: ToggleGroupOrientation, setOrientationState: React.Dispatch<React.SetStateAction<ToggleGroupOrientation>>, componentWidth: number, setComponentWidth: React.Dispatch<React.SetStateAction<number>>) => void;
59
59
  declare const ToggleGroup: FC<ToggleGroupProps>;
60
60
  export { ToggleGroup };
@@ -1,2 +1,3 @@
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';
@@ -0,0 +1,3 @@
1
+ import { useEffect } from 'react';
2
+ declare const useClientOrServerEffect: typeof useEffect;
3
+ export { useClientOrServerEffect };
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.2.0",
4
+ "version": "3.3.1",
5
5
  "main": "artifacts/dist/index.mjs",
6
6
  "module": "artifacts/dist/index.umd.js",
7
7
  "files": [