@aivenio/aquarium 1.18.0-rc3 → 1.18.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.
Files changed (104) hide show
  1. package/dist/_variables.scss +1 -1
  2. package/dist/_variables_timescale.scss +1 -1
  3. package/dist/atoms.cjs +4339 -649
  4. package/dist/atoms.mjs +4333 -644
  5. package/dist/src/atoms/Alert/Alert.js +2 -2
  6. package/dist/src/atoms/LineClamp/LineClamp.d.ts +1 -1
  7. package/dist/src/atoms/Popover/Popover.d.ts +2 -2
  8. package/dist/src/atoms/Toast/Toast.d.ts +12 -0
  9. package/dist/src/atoms/Toast/Toast.js +30 -0
  10. package/dist/src/atoms/index.d.ts +1 -0
  11. package/dist/src/atoms/index.js +2 -1
  12. package/dist/src/icons/help.js +1 -1
  13. package/dist/src/icons/infoSign.js +2 -2
  14. package/dist/src/icons/issue.js +1 -1
  15. package/dist/src/icons/lifesaver.js +2 -2
  16. package/dist/src/icons/outdated.js +2 -2
  17. package/dist/src/icons/power.js +2 -2
  18. package/dist/src/icons/questionMark.js +2 -2
  19. package/dist/src/molecules/Alert/Alert.js +2 -2
  20. package/dist/src/molecules/Avatar/Avatar.js +2 -2
  21. package/dist/src/molecules/Badge/Badge.js +3 -3
  22. package/dist/src/molecules/Banner/Banner.js +2 -2
  23. package/dist/src/molecules/Breadcrumbs/Breadcrumbs.js +2 -2
  24. package/dist/src/molecules/Button/Button.d.ts +6 -6
  25. package/dist/src/molecules/Button/Button.js +2 -2
  26. package/dist/src/molecules/Card/Card.js +2 -2
  27. package/dist/src/molecules/Card/Compact.js +2 -2
  28. package/dist/src/molecules/Carousel/Carousel.js +3 -2
  29. package/dist/src/molecules/Checkbox/Checkbox.js +2 -2
  30. package/dist/src/molecules/CheckboxGroup/CheckboxGroup.js +2 -2
  31. package/dist/src/molecules/Chip/Chip.js +4 -3
  32. package/dist/src/molecules/ChoiceChip/ChoiceChip.js +4 -4
  33. package/dist/src/molecules/Combobox/Combobox.js +4 -4
  34. package/dist/src/molecules/Context/Context.js +4 -2
  35. package/dist/src/molecules/ControlLabel/ControlLabel.js +5 -5
  36. package/dist/src/molecules/DataList/DataList.js +2 -2
  37. package/dist/src/molecules/DataTable/DataTable.js +4 -4
  38. package/dist/src/molecules/Dialog/Dialog.js +2 -2
  39. package/dist/src/molecules/Divider/Divider.js +4 -4
  40. package/dist/src/molecules/Dropdown/Dropdown.js +2 -2
  41. package/dist/src/molecules/DropdownMenu/DropdownMenu.js +2 -2
  42. package/dist/src/molecules/EmptyState/EmptyState.js +2 -2
  43. package/dist/src/molecules/Icon/Icon.d.ts +2 -2
  44. package/dist/src/molecules/Icon/Icon.js +3 -3
  45. package/dist/src/molecules/Input/Input.js +3 -3
  46. package/dist/src/molecules/LineClamp/LineClamp.js +2 -2
  47. package/dist/src/molecules/Link/Link.js +17 -2
  48. package/dist/src/molecules/Modal/Modal.js +2 -2
  49. package/dist/src/molecules/MultiInput/MultiInput.js +3 -3
  50. package/dist/src/molecules/MultiSelect/MultiSelect.js +4 -4
  51. package/dist/src/molecules/NativeSelect/NativeSelect.js +3 -3
  52. package/dist/src/molecules/Navigation/Navigation.d.ts +1 -1
  53. package/dist/src/molecules/Navigation/Navigation.js +6 -2
  54. package/dist/src/molecules/PageHeader/PageHeader.js +2 -2
  55. package/dist/src/molecules/Pagination/Pagination.js +2 -2
  56. package/dist/src/molecules/Popover/Popover.js +3 -2
  57. package/dist/src/molecules/PopoverDialog/PopoverDialog.js +3 -3
  58. package/dist/src/molecules/ProgressBar/ProgressBar.js +2 -2
  59. package/dist/src/molecules/RadioButton/RadioButton.js +2 -2
  60. package/dist/src/molecules/RadioButtonGroup/RadioButtonGroup.js +2 -2
  61. package/dist/src/molecules/Section/Section.js +2 -2
  62. package/dist/src/molecules/SegmentedControl/SegmentedControl.js +2 -2
  63. package/dist/src/molecules/Select/Select.js +4 -4
  64. package/dist/src/molecules/Skeleton/Skeleton.js +2 -2
  65. package/dist/src/molecules/Stepper/Stepper.js +2 -2
  66. package/dist/src/molecules/Switch/Switch.js +2 -2
  67. package/dist/src/molecules/SwitchGroup/SwitchGroup.js +2 -2
  68. package/dist/src/molecules/Table/Table.js +3 -3
  69. package/dist/src/molecules/Tabs/Tabs.js +2 -2
  70. package/dist/src/molecules/TagLabel/TagLabel.js +4 -4
  71. package/dist/src/molecules/Template/Template.d.ts +1 -0
  72. package/dist/src/molecules/Template/Template.js +3 -3
  73. package/dist/src/molecules/Textarea/Textarea.js +3 -3
  74. package/dist/src/molecules/Timeline/Timeline.js +2 -2
  75. package/dist/src/molecules/Toast/Timer.d.ts +4 -0
  76. package/dist/src/molecules/Toast/Timer.js +15 -0
  77. package/dist/src/molecules/Toast/Toast.d.ts +4 -0
  78. package/dist/src/molecules/Toast/Toast.js +105 -0
  79. package/dist/src/molecules/Toast/Toast.spec.js +42 -0
  80. package/dist/src/molecules/Toast/types.d.ts +35 -0
  81. package/dist/src/molecules/Toast/types.js +6 -0
  82. package/dist/src/molecules/Tooltip/Tooltip.js +3 -3
  83. package/dist/src/molecules/Transition/Transition.d.ts +11 -0
  84. package/dist/src/molecules/Transition/Transition.js +27 -0
  85. package/dist/src/molecules/index.d.ts +1 -1
  86. package/dist/src/molecules/index.js +2 -2
  87. package/dist/src/test/config.d.ts +5 -0
  88. package/dist/src/test/config.js +8 -0
  89. package/dist/src/utils/form/Label/Label.d.ts +4 -0
  90. package/dist/src/utils/form/Label/Label.js +4 -4
  91. package/dist/styles.css +23 -0
  92. package/dist/styles_timescaledb.css +23 -0
  93. package/dist/system.cjs +5734 -2083
  94. package/dist/system.mjs +5240 -1587
  95. package/dist/tsconfig.module.tsbuildinfo +1 -1
  96. package/dist/types/tailwindGenerated.d.ts +1 -1
  97. package/dist/types/utils.d.ts +1 -0
  98. package/package.json +8 -4
  99. package/dist/src/molecules/Notification/Notification.d.ts +0 -6
  100. package/dist/src/molecules/Notification/Notification.js +0 -88
  101. package/dist/src/molecules/Notification/Notification.spec.js +0 -44
  102. package/dist/src/molecules/Notification/types.d.ts +0 -37
  103. package/dist/src/molecules/Notification/types.js +0 -6
  104. /package/dist/src/molecules/{Notification/Notification.spec.d.ts → Toast/Toast.spec.d.ts} +0 -0
@@ -1 +1 @@
1
- export declare type ClassNames = "-left-1\/2" | "-m-2" | "-mt-4" | "-mx-4" | "-z-10" | "\!container" | "\!inline" | "\!table" | "\[\&\>\*\:not\(\:first-child\)\]\:-ml-3" | "\[\&\>div\:first-child\]\:px-5" | "\[\&\>path\]\:stroke-transparent" | "absolute" | "active\:bg-grey-10" | "active\:bg-grey-5" | "active\:bg-primary-90" | "active\:bg-transparent" | "active\:ring-0" | "active\:ring-grey-50" | "active\:text-grey-50" | "active\:text-grey-70" | "active\:text-grey-80" | "active\:text-primary-70" | "align-middle" | "animate-pulse" | "appearance-none" | "aspect-square" | "auto-cols-fr" | "before\:content-\[\'_\'\]" | "bg-cover" | "bg-current" | "bg-error-0" | "bg-error-20" | "bg-error-5" | "bg-error-70" | "bg-gradient-to-l" | "bg-gradient-to-r" | "bg-grey-0" | "bg-grey-10" | "bg-grey-20" | "bg-grey-30" | "bg-grey-5" | "bg-grey-90" | "bg-info-5" | "bg-info-50" | "bg-navyBlue-100" | "bg-opacity-40" | "bg-primary-70" | "bg-primary-80" | "bg-secondary-5" | "bg-success-5" | "bg-success-70" | "bg-transparent" | "bg-warning-5" | "bg-warning-70" | "bg-white" | "block" | "blur" | "border" | "border-0" | "border-2" | "border-\[1px\]" | "border-b" | "border-b-2" | "border-b-\[1px\]" | "border-current" | "border-dashed" | "border-error-50" | "border-grey-10" | "border-grey-100" | "border-grey-20" | "border-grey-40" | "border-grey-5" | "border-grey-50" | "border-grey-90" | "border-info-70" | "border-navyBlue-100" | "border-none" | "border-primary-80" | "border-solid" | "border-spacing-0" | "border-success-70" | "border-t-2" | "border-transparent" | "bottom-0" | "break-all" | "break-words" | "capitalize" | "checked\:bg-navyBlue-100" | "checked\:bg-opacity-40" | "checked\:border-navyBlue-100" | "checked\:opacity-40" | "checked\:shadow-whiteInset" | "children\:border-grey-10" | "children\:inline-block" | "children\:last\:border-b-0" | "col-start-1" | "col-start-2" | "col-start-3" | "collapse" | "container" | "contents" | "cursor-default" | "cursor-not-allowed" | "cursor-pointer" | "delay-150" | "disabled\:bg-grey-0" | "disabled\:bg-grey-5" | "disabled\:bg-primary-5" | "disabled\:bg-transparent" | "disabled\:border-grey-20" | "disabled\:cursor-not-allowed" | "disabled\:ring-grey-20" | "disabled\:text-grey-20" | "disabled\:text-grey-30" | "disabled\:text-grey-40" | "disabled\:text-primary-40" | "duration-300" | "ease-in-out" | "filter" | "first\:mt-0" | "fixed" | "flex" | "flex-col" | "flex-grow" | "flex-nowrap" | "flex-row" | "flex-row-reverse" | "flex-wrap" | "focus-visible\:bg-grey-0" | "focus-visible\:border-info-70" | "focus-visible\:outline-0" | "focus-visible\:ring-1" | "focus-visible\:ring-2" | "focus-visible\:ring-grey-50" | "focus-visible\:ring-info-70" | "focus-visible\:ring-inset" | "focus-visible\:ring-primary-100" | "focus-visible\:text-grey-80" | "focus-visible\:text-grey-90" | "focus\:bg-error-20" | "focus\:bg-grey-20" | "focus\:border" | "focus\:border-info-70" | "focus\:border-transparent" | "focus\:outline-none" | "focus\:ring-0" | "focus\:ring-1" | "focus\:ring-2" | "focus\:ring-grey-60" | "focus\:ring-offset-0" | "focus\:text-primary-80" | "focusable" | "font-normal" | "from-white" | "gap-0" | "gap-2" | "gap-3" | "gap-4" | "gap-5" | "gap-7" | "gap-8" | "gap-x-2" | "gap-x-3" | "gap-x-4" | "gap-y-2" | "grid" | "grid-cols-1" | "grid-cols-2" | "grid-cols-3" | "grid-cols-\[16px_1fr\]" | "grid-cols-\[200px_1fr_200px\]" | "grid-cols-\[auto_1fr\]" | "grid-cols-\[auto_1fr_auto\]" | "grid-flow-col" | "group" | "group-hover\:bg-grey-0" | "group-hover\:visible" | "group-last\:border-b-0" | "grow" | "grow-0" | "h-1" | "h-1px" | "h-2" | "h-3" | "h-4" | "h-5" | "h-6" | "h-\[120px\]" | "h-\[174px\]" | "h-\[1px\]" | "h-\[20px\]" | "h-\[225px\]" | "h-\[25px\]" | "h-\[2px\]" | "h-\[32px\]" | "h-\[3px\]" | "h-\[50px\]" | "h-\[56px\]" | "h-\[6px\]" | "h-\[8px\]" | "h-auto" | "h-full" | "hidden" | "hover\:bg-error-10" | "hover\:bg-grey-0" | "hover\:bg-grey-10" | "hover\:bg-grey-30" | "hover\:bg-grey-5" | "hover\:bg-primary-70" | "hover\:border-grey-20" | "hover\:border-grey-50" | "hover\:checked\:bg-navyBlue-100" | "hover\:cursor-pointer" | "hover\:ring-grey-50" | "hover\:text-grey-80" | "hover\:text-grey-90" | "hover\:text-primary-70" | "hover\:text-primary-80" | "icon-stroke-2" | "inline" | "inline-block" | "inline-flex" | "inline-grid" | "inset-0" | "inset-y-0" | "invisible" | "italic" | "items-center" | "items-stretch" | "justify-between" | "justify-center" | "justify-end" | "justify-self-center" | "justify-start" | "leading-\[0px\]" | "leading-\[18px\]" | "leading-none" | "left-0" | "left-1\/2" | "left-2" | "line-clamp-1" | "line-clamp-2" | "line-clamp-3" | "line-clamp-4" | "line-clamp-5" | "line-clamp-6" | "m-3" | "m-4" | "m-\[1px\]" | "max-h-full" | "max-w-\[300px\]" | "max-w-\[320px\]" | "max-w-\[40px\]" | "max-w-\[600px\]" | "max-w-\[70px\]" | "max-w-\[940px\]" | "max-w-screen-lg" | "max-w-screen-md" | "max-w-screen-sm" | "max-w-screen-xl" | "max-w-screen-xs" | "mb-2" | "mb-3" | "mb-5" | "mb-\[-2px\]" | "mb-\[7px\]" | "min-h-\[120px\]" | "min-h-\[50px\]" | "min-h-full" | "min-w-0" | "min-w-\[280px\]" | "min-w-full" | "ml-2" | "ml-3" | "mr-1" | "mr-4" | "mt-1" | "mt-2" | "mt-4" | "mt-5" | "mt-auto" | "mx-0" | "mx-1" | "mx-2" | "mx-3" | "mx-7" | "my-1" | "my-4" | "no-arrow" | "no-arrows" | "no-underline" | "object-cover" | "opacity-40" | "opacity-70" | "origin-\[0\%_45\%\]" | "outline-none" | "overflow-hidden" | "overflow-x-hidden" | "overflow-x-scroll" | "overflow-y-auto" | "p-1" | "p-2" | "p-3" | "p-4" | "p-5" | "p-6" | "p-\[2px\]" | "p-\[3px\]" | "pb-3" | "pb-6" | "peer" | "peer-checked\/switch\:left-1" | "peer-checked\/switch\:translate-x-5" | "peer-checked\:\[\&\>path\]\:stroke-grey-30" | "peer-checked\:\[\&\>path\]\:stroke-white" | "peer-checked\:border-navyBlue-100" | "peer-checked\:text-grey-30" | "peer-checked\:text-white" | "peer-disabled\/switch\:bg-grey-0" | "peer-focus\:border-info-70" | "peer-hover\:border-grey-50" | "peer\/switch" | "pl-4" | "pl-7" | "placeholder\:text-grey-40" | "pointer-events-none" | "pr-4" | "pt-3" | "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-7" | "px-\[14px\]" | "px-\[1px\]" | "px-\[20px\]" | "px-\[4px\]" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-7" | "py-\[14px\]" | "py-\[6px\]" | "recharts-cartesian-axis-tick-value" | "recharts-tooltip-item" | "recharts-tooltip-item-separator" | "recharts-tooltip-wrapper" | "relative" | "resize" | "resize-none" | "right-0" | "right-\[28px\]" | "ring-0" | "ring-1" | "ring-2" | "ring-grey-30" | "ring-inset" | "ring-offset-0" | "rotate-45" | "rounded" | "rounded-\[2px\]" | "rounded-full" | "rounded-sm" | "row-start-1" | "scale-\[0\.55\]" | "scroll-smooth" | "scrollbar-hide" | "self-center" | "self-start" | "shadow-16dp" | "shadow-2dp" | "shadow-4dp" | "shrink" | "snap-mandatory" | "snap-start" | "snap-x" | "static" | "sticky" | "stroke-grey-30" | "table" | "table-auto" | "table-fixed" | "text-\[8px\]" | "text-\[9px\]" | "text-center" | "text-error-0" | "text-error-10" | "text-error-100" | "text-error-20" | "text-error-30" | "text-error-40" | "text-error-5" | "text-error-50" | "text-error-60" | "text-error-70" | "text-error-80" | "text-error-90" | "text-grey-0" | "text-grey-10" | "text-grey-100" | "text-grey-20" | "text-grey-30" | "text-grey-40" | "text-grey-5" | "text-grey-50" | "text-grey-60" | "text-grey-70" | "text-grey-80" | "text-grey-90" | "text-info-0" | "text-info-10" | "text-info-100" | "text-info-20" | "text-info-30" | "text-info-40" | "text-info-5" | "text-info-50" | "text-info-60" | "text-info-70" | "text-info-80" | "text-info-90" | "text-left" | "text-primary-0" | "text-primary-10" | "text-primary-100" | "text-primary-20" | "text-primary-30" | "text-primary-40" | "text-primary-5" | "text-primary-50" | "text-primary-60" | "text-primary-70" | "text-primary-80" | "text-primary-90" | "text-right" | "text-secondary-0" | "text-secondary-10" | "text-secondary-100" | "text-secondary-20" | "text-secondary-30" | "text-secondary-40" | "text-secondary-5" | "text-secondary-50" | "text-secondary-60" | "text-secondary-70" | "text-secondary-80" | "text-secondary-90" | "text-success-0" | "text-success-10" | "text-success-100" | "text-success-20" | "text-success-30" | "text-success-40" | "text-success-5" | "text-success-50" | "text-success-60" | "text-success-70" | "text-success-80" | "text-success-90" | "text-transparent" | "text-warning-0" | "text-warning-10" | "text-warning-100" | "text-warning-20" | "text-warning-30" | "text-warning-40" | "text-warning-5" | "text-warning-50" | "text-warning-60" | "text-warning-70" | "text-warning-80" | "text-warning-90" | "text-white" | "top-0" | "top-\[14px\]" | "top-\[20px\]" | "top-\[3px\]" | "transform" | "transition" | "transition-all" | "typography-body-default" | "typography-body-default-medium" | "typography-body-large" | "typography-body-large-medium" | "typography-body-small" | "typography-body-small-medium" | "typography-button-large" | "typography-button-medium" | "typography-button-small" | "typography-caption" | "typography-caption-default" | "typography-caption-small" | "typography-default" | "typography-default-strong" | "typography-heading" | "typography-heading-2xl" | "typography-heading-3xl" | "typography-heading-4xl" | "typography-heading-5xl" | "typography-heading-large" | "typography-heading-xl" | "typography-large" | "typography-large-heading" | "typography-large-strong" | "typography-overline-default" | "typography-overline-small" | "typography-small" | "typography-small-strong" | "typography-subheading" | "uppercase" | "via-white" | "visible" | "visited\:text-primary-80" | "w-1" | "w-1px" | "w-2" | "w-3" | "w-4" | "w-5" | "w-6" | "w-\[280px\]" | "w-\[32px\]" | "w-\[34px\]" | "w-\[56px\]" | "w-\[6px\]" | "w-\[8px\]" | "w-full" | "whitespace-nowrap" | "whitespace-pre" | "z-0" | "z-10" | "z-20" | "z-40" | "z-modal";
1
+ export declare type ClassNames = "-left-1\/2" | "-m-2" | "-mt-4" | "-mx-4" | "-z-10" | "\!container" | "\!inline" | "\!table" | "\[\&\>\*\:not\(\:first-child\)\]\:-ml-3" | "\[\&\>button\]\:p-0" | "\[\&\>button\]\:text-error-20" | "\[\&\>button\]\:text-grey-50" | "\[\&\>div\:first-child\]\:px-5" | "\[\&\>path\]\:stroke-transparent" | "absolute" | "active\:bg-grey-10" | "active\:bg-grey-5" | "active\:bg-primary-90" | "active\:bg-transparent" | "active\:ring-0" | "active\:ring-grey-50" | "active\:text-grey-50" | "active\:text-grey-70" | "active\:text-grey-80" | "active\:text-primary-70" | "align-middle" | "animate-pulse" | "appearance-none" | "aspect-square" | "auto-cols-fr" | "before\:content-\[\'_\'\]" | "bg-cover" | "bg-current" | "bg-error-0" | "bg-error-20" | "bg-error-5" | "bg-error-70" | "bg-gradient-to-l" | "bg-gradient-to-r" | "bg-grey-0" | "bg-grey-10" | "bg-grey-20" | "bg-grey-30" | "bg-grey-5" | "bg-grey-80" | "bg-grey-90" | "bg-info-5" | "bg-info-50" | "bg-navyBlue-100" | "bg-opacity-40" | "bg-primary-70" | "bg-primary-80" | "bg-secondary-5" | "bg-success-5" | "bg-success-70" | "bg-transparent" | "bg-warning-5" | "bg-warning-70" | "bg-white" | "block" | "blur" | "border" | "border-0" | "border-2" | "border-\[1px\]" | "border-b" | "border-b-2" | "border-b-\[1px\]" | "border-current" | "border-dashed" | "border-error-50" | "border-grey-10" | "border-grey-100" | "border-grey-20" | "border-grey-40" | "border-grey-5" | "border-grey-50" | "border-grey-90" | "border-info-70" | "border-navyBlue-100" | "border-none" | "border-primary-80" | "border-solid" | "border-spacing-0" | "border-success-70" | "border-t-2" | "border-transparent" | "bottom-0" | "break-all" | "break-words" | "capitalize" | "checked\:bg-navyBlue-100" | "checked\:bg-opacity-40" | "checked\:border-navyBlue-100" | "checked\:opacity-40" | "checked\:shadow-whiteInset" | "children\:border-grey-10" | "children\:inline-block" | "children\:last\:border-b-0" | "col-start-1" | "col-start-2" | "col-start-3" | "collapse" | "container" | "contents" | "cursor-default" | "cursor-not-allowed" | "cursor-pointer" | "delay-150" | "disabled\:bg-grey-0" | "disabled\:bg-grey-5" | "disabled\:bg-primary-5" | "disabled\:bg-transparent" | "disabled\:border-grey-20" | "disabled\:cursor-not-allowed" | "disabled\:ring-grey-20" | "disabled\:text-grey-20" | "disabled\:text-grey-30" | "disabled\:text-grey-40" | "disabled\:text-primary-40" | "duration-300" | "ease-in-out" | "filter" | "first\:mt-0" | "fixed" | "flex" | "flex-col" | "flex-grow" | "flex-nowrap" | "flex-row" | "flex-row-reverse" | "flex-wrap" | "focus-visible\:bg-grey-0" | "focus-visible\:border-info-70" | "focus-visible\:outline-0" | "focus-visible\:ring-1" | "focus-visible\:ring-2" | "focus-visible\:ring-grey-50" | "focus-visible\:ring-info-70" | "focus-visible\:ring-inset" | "focus-visible\:ring-primary-100" | "focus-visible\:text-grey-80" | "focus-visible\:text-grey-90" | "focus\:bg-error-20" | "focus\:bg-grey-20" | "focus\:border" | "focus\:border-info-70" | "focus\:border-transparent" | "focus\:outline-none" | "focus\:ring-0" | "focus\:ring-1" | "focus\:ring-2" | "focus\:ring-grey-60" | "focus\:ring-offset-0" | "focus\:text-primary-80" | "focusable" | "font-normal" | "from-white" | "gap-0" | "gap-2" | "gap-3" | "gap-4" | "gap-5" | "gap-7" | "gap-8" | "gap-x-2" | "gap-x-3" | "gap-x-4" | "gap-x-6" | "gap-y-2" | "grid" | "grid-cols-1" | "grid-cols-2" | "grid-cols-3" | "grid-cols-\[16px_1fr\]" | "grid-cols-\[1fr_auto\]" | "grid-cols-\[200px_1fr_200px\]" | "grid-cols-\[auto_1fr\]" | "grid-cols-\[auto_1fr_auto\]" | "grid-flow-col" | "group" | "group-hover\:bg-grey-0" | "group-hover\:visible" | "group-last\:border-b-0" | "grow" | "grow-0" | "h-1" | "h-1px" | "h-2" | "h-3" | "h-4" | "h-5" | "h-6" | "h-\[120px\]" | "h-\[174px\]" | "h-\[1px\]" | "h-\[20px\]" | "h-\[225px\]" | "h-\[25px\]" | "h-\[2px\]" | "h-\[32px\]" | "h-\[3px\]" | "h-\[50px\]" | "h-\[56px\]" | "h-\[6px\]" | "h-\[8px\]" | "h-auto" | "h-full" | "hidden" | "hover\:bg-error-10" | "hover\:bg-grey-0" | "hover\:bg-grey-10" | "hover\:bg-grey-30" | "hover\:bg-grey-5" | "hover\:bg-primary-70" | "hover\:border-grey-20" | "hover\:border-grey-50" | "hover\:checked\:bg-navyBlue-100" | "hover\:cursor-pointer" | "hover\:ring-grey-50" | "hover\:text-grey-80" | "hover\:text-grey-90" | "hover\:text-primary-70" | "hover\:text-primary-80" | "icon-stroke-2" | "inline" | "inline-block" | "inline-flex" | "inline-grid" | "inset-0" | "inset-y-0" | "invisible" | "italic" | "items-center" | "items-stretch" | "justify-between" | "justify-center" | "justify-end" | "justify-self-center" | "justify-start" | "leading-\[0px\]" | "leading-\[18px\]" | "leading-none" | "left-0" | "left-1\/2" | "left-2" | "line-clamp-1" | "line-clamp-2" | "line-clamp-3" | "line-clamp-4" | "line-clamp-5" | "line-clamp-6" | "m-3" | "m-4" | "m-\[1px\]" | "max-h-full" | "max-w-\[300px\]" | "max-w-\[320px\]" | "max-w-\[40px\]" | "max-w-\[600px\]" | "max-w-\[70px\]" | "max-w-\[940px\]" | "max-w-screen-lg" | "max-w-screen-md" | "max-w-screen-sm" | "max-w-screen-xl" | "max-w-screen-xs" | "mb-2" | "mb-3" | "mb-5" | "mb-\[-2px\]" | "mb-\[7px\]" | "min-h-\[120px\]" | "min-h-\[50px\]" | "min-h-full" | "min-w-0" | "min-w-\[280px\]" | "min-w-full" | "ml-2" | "ml-3" | "mr-1" | "mr-4" | "mt-1" | "mt-2" | "mt-4" | "mt-5" | "mt-auto" | "mx-0" | "mx-1" | "mx-2" | "mx-3" | "mx-7" | "my-1" | "my-4" | "no-arrow" | "no-arrows" | "no-underline" | "object-cover" | "opacity-40" | "opacity-70" | "origin-\[0\%_45\%\]" | "outline-none" | "overflow-hidden" | "overflow-x-hidden" | "overflow-x-scroll" | "overflow-y-auto" | "p-1" | "p-2" | "p-3" | "p-4" | "p-5" | "p-6" | "p-\[2px\]" | "p-\[3px\]" | "pb-3" | "pb-6" | "peer" | "peer-checked\/switch\:left-1" | "peer-checked\/switch\:translate-x-5" | "peer-checked\:\[\&\>path\]\:stroke-grey-30" | "peer-checked\:\[\&\>path\]\:stroke-white" | "peer-checked\:border-navyBlue-100" | "peer-checked\:text-grey-30" | "peer-checked\:text-white" | "peer-disabled\/switch\:bg-grey-0" | "peer-focus\:border-info-70" | "peer-hover\:border-grey-50" | "peer\/switch" | "pl-4" | "pl-7" | "placeholder\:text-grey-40" | "pointer-events-none" | "pr-4" | "pt-3" | "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-7" | "px-\[14px\]" | "px-\[1px\]" | "px-\[20px\]" | "px-\[4px\]" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-7" | "py-\[14px\]" | "py-\[6px\]" | "recharts-cartesian-axis-tick-value" | "recharts-tooltip-item" | "recharts-tooltip-item-separator" | "recharts-tooltip-wrapper" | "relative" | "resize" | "resize-none" | "right-0" | "right-\[28px\]" | "ring-0" | "ring-1" | "ring-2" | "ring-grey-30" | "ring-inset" | "ring-offset-0" | "rotate-45" | "rounded" | "rounded-\[2px\]" | "rounded-full" | "rounded-sm" | "row-start-1" | "scale-\[0\.55\]" | "scroll-smooth" | "scrollbar-hide" | "self-center" | "self-start" | "shadow-16dp" | "shadow-2dp" | "shadow-4dp" | "shrink" | "snap-mandatory" | "snap-start" | "snap-x" | "static" | "sticky" | "stroke-grey-30" | "table" | "table-auto" | "table-fixed" | "text-\[8px\]" | "text-\[9px\]" | "text-center" | "text-error-0" | "text-error-10" | "text-error-100" | "text-error-20" | "text-error-30" | "text-error-40" | "text-error-5" | "text-error-50" | "text-error-60" | "text-error-70" | "text-error-80" | "text-error-90" | "text-grey-0" | "text-grey-10" | "text-grey-100" | "text-grey-20" | "text-grey-30" | "text-grey-40" | "text-grey-5" | "text-grey-50" | "text-grey-60" | "text-grey-70" | "text-grey-80" | "text-grey-90" | "text-info-0" | "text-info-10" | "text-info-100" | "text-info-20" | "text-info-30" | "text-info-40" | "text-info-5" | "text-info-50" | "text-info-60" | "text-info-70" | "text-info-80" | "text-info-90" | "text-left" | "text-primary-0" | "text-primary-10" | "text-primary-100" | "text-primary-20" | "text-primary-30" | "text-primary-40" | "text-primary-5" | "text-primary-50" | "text-primary-60" | "text-primary-70" | "text-primary-80" | "text-primary-90" | "text-right" | "text-secondary-0" | "text-secondary-10" | "text-secondary-100" | "text-secondary-20" | "text-secondary-30" | "text-secondary-40" | "text-secondary-5" | "text-secondary-50" | "text-secondary-60" | "text-secondary-70" | "text-secondary-80" | "text-secondary-90" | "text-success-0" | "text-success-10" | "text-success-100" | "text-success-20" | "text-success-30" | "text-success-40" | "text-success-5" | "text-success-50" | "text-success-60" | "text-success-70" | "text-success-80" | "text-success-90" | "text-transparent" | "text-warning-0" | "text-warning-10" | "text-warning-100" | "text-warning-20" | "text-warning-30" | "text-warning-40" | "text-warning-5" | "text-warning-50" | "text-warning-60" | "text-warning-70" | "text-warning-80" | "text-warning-90" | "text-white" | "top-0" | "top-\[14px\]" | "top-\[20px\]" | "top-\[3px\]" | "transform" | "transition" | "transition-all" | "typography-body-default" | "typography-body-default-medium" | "typography-body-large" | "typography-body-large-medium" | "typography-body-small" | "typography-body-small-medium" | "typography-button-large" | "typography-button-medium" | "typography-button-small" | "typography-caption" | "typography-caption-default" | "typography-caption-small" | "typography-default" | "typography-default-strong" | "typography-heading" | "typography-heading-2xl" | "typography-heading-3xl" | "typography-heading-4xl" | "typography-heading-5xl" | "typography-heading-large" | "typography-heading-xl" | "typography-large" | "typography-large-heading" | "typography-large-strong" | "typography-overline-default" | "typography-overline-small" | "typography-small" | "typography-small-strong" | "typography-subheading" | "uppercase" | "via-white" | "visible" | "visited\:text-primary-80" | "w-1" | "w-1px" | "w-2" | "w-3" | "w-4" | "w-5" | "w-6" | "w-\[280px\]" | "w-\[32px\]" | "w-\[34px\]" | "w-\[56px\]" | "w-\[6px\]" | "w-\[8px\]" | "w-full" | "whitespace-nowrap" | "whitespace-pre" | "z-0" | "z-10" | "z-20" | "z-40" | "z-modal";
@@ -9,3 +9,4 @@ export declare type EmptyOrOneOrMore<T> = React.ReactElement<T> | AcceptEmpty |
9
9
  export declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
10
10
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
11
11
  }[Keys];
12
+ export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aivenio/aquarium",
3
- "version": "1.18.0-rc3",
3
+ "version": "1.18.0",
4
4
  "description": "Aiven Aquarium design system",
5
5
  "main": "dist/system.cjs",
6
6
  "module": "dist/system.mjs",
@@ -111,6 +111,7 @@
111
111
  "@types/common-tags": "^1.8.0",
112
112
  "@types/convict": "^6.0.1",
113
113
  "@types/jest": "^29.2.2",
114
+ "@types/jest-axe": "^3.5.5",
114
115
  "@types/lodash": "^4.14.168",
115
116
  "@types/react": "^17.0.58",
116
117
  "@types/react-dom": "^17.0.20",
@@ -126,6 +127,7 @@
126
127
  "css-loader": "^5.1.3",
127
128
  "css-minimizer-webpack-plugin": "^1.2.0",
128
129
  "cssnano": "^4.1.10",
130
+ "csstype": "^3.1.2",
129
131
  "esbuild": "^0.15.8",
130
132
  "eslint": "^8.31.0",
131
133
  "eslint-config-prettier": "^8.6.0",
@@ -141,7 +143,8 @@
141
143
  "fp-ts": "^2.9.5",
142
144
  "fp-ts-contrib": "^0.1.21",
143
145
  "jest": "^29.3.1",
144
- "jest-environment-jsdom": "^29.3.1",
146
+ "jest-axe": "^7.0.1",
147
+ "jest-environment-jsdom": "^29.5.0",
145
148
  "lodash": "^4.17.21",
146
149
  "log-watcher-webpack-plugin": "^1.0.4",
147
150
  "mini-css-extract-plugin": "^1.3.9",
@@ -173,12 +176,13 @@
173
176
  "@iconify/react": "^3.1.4",
174
177
  "@iconify/types": "^1.0.12",
175
178
  "@popperjs/core": "^2.11.5",
179
+ "@react-spring/web": "^9.7.2",
176
180
  "classnames": "^2.3.1",
177
181
  "downshift": "^7.0.5",
178
182
  "match-sorter": "^6.3.1",
179
183
  "react-aria": "^3.23.1",
180
184
  "react-popper": "^2.3.0",
181
- "react-stately": "^3.20.0",
185
+ "react-stately": "^3.22.0",
182
186
  "recharts": "^2.5.0"
183
187
  },
184
188
  "peerDependencies": {
@@ -192,4 +196,4 @@
192
196
  "resolutions": {
193
197
  "webpack": "^5"
194
198
  }
195
- }
199
+ }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { type Actions, type DispatchableNotification, type State } from './types';
3
- export declare const useNotificationContext: () => [State, React.Dispatch<Actions>];
4
- export declare const useNotification: () => (notification: DispatchableNotification) => void;
5
- export declare const NotificationProvider: React.FC;
6
- export declare const NotificationConsumer: () => React.JSX.Element;
@@ -1,88 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { createContext, useContext, useEffect, useReducer } from 'react';
13
- import groupBy from 'lodash/groupBy';
14
- import { Alert } from '../../../src/molecules/Alert/Alert';
15
- import { Spacing } from '../../../src/molecules/Spacing/Spacing';
16
- import { ActionTypes, } from './types';
17
- const NotificationContext = createContext(null);
18
- export const useNotificationContext = () => {
19
- const context = useContext(NotificationContext);
20
- if (context === null) {
21
- throw new Error('NotificationContext was used outside of provider.');
22
- }
23
- return context;
24
- };
25
- export const useNotification = () => {
26
- const [_, dispatch] = useNotificationContext();
27
- return (notification) => {
28
- dispatch({ type: ActionTypes.Notify, notification });
29
- };
30
- };
31
- const toNotification = (_a) => {
32
- var { id, variant, position, duration } = _a, notification = __rest(_a, ["id", "variant", "position", "duration"]);
33
- return (Object.assign(Object.assign({}, notification), { id: id || crypto.randomUUID(), variant: variant || 'default', position: position || 'top', duration: duration || variant === 'danger' ? Infinity : 6000 }));
34
- };
35
- const reducer = (state, action) => {
36
- switch (action.type) {
37
- case ActionTypes.Notify:
38
- return Object.assign(Object.assign({}, state), { notifications: [...state.notifications, toNotification(action.notification)] });
39
- case ActionTypes.Dismiss:
40
- return Object.assign(Object.assign({}, state), { notifications: state.notifications.filter((notification) => notification.id !== action.notificationId) });
41
- default:
42
- throw new Error('Unsupported action type.');
43
- }
44
- };
45
- export const NotificationProvider = ({ children }) => {
46
- const [state, dispatch] = useReducer(reducer, { notifications: [] });
47
- return React.createElement(NotificationContext.Provider, { value: [state, dispatch] }, children);
48
- };
49
- const isCentered = (position) => position === 'top' || position === 'bottom';
50
- const PADDING = 20;
51
- const Notification = ({ notification, onDismiss }) => {
52
- const { id, message, title, variant, duration } = notification;
53
- useEffect(() => {
54
- let timer;
55
- if (duration !== Infinity) {
56
- timer = setTimeout(() => {
57
- onDismiss(id);
58
- }, duration);
59
- }
60
- return () => {
61
- if (timer) {
62
- clearTimeout(timer);
63
- }
64
- };
65
- }, [duration]);
66
- return (React.createElement(Alert, { title: title, type: variant === 'danger' ? 'error' : 'information' }, message));
67
- };
68
- export const NotificationConsumer = () => {
69
- const [state, dispatch] = useNotificationContext();
70
- const notificationsByPosition = groupBy(state.notifications, 'position');
71
- const positions = Object.keys(notificationsByPosition);
72
- const onDismiss = (notificationId) => {
73
- dispatch({ type: ActionTypes.Dismiss, notificationId });
74
- };
75
- return (React.createElement("div", null, positions.map((position) => {
76
- var _a;
77
- return (React.createElement(Spacing, { gap: "3", key: position, style: {
78
- position: 'fixed',
79
- bottom: position.includes('bottom') ? PADDING : undefined,
80
- top: position.includes('top') ? PADDING : undefined,
81
- right: position.includes('right') ? PADDING : undefined,
82
- left: isCentered(position) ? '50%' : position.includes('left') ? PADDING : undefined,
83
- transform: isCentered(position) ? 'translateX(-50%)' : undefined,
84
- zIndex: 9000,
85
- } }, (_a = notificationsByPosition[position]) === null || _a === void 0 ? void 0 : _a.map((notification) => (React.createElement(Notification, { key: notification.id, notification: notification, onDismiss: onDismiss })))));
86
- })));
87
- };
88
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTm90aWZpY2F0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21vbGVjdWxlcy9Ob3RpZmljYXRpb24vTm90aWZpY2F0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQWlCLGFBQWEsRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxNQUFNLE9BQU8sQ0FBQztBQUMvRixPQUFPLE9BQU8sTUFBTSxnQkFBZ0IsQ0FBQztBQUVyQyxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDbEQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUF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VM7Z0JBQ3ZELElBQUksRUFBRSxVQUFVLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxTQUFTO2dCQUNwRixTQUFTLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsU0FBUztnQkFDaEUsTUFBTSxFQUFFLElBQUk7YUFDYixJQUVBLE1BQUEsdUJBQXVCLENBQUMsUUFBUSxDQUFDLDBDQUFFLEdBQUcsQ0FBQyxDQUFDLFlBQVksRUFBRSxFQUFFLENBQUMsQ0FDeEQsb0JBQUMsWUFBWSxJQUFDLEdBQUcsRUFBRSxZQUFZLENBQUMsRUFBRSxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFFLFNBQVMsR0FBSSxDQUN6RixDQUFDLENBQ00sQ0FDWCxDQUFDO0lBQ0osQ0FBQyxDQUFDLENBQ0UsQ0FDUCxDQUFDO0FBQ0osQ0FBQyxDQUFDIn0=
@@ -1,44 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import React from 'react';
11
- import { render, screen } from '@testing-library/react';
12
- import userEvent from '@testing-library/user-event';
13
- import { Button, NotificationConsumer, NotificationProvider, useNotification } from '../../../src/system';
14
- describe('<Notification />', () => {
15
- let user;
16
- beforeEach(() => {
17
- user = userEvent.setup();
18
- render(React.createElement(Context, null));
19
- });
20
- const Context = () => (React.createElement(NotificationProvider, null,
21
- React.createElement(Component, null),
22
- React.createElement(NotificationConsumer, null)));
23
- const Component = () => {
24
- const notify = useNotification();
25
- const onClick = () => {
26
- notify({ message: 'Hello World', id: 'uuid-' + Math.random });
27
- };
28
- return React.createElement(Button, { onClick: onClick }, "Notify");
29
- };
30
- it('dispatched notifications are rendered', () => __awaiter(void 0, void 0, void 0, function* () {
31
- const button = screen.getByRole('button', { name: 'Notify' });
32
- yield user.click(button);
33
- yield screen.findByText('Hello World');
34
- }));
35
- it('multiple notifications are rendered', () => __awaiter(void 0, void 0, void 0, function* () {
36
- const button = screen.getByRole('button', { name: 'Notify' });
37
- yield user.click(button);
38
- yield user.click(button);
39
- yield user.click(button);
40
- const notifications = yield screen.findAllByText('Hello World');
41
- expect(notifications.length).toBe(3);
42
- }));
43
- });
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTm90aWZpY2F0aW9uLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbW9sZWN1bGVzL05vdGlmaWNhdGlvbi9Ob3RpZmljYXRpb24uc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFDO0FBQzFCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDeEQsT0FBTyxTQUFTLE1BQU0sNkJBQTZCLENBQUM7QUFFcEQsT0FBTyxFQUFFLE1BQU0sRUFBRSxvQkFBb0IsRUFBRSxvQkFBb0IsRUFBRSxlQUFlLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFFakcsUUFBUSxDQUFDLGtCQ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QyxDQUFDLENBQUEsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLHFDQUFxQyxFQUFFLEdBQVMsRUFBRTtRQUNuRCxNQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUsQ0FBQyxDQUFDO1FBQzlELE1BQU0sSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN6QixNQUFNLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDekIsTUFBTSxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3pCLE1BQU0sYUFBYSxHQUFHLE1BQU0sTUFBTSxDQUFDLGFBQWEsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUNoRSxNQUFNLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN2QyxDQUFDLENBQUEsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUMifQ==
@@ -1,37 +0,0 @@
1
- export declare type Position = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'top' | 'bottom';
2
- export declare type NotificationId = ReturnType<typeof crypto.randomUUID> | string;
3
- export declare type Variant = 'danger' | 'default';
4
- declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
5
- export declare type Notification = {
6
- /**
7
- * The duration to show the notification in milliseconds. Set to {@link Infinity} to
8
- * make the notification persistent. Persistent notifications can only be hidden by user
9
- * input. type "danger" is persistent by default.
10
- */
11
- duration: number;
12
- position: Position;
13
- title?: string;
14
- message: string;
15
- variant: Variant;
16
- /**
17
- * Either ID provided by the dispatcher or if not provided it will be generated.
18
- * This will be used to dismiss and control the notification you have dispatched.
19
- */
20
- id: NotificationId;
21
- };
22
- export declare type DispatchableNotification = PartialBy<Notification, 'id' | 'duration' | 'position' | 'variant'>;
23
- export declare type State = {
24
- notifications: Notification[];
25
- };
26
- export declare enum ActionTypes {
27
- Notify = 0,
28
- Dismiss = 1
29
- }
30
- export declare type Actions = {
31
- type: ActionTypes.Notify;
32
- notification: DispatchableNotification;
33
- } | {
34
- type: ActionTypes.Dismiss;
35
- notificationId: NotificationId;
36
- };
37
- export {};
@@ -1,6 +0,0 @@
1
- export var ActionTypes;
2
- (function (ActionTypes) {
3
- ActionTypes[ActionTypes["Notify"] = 0] = "Notify";
4
- ActionTypes[ActionTypes["Dismiss"] = 1] = "Dismiss";
5
- })(ActionTypes || (ActionTypes = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbW9sZWN1bGVzL05vdGlmaWNhdGlvbi90eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QkEsTUFBTSxDQUFOLElBQVksV0FHWDtBQUhELFdBQVksV0FBVztJQUNyQixpREFBTSxDQUFBO0lBQ04sbURBQU8sQ0FBQTtBQUNULENBQUMsRUFIVyxXQUFXLEtBQVgsV0FBVyxRQUd0QiJ9