@iota/apps-ui-kit 0.5.0 → 0.5.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 (55) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/index.d.ts +38 -17
  3. package/dist/index.es.js +1827 -1803
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +38 -38
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/style.css +1 -1
  8. package/package.json +1 -3
  9. package/src/lib/components/atoms/badge/Badge.tsx +1 -1
  10. package/src/lib/components/atoms/button/button-variants/ButtonPill.tsx +1 -1
  11. package/src/lib/components/atoms/button/button-variants/ButtonUnstyled.tsx +1 -1
  12. package/src/lib/components/atoms/button/button-variants/buttonVariants.types.ts +1 -1
  13. package/src/lib/components/atoms/info-box/InfoBox.tsx +2 -1
  14. package/src/lib/components/atoms/key-value-info/KeyValueInfo.tsx +3 -2
  15. package/src/lib/components/atoms/label-text/LabelText.tsx +2 -1
  16. package/src/lib/components/atoms/list-item/ListItem.tsx +2 -2
  17. package/src/lib/components/atoms/snackbar/Snackbar.tsx +1 -1
  18. package/src/lib/components/atoms/tooltip/Tooltip.tsx +3 -3
  19. package/src/lib/components/molecules/account/Account.tsx +21 -3
  20. package/src/lib/components/molecules/address/Address.tsx +1 -1
  21. package/src/lib/components/molecules/card/CardAction.tsx +1 -1
  22. package/src/lib/components/molecules/card/CardBody.tsx +3 -3
  23. package/src/lib/components/molecules/chip/Chip.tsx +1 -1
  24. package/src/lib/components/molecules/display-stats/DisplayStats.tsx +41 -3
  25. package/src/lib/components/molecules/input/Input.tsx +5 -4
  26. package/src/lib/components/molecules/input/InputWrapper.tsx +1 -1
  27. package/src/lib/components/molecules/input/TextArea.tsx +3 -2
  28. package/src/lib/components/molecules/input/input.types.ts +3 -3
  29. package/src/lib/components/molecules/navbar-item/NavbarItemHorizontal.tsx +2 -2
  30. package/src/lib/components/molecules/navbar-item/NavbarItemVertical.tsx +2 -2
  31. package/src/lib/components/molecules/search/Search.tsx +2 -9
  32. package/src/lib/components/molecules/segmented-button/SegmentedButton.tsx +2 -2
  33. package/src/lib/components/molecules/select/Select.tsx +2 -3
  34. package/src/lib/components/molecules/table-cell/TableCell.tsx +2 -2
  35. package/src/lib/components/molecules/table-header-cell/TableHeaderCell.tsx +1 -1
  36. package/src/lib/components/molecules/title/Title.tsx +2 -1
  37. package/src/lib/components/organisms/accordion/Accordion.tsx +2 -2
  38. package/src/lib/components/organisms/dialog/Dialog.tsx +20 -1
  39. package/src/lib/components/organisms/navbar/Navbar.tsx +2 -1
  40. package/src/lib/components/organisms/navbar/NavbarSlideout.tsx +3 -2
  41. package/src/lib/components/organisms/table/Table.tsx +4 -10
  42. package/src/lib/components/organisms/table/TableContext.tsx +2 -1
  43. package/src/lib/tailwind/base.presets.ts +1 -1
  44. package/src/lib/tailwind/constants/fontSizes.constants.ts +1 -1
  45. package/src/lib/tailwind/helpers.ts +1 -1
  46. package/src/lib/tailwind/types.ts +1 -1
  47. package/src/storybook/blocks/TypeSet.tsx +1 -1
  48. package/src/storybook/stories/atoms/Snackbar.stories.tsx +2 -1
  49. package/src/storybook/stories/molecules/Card.stories.tsx +1 -4
  50. package/src/storybook/stories/molecules/Dropdown.stories.tsx +1 -1
  51. package/src/storybook/stories/molecules/Input.stories.tsx +2 -1
  52. package/src/storybook/stories/molecules/Search.stories.tsx +2 -1
  53. package/src/storybook/stories/molecules/SegmentedButton.stories.tsx +2 -1
  54. package/src/storybook/stories/molecules/Select.stories.tsx +2 -1
  55. package/src/storybook/stories/organisms/Navbar.stories.tsx +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @iota/apps-ui-kit
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0524b61: add Tooltip to Badge in Account component
8
+ - a6d0c82: Add eslint config. Resolve eslint errors/warnings.
9
+ - a756bbc: add copy button to DisplayStats component
10
+ - 9d01a25: Fix dialog to prevent closing popup when closing a toast
11
+ - 0edfd4e: Update dependencies.
12
+ - be15d98: Update imports to avoid cycle dependencies
13
+
3
14
  ## 0.5.0
4
15
 
5
16
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ import { BadgeType as BadgeType_2 } from '../../../../components/atoms';
2
+ import { ButtonProps as ButtonProps_2 } from '../../../../components/atoms';
3
+ import { ButtonSegmentType as ButtonSegmentType_2 } from '../../../../components/atoms';
4
+ import { ButtonType as ButtonType_2 } from '../../../../components/atoms/button';
1
5
  import { ComponentProps } from 'react';
2
6
  import { Config } from 'tailwindcss';
3
7
  import { ForwardRefExoticComponent } from 'react';
@@ -9,7 +13,8 @@ import * as RadixDialog from '@radix-ui/react-dialog';
9
13
  import * as React_2 from 'react';
10
14
  import { ReactNode } from 'react';
11
15
  import { RefAttributes } from 'react';
12
- import { SearchBarType as SearchBarType_2 } from '../../../../components';
16
+ import { TooltipPosition as TooltipPosition_2 } from '../../../../components/atoms';
17
+ import { TooltipPosition as TooltipPosition_3 } from '../../../../components/atoms/tooltip';
13
18
 
14
19
  export declare function Accordion({ children, hideBorder, }: {
15
20
  children: React.ReactNode;
@@ -50,7 +55,7 @@ export declare interface AccordionHeaderProps {
50
55
  hideBorder?: boolean;
51
56
  }
52
57
 
53
- export declare function Account({ title, subtitle, badgeType, badgeText, isLocked, avatarContent, onOptionsClick, onLockAccountClick, onUnlockAccountClick, onCopy, copyText, onOpen, isCopyable, isExternal, isSelected, isActive, showSelected, }: AccountProps): React.JSX.Element;
58
+ export declare function Account({ title, subtitle, badgeType, badgeText, isLocked, avatarContent, onOptionsClick, onLockAccountClick, onUnlockAccountClick, onCopy, copyText, onOpen, isCopyable, isExternal, isSelected, isActive, showSelected, badgeTooltipText, badgeTooltipPosition, }: AccountProps): React.JSX.Element;
54
59
 
55
60
  declare interface AccountProps {
56
61
  /**
@@ -118,11 +123,19 @@ declare interface AccountProps {
118
123
  /**
119
124
  * The type of the badge.
120
125
  */
121
- badgeType?: BadgeType;
126
+ badgeType?: BadgeType_2;
122
127
  /**
123
128
  * The text of the badge.
124
129
  */
125
130
  badgeText?: string;
131
+ /**
132
+ * The tooltip text of the badge.
133
+ */
134
+ badgeTooltipText?: string;
135
+ /**
136
+ * The tooltip position of the badge.
137
+ */
138
+ badgeTooltipPosition?: TooltipPosition_2;
126
139
  }
127
140
 
128
141
  export declare function Address({ text, isCopyable, isExternal, externalLink, copyText, onCopySuccess, onCopyError, onOpen, }: AddressProps): React.JSX.Element;
@@ -346,7 +359,7 @@ export declare type CardActionProps = {
346
359
  onClick?: () => void;
347
360
  icon?: React.ReactNode;
348
361
  iconAfterText?: boolean;
349
- buttonType?: ButtonType;
362
+ buttonType?: ButtonType_2;
350
363
  buttonDisabled?: boolean;
351
364
  };
352
365
 
@@ -365,7 +378,7 @@ export declare type CardBodyProps = {
365
378
  icon?: React.ReactNode;
366
379
  isTextTruncated?: boolean;
367
380
  tooltipText?: string;
368
- tooltipPosition?: TooltipPosition;
381
+ tooltipPosition?: TooltipPosition_3;
369
382
  };
370
383
 
371
384
  export declare function CardImage({ type, shape, url, children, }: CardImageProps): JSX_2.Element;
@@ -485,7 +498,7 @@ declare interface ChipProps {
485
498
  disabled?: boolean;
486
499
  }
487
500
 
488
- export declare const Dialog: React_2.FC<RadixDialog.DialogProps>;
501
+ export declare const Dialog: ({ open, onOpenChange, children, ...props }: React_2.ComponentPropsWithoutRef<typeof RadixDialog.Root>) => JSX_2.Element;
489
502
 
490
503
  export declare const DialogBody: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
491
504
 
@@ -507,7 +520,7 @@ export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<RadixDi
507
520
 
508
521
  export declare const DialogTrigger: React_2.ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
509
522
 
510
- export declare function DisplayStats({ label, tooltipPosition, tooltipText, value, supportingLabel, type, size, icon, }: DisplayStatsProps): React.JSX.Element;
523
+ export declare function DisplayStats({ label, tooltipPosition, tooltipText, value, supportingLabel, type, size, icon, copyText, onCopySuccess, onCopyError, }: DisplayStatsProps): React.JSX.Element;
511
524
 
512
525
  declare interface DisplayStatsProps {
513
526
  /**
@@ -517,7 +530,7 @@ declare interface DisplayStatsProps {
517
530
  /**
518
531
  * The tooltip position.
519
532
  */
520
- tooltipPosition?: TooltipPosition;
533
+ tooltipPosition?: TooltipPosition_2;
521
534
  /**
522
535
  * The tooltip text.
523
536
  */
@@ -542,6 +555,18 @@ declare interface DisplayStatsProps {
542
555
  * Add icon to the right of the label.
543
556
  */
544
557
  icon?: React.ReactNode;
558
+ /**
559
+ * Text that need to be copied (optional).
560
+ */
561
+ copyText?: string;
562
+ /**
563
+ * The onCopySuccess event of the KeyValue (optional).
564
+ */
565
+ onCopySuccess?: (e: React.MouseEvent<HTMLButtonElement>, text: string) => void;
566
+ /**
567
+ * The onCopyError event of the KeyValue (optional).
568
+ */
569
+ onCopyError?: (e: unknown, text: string) => void;
545
570
  }
546
571
 
547
572
  export declare enum DisplayStatsSize {
@@ -1087,7 +1112,7 @@ export declare enum ScreenSize {
1087
1112
  Xl = "xl"
1088
1113
  }
1089
1114
 
1090
- export declare function Search({ searchValue, suggestions, onSearchValueChange, onSuggestionClick, placeholder, isLoading, onKeyDown, type, renderSuggestion, }: SearchProps): React.JSX.Element;
1115
+ export declare function Search({ searchValue, suggestions, onSearchValueChange, onSuggestionClick, placeholder, isLoading, type, renderSuggestion, }: SearchProps): React.JSX.Element;
1091
1116
 
1092
1117
  export declare enum SearchBarType {
1093
1118
  Outlined = "outlined",
@@ -1119,14 +1144,10 @@ export declare interface SearchProps {
1119
1144
  * Are the suggestions loading.
1120
1145
  */
1121
1146
  isLoading: boolean;
1122
- /**
1123
- * Callback when a key is pressed.
1124
- */
1125
- onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
1126
1147
  /**
1127
1148
  * The type of the search bar. Can be 'outlined' or 'filled'.
1128
1149
  */
1129
- type?: SearchBarType_2;
1150
+ type?: SearchBarType;
1130
1151
  /**
1131
1152
  * Render suggestion.
1132
1153
  */
@@ -1143,7 +1164,7 @@ declare interface SegmentedButtonProps {
1143
1164
  /**
1144
1165
  * The shape of the button
1145
1166
  */
1146
- shape?: ButtonSegmentType;
1167
+ shape?: ButtonSegmentType_2;
1147
1168
  }
1148
1169
 
1149
1170
  export declare enum SegmentedButtonType {
@@ -1331,7 +1352,7 @@ export declare interface Suggestion {
1331
1352
 
1332
1353
  export declare function Table({ paginationOptions, action, supportingLabel, selectedRowIndexes, rowIndexes, children, pageSizeSelector, heightFull, }: PropsWithChildren<TableProps>): JSX.Element;
1333
1354
 
1334
- export declare function TableActionButton(props: PropsWithChildren<ButtonProps>): JSX_2.Element;
1355
+ export declare function TableActionButton(props: PropsWithChildren<ButtonProps_2>): JSX_2.Element;
1335
1356
 
1336
1357
  export declare function TableBody({ children }: PropsWithChildren): JSX.Element;
1337
1358
 
@@ -1556,7 +1577,7 @@ declare interface TitleProps {
1556
1577
  /**
1557
1578
  * The tooltip position.
1558
1579
  */
1559
- tooltipPosition?: TooltipPosition;
1580
+ tooltipPosition?: TooltipPosition_2;
1560
1581
  /**
1561
1582
  * The tooltip text.
1562
1583
  */