@ama-pt/agora-design-system 0.8.1 → 0.9.0

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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ComponentPropsWithRef, ReactNode, FC, SVGProps, HTMLProps, ComponentPropsWithoutRef, ReactElement, HtmlHTMLAttributes, ForwardRefRenderFunction, ChangeEvent, RefObject, HTMLAttributes, TdHTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes } from 'react';
2
+ import React__default, { ComponentPropsWithRef, ReactNode, FC, SVGProps, HTMLProps, ComponentPropsWithoutRef, ReactElement, HtmlHTMLAttributes, ForwardRefRenderFunction, ChangeEvent, RefObject, ImgHTMLAttributes, HTMLAttributes, TdHTMLAttributes, AnchorHTMLAttributes } from 'react';
3
3
 
4
4
  type BooleanProp = boolean | 'true' | 'false';
5
5
 
@@ -1548,6 +1548,66 @@ interface SearchPaginationProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'o
1548
1548
  }
1549
1549
  declare const SearchPagination: React__default.ForwardRefExoticComponent<SearchPaginationProps & React__default.RefAttributes<HTMLDivElement>>;
1550
1550
 
1551
+ interface CardArticleProps extends ComponentPropsWithoutRef<'div'> {
1552
+ /**
1553
+ * variant.
1554
+ */
1555
+ variant: 'default' | 'indented';
1556
+ /**
1557
+ * Children content.
1558
+ */
1559
+ children: ReactNode;
1560
+ /**
1561
+ * Makes the whole card clickable.
1562
+ */
1563
+ blockedLink?: BooleanProp;
1564
+ /**
1565
+ * Anchor disabled.
1566
+ */
1567
+ hasAnchor?: BooleanProp;
1568
+ /**
1569
+ * label Anchor.
1570
+ */
1571
+ labelAnchor?: ReactNode;
1572
+ /**
1573
+ * Image Card.
1574
+ */
1575
+ image: ImgHTMLAttributes<HTMLImageElement>;
1576
+ /**
1577
+ * variant Pill.
1578
+ */
1579
+ variantPill: PillVariant;
1580
+ /**
1581
+ * label Pill.
1582
+ */
1583
+ labelPill?: string;
1584
+ /**
1585
+ * aria label Anchor.
1586
+ */
1587
+ ariaLabelAnchor?: string;
1588
+ /**
1589
+ * Title Tag Card.
1590
+ */
1591
+ titleTag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1592
+ /**
1593
+ * Title card.
1594
+ */
1595
+ title: string;
1596
+ /**
1597
+ * Subtitle card.
1598
+ */
1599
+ subTitle: string;
1600
+ /**
1601
+ * anchor Href.
1602
+ */
1603
+ anchorHref?: string;
1604
+ /**
1605
+ * anchor Target.
1606
+ */
1607
+ anchorTarget?: string;
1608
+ }
1609
+ declare const CardArticle: FC<CardArticleProps>;
1610
+
1551
1611
  /**
1552
1612
  * The available variants of the card emphasize
1553
1613
  */
@@ -1648,6 +1708,34 @@ interface CardFrameProps extends ComponentPropsWithoutRef<'div'> {
1648
1708
  }
1649
1709
  declare const CardFrame: FC<CardFrameProps>;
1650
1710
 
1711
+ interface DescriptionBlocksProps {
1712
+ children: ReactNode;
1713
+ anchorDefault: AnchorProps;
1714
+ }
1715
+ interface CardHeroHelperProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
1716
+ /**
1717
+ * header title.
1718
+ */
1719
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1720
+ /**
1721
+ * The title of the card
1722
+ */
1723
+ title?: ReactNode;
1724
+ /**
1725
+ * The subTitle of the card
1726
+ */
1727
+ subTitle?: ReactNode;
1728
+ /**
1729
+ * If the card has a subTitle section
1730
+ */
1731
+ hasSubTitle?: boolean;
1732
+ /**
1733
+ * The list of links of the card
1734
+ */
1735
+ descriptionBlocks: DescriptionBlocksProps[];
1736
+ }
1737
+ declare const CardHeroHelper: FC<CardHeroHelperProps>;
1738
+
1651
1739
  interface CardHeroIndexProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {
1652
1740
  /**
1653
1741
  * The title of the card
@@ -1664,6 +1752,78 @@ interface CardHeroIndexProps extends Omit<ComponentPropsWithRef<'div'>, 'title'>
1664
1752
  }
1665
1753
  declare const CardHeroIndex: FC<CardHeroIndexProps>;
1666
1754
 
1755
+ interface CardHeroSitemapProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
1756
+ /**
1757
+ * header title.
1758
+ */
1759
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1760
+ /**
1761
+ * The title of the card
1762
+ */
1763
+ title?: ReactNode;
1764
+ /**
1765
+ * The description of the card
1766
+ */
1767
+ description?: ReactNode;
1768
+ /**
1769
+ * If the card has a description section
1770
+ */
1771
+ hasDescription?: boolean;
1772
+ /**
1773
+ * The list of links of the card
1774
+ */
1775
+ listLinks: AnchorProps[];
1776
+ /**
1777
+ * Object anchor default
1778
+ */
1779
+ anchorDefault: AnchorProps;
1780
+ }
1781
+ declare const CardHeroSitemap: FC<CardHeroSitemapProps>;
1782
+
1783
+ interface CardHighlightProps extends ComponentPropsWithoutRef<'div'> {
1784
+ /**
1785
+ * Defines the subtitle
1786
+ */
1787
+ subtitle?: string;
1788
+ /**
1789
+ * Defines the title
1790
+ */
1791
+ title?: string;
1792
+ /**
1793
+ * Defines the labelAnchor
1794
+ */
1795
+ labelAnchor?: ReactNode;
1796
+ /**
1797
+ * Defines the hasAnchor prop.
1798
+ */
1799
+ hasAnchor?: BooleanProp;
1800
+ /**
1801
+ * Defines blockedLink prop.
1802
+ */
1803
+ blockedLink?: BooleanProp;
1804
+ /**
1805
+ * Defines aria label Anchor.
1806
+ */
1807
+ ariaLabelAnchor?: string;
1808
+ /**
1809
+ * Defines anchor Href.
1810
+ */
1811
+ anchorHref?: string;
1812
+ /**
1813
+ * Defines anchor Target.
1814
+ */
1815
+ anchorTarget?: string;
1816
+ /**
1817
+ * Defines anchor Title.
1818
+ */
1819
+ anchorTitle?: string;
1820
+ /**
1821
+ * header Text.
1822
+ */
1823
+ headerTag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1824
+ }
1825
+ declare const CardHighlight: FC<CardHighlightProps>;
1826
+
1667
1827
  /**
1668
1828
  * The available variants of the card links
1669
1829
  */
@@ -2016,31 +2176,7 @@ interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
2016
2176
  }
2017
2177
  declare const TableBody: FC<TableBodyProps>;
2018
2178
 
2019
- interface TableProps extends ComponentPropsWithoutRef<'div'> {
2020
- /**
2021
- * Children content.
2022
- */
2023
- children: ReactElement<TableHeaderProps> | ReactElement<TableBodyProps> | Array<ReactElement<TableHeaderProps | TableBodyProps>>;
2024
- }
2025
- declare const Table: FC<TableProps>;
2026
-
2027
- interface TableHeaderCellProps extends HTMLAttributes<HTMLTableCellElement> {
2028
- children: ReactNode;
2029
- }
2030
- declare const TableHeaderCell: FC<TableHeaderCellProps>;
2031
-
2032
- interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement> {
2033
- children: ReactNode;
2034
- }
2035
- declare const TableFooter: FC<TableFooterProps>;
2036
-
2037
- interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
2038
- children: ReactNode;
2039
- headerLabel: ReactNode;
2040
- }
2041
- declare const TableCell: FC<TableCellProps>;
2042
-
2043
- interface TablePaginationProps extends ComponentPropsWithRef<'div'> {
2179
+ interface TablePaginationProps extends ComponentPropsWithRef<'table'> {
2044
2180
  /**
2045
2181
  * Defines the label for the items per page
2046
2182
  * */
@@ -2054,9 +2190,9 @@ interface TablePaginationProps extends ComponentPropsWithRef<'div'> {
2054
2190
  * */
2055
2191
  itemsPerPage: number;
2056
2192
  /**
2057
- * Total pages of the table
2193
+ * Total items of the table
2058
2194
  * */
2059
- totalPages: number;
2195
+ totalItems: number;
2060
2196
  /**
2061
2197
  * Array of values to be displayed in the dropdown
2062
2198
  * */
@@ -2085,9 +2221,56 @@ interface TablePaginationProps extends ComponentPropsWithRef<'div'> {
2085
2221
  * Callback to be called when the page changes
2086
2222
  * */
2087
2223
  onChangePage: (page: number) => void;
2224
+ /**
2225
+ * Callback to be called when the dropdown changes
2226
+ * */
2227
+ onDropdownChange?: (value: number) => void;
2088
2228
  }
2089
2229
  declare const TablePagination: React__default.ForwardRefExoticComponent<Omit<TablePaginationProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
2090
2230
 
2231
+ interface TableProps extends ComponentPropsWithoutRef<'div'> {
2232
+ /**
2233
+ * Children content.
2234
+ */
2235
+ children: ReactElement<TableHeaderProps> | ReactElement<TableBodyProps> | Array<ReactElement<TableHeaderProps | TableBodyProps>>;
2236
+ /**
2237
+ * Show pagination.
2238
+ */
2239
+ showPagination?: boolean;
2240
+ /**
2241
+ * Pagination props.
2242
+ */
2243
+ paginationProps?: TablePaginationProps;
2244
+ }
2245
+ declare const Table: FC<TableProps>;
2246
+
2247
+ interface TableHeaderCellProps extends HTMLAttributes<HTMLTableCellElement> {
2248
+ children: ReactNode;
2249
+ }
2250
+ declare const TableHeaderCell: FC<TableHeaderCellProps>;
2251
+
2252
+ interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement> {
2253
+ children: ReactNode;
2254
+ /**
2255
+ * Number of header cells.
2256
+ */
2257
+ numberOfHeaderCells: number;
2258
+ /**
2259
+ * Show pagination.
2260
+ */
2261
+ showPagination?: boolean;
2262
+ }
2263
+ declare const TableFooter: FC<TableFooterProps>;
2264
+
2265
+ interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
2266
+ children: ReactNode;
2267
+ /**
2268
+ * Header label.
2269
+ */
2270
+ headerLabel: ReactNode;
2271
+ }
2272
+ declare const TableCell: FC<TableCellProps>;
2273
+
2091
2274
  type CardFooterProps = {
2092
2275
  title?: string;
2093
2276
  description?: string | ReactNode;
@@ -2577,4 +2760,4 @@ declare const AgoraTailwindConfig: {
2577
2760
  }[];
2578
2761
  };
2579
2762
 
2580
- export { Accordion, AccordionGroup, type AccordionGroupProps, type AccordionGroupType, type AccordionProps, type AccordionRef, AgoraTailwindConfig, Anchor, type AnchorAppearance, type AnchorProps, type AnchorVariant, Avatar, type AvatarBadgePosition, type AvatarBadgeVariant, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarType, BackToTop, type BackToTopProps, type BooleanProp, Breadcrumb, type BreadcrumbLink, type BreadcrumbProps, Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariant, CardEmphasize, type CardEmphasizeAlignment, type CardEmphasizeProps, CardExpandable, type CardExpandableProps, type CardFooterProps, CardFrame, type CardFrameProps, CardHeroIndex, type CardHeroIndexProps, type CardLinkVariant, CardLinks, type CardLinksFooterProps, type CardLinksProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ContactsFooterProps, Dialog, type DialogElementRef, type DialogProps, Drawer, type DrawerPosition, type DrawerProps, type DrawerRef, DropdownList, type DropdownListProps, DropdownSection, DropdownSectionOption, type DropdownSectionOptionProps, type DropdownSectionProps, type DropdownSectionType, FederatedFooter, type FederatedFooterProps, type FeedbackState, type GlossaryLetter, GlossaryLetters, type GlossaryLettersProps, Icon, type IconDimensions, type IconName, type IconPosition, type IconProps, InputDate, type InputDateProps, type InputDateRef, InputFile, type InputFileProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, InputPhone, type InputPhoneProps, type InputPhoneRef, InputRange, InputSearch, InputSearchBar, type InputSearchBarProps, type InputSearchProps, InputSelect, type InputSelectProps, InputText, InputTextArea, type InputTextAreaProps, type InputTextProps, type LetterStatus, type LinkableIconsProps, type LinkableImagesProps, List, type ListProps, type ListStyle, type ListType, LoaderDialog, LoaderDialogContext, type LoaderDialogContextProps, type LoaderDialogProps, LoaderDialogProvider, type LoaderDialogProviderProps, MenuItem, type MenuItemProps, type MenuItemRef, type MenuItemType, ModalContext, type ModalContextProps, ModalDialog, type ModalDialogProps, ModalProvider, type ModalProviderProps, type Months, type PhoneCountryCode, PhoneCountryCodes, type PhoneCountryISO, PhoneCountryISOs, Pill, type PillAppearance, type PillProps, type PillVariant, PopupContext, type PopupContextProps, PopupDialog, type PopupDialogProps, type PopupDimensions, PopupProvider, type PopupProviderProps, ProgressBar, ProgressBarGroup, type ProgressBarGroupProps, type ProgressBarProps, PublicFooter, type PublicFooterProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RangeOrientation, type RangeProps, type RangeType, Scribbles, type ScribblesName, type ScribblesProps, SearchPagination, type SearchPaginationProps, SkipNavigation, StatusCard, type StatusCardProps, type StatusCardType, StepList, type StepListProps, Switch, type SwitchPosition, type SwitchProps, Tab, TabBody, type TabBodyProps, TabHeader, type TabHeaderProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, type TagVariant, Toast, ToastContext, type ToastContextProps, type ToastPositions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastType, Tooltip, type TooltipAlignment, type TooltipPosition, type TooltipProps, type TooltipVariant, TypedEventEmitter, allIcons, allScribbles, debounce, getDateString, normalizeText, stringToBoolean, useLoaderDialogContext, useModalContext, usePopupContext, useToast, useToastContext, useWindowSize };
2763
+ export { Accordion, AccordionGroup, type AccordionGroupProps, type AccordionGroupType, type AccordionProps, type AccordionRef, AgoraTailwindConfig, Anchor, type AnchorAppearance, type AnchorProps, type AnchorVariant, Avatar, type AvatarBadgePosition, type AvatarBadgeVariant, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarType, BackToTop, type BackToTopProps, type BooleanProp, Breadcrumb, type BreadcrumbLink, type BreadcrumbProps, Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariant, CardArticle, type CardArticleProps, CardEmphasize, type CardEmphasizeAlignment, type CardEmphasizeProps, CardExpandable, type CardExpandableProps, type CardFooterProps, CardFrame, type CardFrameProps, CardHeroHelper, type CardHeroHelperProps, CardHeroIndex, type CardHeroIndexProps, CardHeroSitemap, type CardHeroSitemapProps, CardHighlight, type CardHighlightProps, type CardLinkVariant, CardLinks, type CardLinksFooterProps, type CardLinksProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ContactsFooterProps, type DescriptionBlocksProps, Dialog, type DialogElementRef, type DialogProps, Drawer, type DrawerPosition, type DrawerProps, type DrawerRef, DropdownList, type DropdownListProps, DropdownSection, DropdownSectionOption, type DropdownSectionOptionProps, type DropdownSectionProps, type DropdownSectionType, FederatedFooter, type FederatedFooterProps, type FeedbackState, type GlossaryLetter, GlossaryLetters, type GlossaryLettersProps, Icon, type IconDimensions, type IconName, type IconPosition, type IconProps, InputDate, type InputDateProps, type InputDateRef, InputFile, type InputFileProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, InputPhone, type InputPhoneProps, type InputPhoneRef, InputRange, InputSearch, InputSearchBar, type InputSearchBarProps, type InputSearchProps, InputSelect, type InputSelectProps, InputText, InputTextArea, type InputTextAreaProps, type InputTextProps, type LetterStatus, type LinkableIconsProps, type LinkableImagesProps, List, type ListProps, type ListStyle, type ListType, LoaderDialog, LoaderDialogContext, type LoaderDialogContextProps, type LoaderDialogProps, LoaderDialogProvider, type LoaderDialogProviderProps, MenuItem, type MenuItemProps, type MenuItemRef, type MenuItemType, ModalContext, type ModalContextProps, ModalDialog, type ModalDialogProps, ModalProvider, type ModalProviderProps, type Months, type PhoneCountryCode, PhoneCountryCodes, type PhoneCountryISO, PhoneCountryISOs, Pill, type PillAppearance, type PillProps, type PillVariant, PopupContext, type PopupContextProps, PopupDialog, type PopupDialogProps, type PopupDimensions, PopupProvider, type PopupProviderProps, ProgressBar, ProgressBarGroup, type ProgressBarGroupProps, type ProgressBarProps, PublicFooter, type PublicFooterProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type RangeOrientation, type RangeProps, type RangeType, Scribbles, type ScribblesName, type ScribblesProps, SearchPagination, type SearchPaginationProps, SkipNavigation, StatusCard, type StatusCardProps, type StatusCardType, StepList, type StepListProps, Switch, type SwitchPosition, type SwitchProps, Tab, TabBody, type TabBodyProps, TabHeader, type TabHeaderProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, type TagVariant, Toast, ToastContext, type ToastContextProps, type ToastPositions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastType, Tooltip, type TooltipAlignment, type TooltipPosition, type TooltipProps, type TooltipVariant, TypedEventEmitter, allIcons, allScribbles, debounce, getDateString, normalizeText, stringToBoolean, useLoaderDialogContext, useModalContext, usePopupContext, useToast, useToastContext, useWindowSize };
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": "0.8.1",
4
+ "version": "0.9.0",
5
5
  "engines": {
6
6
  "node": "18.17.1"
7
7
  },