@ama-pt/agora-design-system 0.3.1 → 0.4.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
@@ -190,7 +190,7 @@ interface AvatarProps extends ComponentPropsWithoutRef<'div'> {
190
190
  /**
191
191
  * Avatar information. Information related to the avatar, such as user name or other.
192
192
  */
193
- information?: string;
193
+ information: string;
194
194
  /**
195
195
  * Avatar alt personalized description of the avatar. The text appears if the avatar fails to load on the page.
196
196
  */
@@ -612,15 +612,53 @@ interface ListProps extends ComponentPropsWithoutRef<'ul'> {
612
612
  }
613
613
  declare const List: FC<ListProps>;
614
614
 
615
+ /**
616
+ * Menu item type
617
+ */
618
+ type MenuItemType = 'primary' | 'search' | 'menu' | 'secondary' | 'user' | 'avatar' | 'close';
619
+ type BaseProps = {
620
+ /**
621
+ * Remove default icons.
622
+ */
623
+ noIcons?: BooleanProp;
624
+ /**
625
+ * Type of menu item
626
+ */
627
+ itemType: MenuItemType;
628
+ /**
629
+ * Menu on dark background
630
+ */
631
+ darkMode?: BooleanProp;
632
+ /**
633
+ * Menu item is a action button
634
+ */
635
+ actionItem?: BooleanProp;
636
+ /**
637
+ * Children content.
638
+ */
639
+ children?: ReactNode;
640
+ };
641
+ type MenuItemProps = BaseProps & (HTMLProps<HTMLAnchorElement> | HTMLProps<HTMLButtonElement> | HTMLProps<HTMLDivElement> | AvatarProps);
642
+ interface MenuItemRef {
643
+ current: HTMLButtonElement | HTMLAnchorElement | null;
644
+ toggleMenuItem: () => void;
645
+ }
646
+ type ExtendedInterfaceMenu = HTMLButtonElement | HTMLAnchorElement | MenuItemRef | AvatarProps;
647
+ declare const MenuItem: React__default.ForwardRefExoticComponent<((BaseProps & AvatarProps) | Omit<BaseProps & React__default.HTMLProps<HTMLDivElement>, "ref"> | Omit<BaseProps & React__default.HTMLProps<HTMLAnchorElement>, "ref"> | Omit<BaseProps & React__default.HTMLProps<HTMLButtonElement>, "ref">) & React__default.RefAttributes<ExtendedInterfaceMenu>>;
648
+
615
649
  interface ModalProps extends ComponentPropsWithoutRef<'dialog'> {
616
650
  /**
617
651
  * Title text for the close button.
618
652
  */
619
- closeText: string;
653
+ closeButtonText: string;
620
654
  /**
621
655
  * Children content.
622
656
  */
623
657
  children: ReactNode;
658
+ /**
659
+ * Show or hide close button title.
660
+ */
661
+ hideCloseButtonText?: BooleanProp;
624
662
  }
625
663
  declare const Modal: FC<ModalProps>;
626
664
 
@@ -1032,10 +1070,6 @@ interface ButtonGroupProps extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'onC
1032
1070
  * Group name
1033
1071
  */
1034
1072
  name?: string;
1035
- /**
1036
- * List of button props to generate as buttons.
1037
- */
1038
- items?: ButtonProps[];
1039
1073
  /**
1040
1074
  * List of button components to use as children of the group.
1041
1075
  */
@@ -1947,4 +1981,4 @@ declare const AgoraTailwindConfig: {
1947
1981
  plugins: (({ addComponents }: any) => void)[];
1948
1982
  };
1949
1983
 
1950
- 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, type BooleanProp, Breadcrumb, type BreadcrumbLink, type BreadcrumbProps, Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariant, type CardFooterProps, type CardLinksFooterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ContactsFooterProps, 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, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, InputPhone, type InputPhoneProps, type InputPhoneRef, InputRange, InputSearch, type InputSearchProps, InputSelect, type InputSelectProps, InputText, InputTextArea, type InputTextAreaProps, type InputTextProps, type LetterStatus, type LinkableIconsProps, type LinkableImagesProps, List, type ListProps, type ListType, Modal, ModalContext, type ModalContextProps, type ModalProps, ModalProvider, type ModalProviderProps, type Months, type PhoneCountryCode, PhoneCountryCodes, type PhoneCountryISO, PhoneCountryISOs, Pill, type PillAppearance, type PillProps, type PillVariant, 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, StatusCard, type StatusCardProps, type StatusCardType, StepList, type StepListProps, Switch, type SwitchPosition, type SwitchProps, Tab, TabBody, type TabBodyProps, TabHeader, type TabHeaderProps, type TabProps, 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, normalizeText, stringToBoolean, useModal, useModalContext, useToast, useToastContext, useWindowSize };
1984
+ 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, type BooleanProp, Breadcrumb, type BreadcrumbLink, type BreadcrumbProps, Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariant, type CardFooterProps, type CardLinksFooterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ContactsFooterProps, 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, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, InputPhone, type InputPhoneProps, type InputPhoneRef, InputRange, InputSearch, type InputSearchProps, InputSelect, type InputSelectProps, InputText, InputTextArea, type InputTextAreaProps, type InputTextProps, type LetterStatus, type LinkableIconsProps, type LinkableImagesProps, List, type ListProps, type ListType, MenuItem, type MenuItemProps, type MenuItemRef, type MenuItemType, Modal, ModalContext, type ModalContextProps, type ModalProps, ModalProvider, type ModalProviderProps, type Months, type PhoneCountryCode, PhoneCountryCodes, type PhoneCountryISO, PhoneCountryISOs, Pill, type PillAppearance, type PillProps, type PillVariant, 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, StatusCard, type StatusCardProps, type StatusCardType, StepList, type StepListProps, Switch, type SwitchPosition, type SwitchProps, Tab, TabBody, type TabBodyProps, TabHeader, type TabHeaderProps, type TabProps, 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, normalizeText, stringToBoolean, useModal, useModalContext, 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.3.1",
4
+ "version": "0.4.0",
5
5
  "engines": {
6
6
  "node": "18.17.1"
7
7
  },
@@ -12,6 +12,8 @@
12
12
  ],
13
13
  "types": "dist/index.d.ts",
14
14
  "scripts": {
15
+ "start": "yarn run storybook",
16
+ "dev": "yarn run storybook",
15
17
  "storybook": "gulp && storybook dev -p 6006",
16
18
  "build-storybook": "gulp && storybook build",
17
19
  "lint": "eslint src --ext .ts,.tsx",