@ama-pt/agora-design-system 2.2.1 → 2.2.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.
@@ -109,7 +109,7 @@
109
109
  }
110
110
 
111
111
  /*
112
- ! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com
112
+ ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
113
113
  */
114
114
 
115
115
  /*
@@ -2080,10 +2080,6 @@ input[type]::placeholder{
2080
2080
  border-bottom-width: 8px;
2081
2081
  }
2082
2082
 
2083
- .\!border-b-0{
2084
- border-bottom-width: 0 !important;
2085
- }
2086
-
2087
2083
  .border-b{
2088
2084
  border-bottom-width: 1px;
2089
2085
  }
@@ -2276,10 +2272,6 @@ input[type]::placeholder{
2276
2272
  border-style: none;
2277
2273
  }
2278
2274
 
2279
- .\!border-\[var\(--color-primary-600\)\]{
2280
- border-color: var(--color-primary-600) !important;
2281
- }
2282
-
2283
2275
  .\!border-transparent{
2284
2276
  border-color: transparent !important;
2285
2277
  }
@@ -7380,10 +7372,6 @@ input[type]::placeholder{
7380
7372
  padding-bottom: 96px;
7381
7373
  }
7382
7374
 
7383
- .pl-32{
7384
- padding-left: 32px;
7385
- }
7386
-
7387
7375
  .pl-8{
7388
7376
  padding-left: 8px;
7389
7377
  }
@@ -7687,6 +7675,10 @@ input[type]::placeholder{
7687
7675
  color: var(--color-primary-900);
7688
7676
  }
7689
7677
 
7678
+ .text-\[var\(--color-white\)\]{
7679
+ color: var(--color-white);
7680
+ }
7681
+
7690
7682
  .text-backdrop{
7691
7683
  color: rgba(43, 54, 60, 0.96);
7692
7684
  }
@@ -12615,10 +12607,6 @@ input[type]::placeholder{
12615
12607
  --tw-border-opacity: 0.95;
12616
12608
  }
12617
12609
 
12618
- .hover\:\!bg-transparent:hover{
12619
- background-color: transparent !important;
12620
- }
12621
-
12622
12610
  .hover\:bg-\[var\(--color-primary-100\)\]:hover{
12623
12611
  background-color: var(--color-primary-100);
12624
12612
  }
@@ -20974,10 +20962,6 @@ input[type]::placeholder{
20974
20962
  border-width: 0;
20975
20963
  }
20976
20964
 
20977
- .active\:\!bg-transparent:active{
20978
- background-color: transparent !important;
20979
- }
20980
-
20981
20965
  .active\:bg-\[var\(--color-neutral-200\)\]:active{
20982
20966
  background-color: var(--color-neutral-200);
20983
20967
  }
@@ -0,0 +1,80 @@
1
+ import React, { ComponentPropsWithRef, ReactNode, Ref, SyntheticEvent } from 'react';
2
+ import { BooleanProp, HeadingLevel } from '../../../../models';
3
+ import './card-accordion.scss';
4
+ /**
5
+ * The available variants of the accordion. Those variants will define the style of the accordion.
6
+ */
7
+ export type CardAccordionVariant = 'white' | 'primary-light' | 'primary-dark';
8
+ export interface CardAccordionElement extends HTMLDivElement {
9
+ /**
10
+ * Expand the accordion.
11
+ */
12
+ expand: () => void;
13
+ /**
14
+ * Collapse the accordion.
15
+ */
16
+ collapse: () => void;
17
+ /**
18
+ * Toggles the content of the accordion.
19
+ */
20
+ toggle: () => void;
21
+ /**
22
+ * Current value of the expanded state of the accordion.
23
+ */
24
+ isExpanded: boolean;
25
+ }
26
+ export interface CardAccordionProps extends ComponentPropsWithRef<'div'> {
27
+ /**
28
+ * The variant of the accordion. Those variants will define the style of the accordion.
29
+ */
30
+ variant?: CardAccordionVariant;
31
+ /**
32
+ * Accordion header title.
33
+ */
34
+ headingTitle?: ReactNode;
35
+ /**
36
+ * Accordion heading level title.
37
+ */
38
+ headingLevel?: HeadingLevel;
39
+ /**
40
+ * Accordion content.
41
+ */
42
+ children?: ReactNode;
43
+ /**
44
+ * Defines if an icon is shown previously of title.
45
+ */
46
+ hasIcon?: BooleanProp;
47
+ /**
48
+ * Defines the name of the leading icon to use.
49
+ */
50
+ leadingIcon?: string;
51
+ /**
52
+ * Defines the name of the leading icon to be displayed on mouse hover. If none specified, it will the appropriate variant of the icon.
53
+ */
54
+ leadingIconHover?: string;
55
+ /**
56
+ * Event function called whenever the accordion expands.
57
+ */
58
+ onExpanded?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
59
+ /**
60
+ * Event function called whenever the accordion collapses.
61
+ */
62
+ onCollapsed?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
63
+ /**
64
+ * Event function called whenever the accordion expands or collapses.
65
+ */
66
+ onChange?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
67
+ /**
68
+ * Initial value for the expanded value.
69
+ */
70
+ defaultExpanded?: BooleanProp;
71
+ /**
72
+ * Value for the expanded value.
73
+ */
74
+ expanded?: BooleanProp;
75
+ /**
76
+ * React ref object to the accordion.
77
+ */
78
+ ref?: Ref<CardAccordionElement>;
79
+ }
80
+ export declare const CardAccordion: React.ForwardRefExoticComponent<Omit<CardAccordionProps, "ref"> & React.RefAttributes<CardAccordionElement>>;
@@ -0,0 +1,2 @@
1
+ export { CardAccordion } from './card-accordion';
2
+ export type { CardAccordionProps, CardAccordionElement } from './card-accordion';
@@ -1,23 +1,82 @@
1
- import { AccordionProps } from '../../../components/accordion';
2
1
  import { BooleanProp, HeadingLevel } from '../../../models';
3
- import { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';
2
+ import React, { ComponentPropsWithoutRef, ForwardRefRenderFunction, ReactNode, Ref, SyntheticEvent } from 'react';
4
3
  import './card-expandable.scss';
4
+ import { CardAccordionElement } from './card-accordion';
5
+ /**
6
+ * The available variants of the card. Those variants will define the style of the card.
7
+ */
8
+ export type CardExpandableVariant = 'white' | 'primary-light' | 'primary-dark';
9
+ export interface CardExpandableElement extends CardAccordionElement {
10
+ }
5
11
  export interface CardExpandableProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
12
+ /**
13
+ * The variant of the card. Those variants will define the style of the card.
14
+ */
15
+ variant?: CardExpandableVariant;
6
16
  /**
7
17
  * Heading level to apply in the card.
8
18
  */
9
- headingLevel: HeadingLevel;
19
+ cardHeadingLevel: HeadingLevel;
10
20
  /**
11
21
  * Card title.
12
22
  */
13
- title?: ReactNode;
23
+ cardTitle: ReactNode;
24
+ /**
25
+ * Card subtitle.
26
+ */
27
+ cardSubtitle?: ReactNode;
14
28
  /**
15
29
  * Card icon.
16
30
  */
17
31
  showBookmarkIcon?: BooleanProp;
32
+ /**
33
+ * Defines if an icon is shown previously of title.
34
+ */
35
+ hasIcon?: BooleanProp;
36
+ /**
37
+ * Defines the name of the leading icon to use.
38
+ */
39
+ leadingIcon?: string;
40
+ /**
41
+ * Defines the name of the leading icon to be displayed on mouse hover. If none specified, it will the appropriate variant of the icon.
42
+ */
43
+ leadingIconHover?: string;
18
44
  /**
19
45
  * Children content.
20
46
  */
21
- children: ReactElement<AccordionProps>;
47
+ children: ReactNode;
48
+ /**
49
+ * CardAccordion heading level title.
50
+ */
51
+ accordionHeadingLevel: HeadingLevel;
52
+ /**
53
+ * CardAccordion header title.
54
+ */
55
+ accordionHeadingTitle: ReactNode;
56
+ /**
57
+ * Value for the expanded value.
58
+ */
59
+ expanded?: BooleanProp;
60
+ /**
61
+ * Initial value for the expanded value.
62
+ */
63
+ defaultExpanded?: BooleanProp;
64
+ /**
65
+ * Event function called whenever the accordion expands.
66
+ */
67
+ onExpanded?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
68
+ /**
69
+ * Event function called whenever the accordion collapses.
70
+ */
71
+ onCollapsed?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
72
+ /**
73
+ * Event function called whenever the accordion expands or collapses.
74
+ */
75
+ onChange?: (evt: SyntheticEvent<CardAccordionElement | undefined>) => void | undefined;
76
+ /**
77
+ * React ref object to the accordion.
78
+ */
79
+ ref?: Ref<CardAccordionElement>;
22
80
  }
23
- export declare const CardExpandable: FC<CardExpandableProps>;
81
+ export declare const InnerComponent: ForwardRefRenderFunction<CardExpandableElement, CardExpandableProps>;
82
+ export declare const CardExpandable: React.ForwardRefExoticComponent<Omit<CardExpandableProps, "ref"> & React.RefAttributes<CardExpandableElement>>;
@@ -1,2 +1,2 @@
1
1
  export { CardExpandable } from './card-expandable';
2
- export type { CardExpandableProps } from './card-expandable';
2
+ export type { CardExpandableProps, CardExpandableElement } from './card-expandable';
@@ -53,6 +53,10 @@ export interface InputSelectProps extends Omit<ComponentPropsWithRef<'select'>,
53
53
  * Name of the icon leading icon to be displayed.
54
54
  */
55
55
  icon?: string;
56
+ /**
57
+ * Pill label to be draw if specified.
58
+ */
59
+ pillLabel?: ReactNode;
56
60
  /**
57
61
  * Alternative text for the dropdown that will be rendered.
58
62
  */
@@ -2,6 +2,10 @@ import React, { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import './input-time.scss';
3
3
  import { BooleanProp, FeedbackState } from '../../models';
4
4
  export interface InputTimeProps extends ComponentPropsWithRef<'input'> {
5
+ /**
6
+ * The flag to set if the label and feedback text is in dark mode or light mode.
7
+ */
8
+ darkMode?: BooleanProp;
5
9
  /**
6
10
  * Input label text.
7
11
  */
@@ -1,8 +1,7 @@
1
+ import { TabBodyProps, TabHeaderProps } from '../../../components/tabs';
2
+ import { BooleanProp } from '../../../models';
1
3
  import React, { FC, ReactElement } from 'react';
2
- import { TabHeaderProps } from '../../../components/tabs';
3
- import { TabBodyProps } from '../../../components/tabs';
4
4
  import './panel-switcher-mobile.scss';
5
- import { BooleanProp } from '../../../models';
6
5
  export interface PanelSwitcherMobileProps {
7
6
  modalCloseButtonLabel: string;
8
7
  leadingIcon?: string;
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": "2.2.1",
4
+ "version": "2.2.3",
5
5
  "main": "artifacts/dist/index.mjs",
6
6
  "module": "artifacts/dist/index.umd.js",
7
7
  "files": [
@@ -9,15 +9,16 @@
9
9
  ],
10
10
  "types": "artifacts/dist/types/index.d.ts",
11
11
  "scripts": {
12
- "start": "yarn run storybook",
13
- "dev": "yarn run storybook",
12
+ "start": "npm run storybook",
13
+ "dev": "npm run storybook",
14
14
  "storybook": "gulp && storybook dev -p 6006",
15
15
  "build-storybook": "gulp && storybook build -o ./artifacts/storybook-static",
16
16
  "lint": "eslint src --ext .ts,.tsx",
17
17
  "lint:fix": "eslint src --fix --ext .ts,.tsx",
18
18
  "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,scss,mdx,md,json}\" --config \"./.prettierrc\"",
19
- "playwright-tests": "yarn playwright install && yarn run playwright test",
20
- "jest-tests": "yarn run jest --coverage",
19
+ "playwright-tests": "npm install playwright && playwright install && playwright test",
20
+ "jest-tests": "jest --coverage",
21
+ "jest-tests-no-coverage": "jest --coverage=false",
21
22
  "build": "vite build && tailwindcss -i ./src/styles/globals.css -o ./artifacts/dist/tailwind.css && gulp bundle && tsc --project tsconfig-build.json && tsc-alias -p tsconfig-build.json"
22
23
  },
23
24
  "dependencies": {
@@ -85,7 +86,7 @@
85
86
  "jest-environment-jsdom": "^29.7.0",
86
87
  "jest-preview": "^0.3.1",
87
88
  "jest-sonar-reporter": "^2.0.0",
88
- "playwright": "^1.40.0",
89
+ "playwright": "^1.51.1",
89
90
  "postcss": "^8.4.35",
90
91
  "prettier": "^3.0.2",
91
92
  "react": "^18.2.0",