@aivenio/aquarium 1.1.0 → 1.2.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 (48) hide show
  1. package/dist/_variables.scss +20 -2
  2. package/dist/_variables_timescale.scss +20 -2
  3. package/dist/atoms.cjs +37 -11
  4. package/dist/atoms.mjs +29 -9
  5. package/dist/src/common/Banner/Banner.js +7 -4
  6. package/dist/src/common/DataList/DataList.d.ts +24 -0
  7. package/dist/src/common/DataList/DataList.js +54 -0
  8. package/dist/src/common/DropdownMenu/DropdownMenu.d.ts +3 -1
  9. package/dist/src/common/DropdownMenu/DropdownMenu.js +5 -3
  10. package/dist/src/common/Table/Table.d.ts +8 -3
  11. package/dist/src/common/Table/Table.js +20 -10
  12. package/dist/src/components/Carousel/Carousel.d.ts +16 -0
  13. package/dist/src/components/Carousel/Carousel.js +89 -0
  14. package/dist/src/components/Chip/Chip.d.ts +1 -0
  15. package/dist/src/components/Chip/Chip.js +2 -2
  16. package/dist/src/components/DataList/DataList.d.ts +13 -0
  17. package/dist/src/components/DataList/DataList.js +24 -0
  18. package/dist/src/components/DataTable/DataTable.d.ts +5 -92
  19. package/dist/src/components/DataTable/DataTable.js +9 -28
  20. package/dist/src/components/Dropdown/Dropdown.js +1 -1
  21. package/dist/src/components/DropdownMenu/DropdownMenu.d.ts +8 -0
  22. package/dist/src/components/DropdownMenu/DropdownMenu.js +18 -15
  23. package/dist/src/components/Section/Section.js +2 -2
  24. package/dist/src/components/Table/Table.js +2 -2
  25. package/dist/src/components/Template/Template.d.ts +6 -1
  26. package/dist/src/components/Template/Template.js +7 -2
  27. package/dist/src/components/index.d.ts +6 -1
  28. package/dist/src/components/index.js +7 -2
  29. package/dist/src/utils/Blueprint.d.ts +6 -1
  30. package/dist/src/utils/Blueprint.js +4 -2
  31. package/dist/src/utils/table/types.d.ts +129 -0
  32. package/dist/src/utils/table/types.js +6 -0
  33. package/dist/src/utils/table/useScrollTarget.d.ts +2 -0
  34. package/dist/src/utils/table/useScrollTarget.js +16 -0
  35. package/dist/src/{common/Table/Table.utils.d.ts → utils/table/useTableSelect.d.ts} +0 -3
  36. package/dist/src/utils/table/useTableSelect.js +27 -0
  37. package/dist/src/utils/table/useTableSort.d.ts +2 -0
  38. package/dist/src/utils/table/useTableSort.js +19 -0
  39. package/dist/styles.css +63 -6
  40. package/dist/styles_timescaledb.css +63 -6
  41. package/dist/system.cjs +937 -675
  42. package/dist/system.mjs +931 -673
  43. package/dist/tsconfig.module.tsbuildinfo +1 -1
  44. package/dist/types/ActionType.d.ts +2 -0
  45. package/dist/types/tailwindGenerated.d.ts +1 -1
  46. package/dist/types/utils.d.ts +3 -0
  47. package/package.json +3 -3
  48. package/dist/src/common/Table/Table.utils.js +0 -41
@@ -17,4 +17,6 @@ export declare type AsyncActionType = ActionType & {
17
17
  export declare type LinkActionType = BaseActionType & {
18
18
  href: string;
19
19
  text: string;
20
+ target?: string;
21
+ rel?: string;
20
22
  };
@@ -1 +1 @@
1
- export declare type ClassNames = "-m-2" | "-z-10" | "\!container" | "\!inline" | "\[\&\>\*\:not\(\:first-child\)\]\:-ml-3" | "\[\&\>div\:first-child\]\:px-5" | "\[\&\>path\]\:stroke-2" | "\[\&\>path\]\:stroke-grey-30" | "\[\&\>path\]\:stroke-white" | "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" | "bg-cover" | "bg-current" | "bg-error-0" | "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-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-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-info-70" | "border-navyBlue-100" | "border-none" | "border-primary-80" | "border-solid" | "border-spacing-0" | "border-transparent" | "bottom-0" | "break-all" | "capitalize" | "children\:border-grey-10" | "children\:inline-block" | "children\:last\:border-b-0" | "col-start-1" | "col-start-2" | "col-start-3" | "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-wrap" | "focus-visible\:bg-grey-0" | "focus-visible\:border-info-70" | "focus-visible\:outline-0" | "focus-visible\:ring-2" | "focus-visible\:ring-grey-50" | "focus-visible\:ring-inset" | "focus-visible\:ring-primary-100" | "focus-visible\:text-grey-80" | "focus-visible\:text-grey-90" | "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" | "font-medium" | "font-normal" | "font-semibold" | "from-white" | "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\]" | "group" | "group-hover\:bg-grey-30" | "group-hover\:visible" | "grow" | "grow-0" | "h-1" | "h-1px" | "h-2" | "h-3" | "h-4" | "h-5" | "h-6" | "h-\[174px\]" | "h-\[1px\]" | "h-\[20px\]" | "h-\[225px\]" | "h-\[25px\]" | "h-\[32px\]" | "h-\[50px\]" | "h-\[56px\]" | "h-\[6px\]" | "h-full" | "hidden" | "hover\:bg-grey-0" | "hover\:bg-grey-5" | "hover\:bg-primary-70" | "hover\:border-grey-20" | "hover\:border-grey-50" | "hover\:cursor-pointer" | "hover\:no-underline" | "hover\:ring-grey-50" | "hover\:text-grey-80" | "hover\:text-grey-90" | "hover\:text-primary-70" | "hover\:text-primary-80" | "inline" | "inline-block" | "inline-flex" | "inline-grid" | "inset-0" | "inset-y-0" | "invisible" | "italic" | "items-center" | "justify-between" | "justify-center" | "justify-end" | "justify-self-center" | "leading-\[0px\]" | "leading-\[18px\]" | "leading-none" | "left-0" | "left-1\/2" | "left-2" | "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\]" | "mb-2" | "mb-3" | "mb-5" | "mb-\[-2px\]" | "mb-\[7px\]" | "min-h-full" | "min-w-0" | "min-w-full" | "ml-2" | "ml-3" | "ml-4" | "mr-1" | "mr-4" | "mt-1" | "mt-2" | "mt-4" | "mt-5" | "mx-0" | "mx-1" | "mx-2" | "mx-3" | "mx-7" | "my-1" | "my-4" | "no-arrow" | "no-arrows" | "no-underline" | "object-cover" | "opacity-0" | "opacity-40" | "opacity-70" | "outline-none" | "overflow-hidden" | "overflow-x-hidden" | "overflow-y-auto" | "overline" | "p-2" | "p-3" | "p-4" | "p-5" | "p-6" | "pb-3" | "pb-6" | "peer" | "peer-focus\:border" | "pl-4" | "pl-7" | "placeholder\:text-grey-40" | "pointer-events-none" | "pr-4" | "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-7" | "px-\[1px\]" | "px-\[4px\]" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-7" | "py-\[14px\]" | "py-\[6px\]" | "relative" | "resize" | "resize-none" | "right-0" | "ring-1" | "ring-2" | "ring-grey-30" | "ring-inset" | "ring-offset-0" | "rotate-45" | "rounded" | "rounded-full" | "rounded-sm" | "row-start-1" | "scrollbar-hide" | "self-center" | "self-start" | "shadow-16dp" | "shadow-2dp" | "shadow-4dp" | "shrink" | "sticky" | "stroke-grey-30" | "stroke-white" | "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-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-2" | "transform" | "transition" | "transition-all" | "translate-x-5" | "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-default" | "typography-caption-small" | "typography-heading-2xl" | "typography-heading-3xl" | "typography-heading-4xl" | "typography-heading-5xl" | "typography-heading-large" | "typography-heading-xl" | "typography-overline-default" | "typography-overline-small" | "underline" | "underline-offset-2" | "uppercase" | "via-white" | "visible" | "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-full" | "whitespace-nowrap" | "z-0" | "z-10" | "z-20" | "z-40" | "z-modal";
1
+ export declare type ClassNames = "-m-2" | "-z-10" | "\!container" | "\!inline" | "\!table" | "\[\&\>\*\:not\(\:first-child\)\]\:-ml-3" | "\[\&\>div\:first-child\]\:px-5" | "\[\&\>path\]\:stroke-2" | "\[\&\>path\]\:stroke-grey-30" | "\[\&\>path\]\:stroke-white" | "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" | "bg-cover" | "bg-current" | "bg-error-0" | "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-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-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-info-70" | "border-navyBlue-100" | "border-none" | "border-primary-80" | "border-solid" | "border-spacing-0" | "border-transparent" | "bottom-0" | "break-all" | "capitalize" | "children\:border-grey-10" | "children\:inline-block" | "children\:last\:border-b-0" | "col-start-1" | "col-start-2" | "col-start-3" | "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\: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" | "font-medium" | "font-normal" | "font-semibold" | "from-white" | "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\:bg-grey-30" | "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-\[174px\]" | "h-\[1px\]" | "h-\[20px\]" | "h-\[225px\]" | "h-\[25px\]" | "h-\[32px\]" | "h-\[50px\]" | "h-\[56px\]" | "h-\[6px\]" | "h-full" | "hidden" | "hover\:bg-grey-0" | "hover\:bg-grey-5" | "hover\:bg-primary-70" | "hover\:border-grey-20" | "hover\:border-grey-50" | "hover\:cursor-pointer" | "hover\:no-underline" | "hover\:ring-grey-50" | "hover\:text-grey-80" | "hover\:text-grey-90" | "hover\:text-primary-70" | "hover\:text-primary-80" | "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" | "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\]" | "mb-2" | "mb-3" | "mb-5" | "mb-\[-2px\]" | "mb-\[7px\]" | "min-h-\[50px\]" | "min-h-full" | "min-w-0" | "min-w-full" | "ml-2" | "ml-3" | "mr-1" | "mr-4" | "mt-1" | "mt-2" | "mt-4" | "mt-5" | "mx-0" | "mx-1" | "mx-2" | "mx-3" | "mx-7" | "my-1" | "my-4" | "no-arrow" | "no-arrows" | "no-underline" | "object-cover" | "opacity-0" | "opacity-40" | "opacity-70" | "outline-none" | "overflow-hidden" | "overflow-x-hidden" | "overflow-x-scroll" | "overflow-y-auto" | "overline" | "p-2" | "p-3" | "p-4" | "p-5" | "p-6" | "pb-3" | "pb-6" | "peer" | "peer-focus\:border" | "pl-4" | "pl-7" | "placeholder\:text-grey-40" | "pointer-events-none" | "pr-4" | "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-7" | "px-\[1px\]" | "px-\[4px\]" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-7" | "py-\[14px\]" | "py-\[6px\]" | "relative" | "resize" | "resize-none" | "right-0" | "ring-1" | "ring-2" | "ring-grey-30" | "ring-inset" | "ring-offset-0" | "rotate-45" | "rounded" | "rounded-full" | "rounded-sm" | "row-start-1" | "scroll-smooth" | "scrollbar-hide" | "self-center" | "self-start" | "shadow-16dp" | "shadow-2dp" | "shadow-4dp" | "shrink" | "snap-mandatory" | "snap-start" | "snap-x" | "sticky" | "stroke-grey-30" | "stroke-white" | "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-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-2" | "transform" | "transition" | "transition-all" | "translate-x-5" | "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-default" | "typography-caption-small" | "typography-heading-2xl" | "typography-heading-3xl" | "typography-heading-4xl" | "typography-heading-5xl" | "typography-heading-large" | "typography-heading-xl" | "typography-overline-default" | "typography-overline-small" | "underline" | "underline-offset-2" | "uppercase" | "via-white" | "visible" | "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-full" | "whitespace-nowrap" | "z-0" | "z-10" | "z-20" | "z-40" | "z-modal";
@@ -3,3 +3,6 @@ export declare const isComponentType: <T>(c: ReactNode, type: ElementType<T>) =>
3
3
  export declare type Either<A, B> = (Partial<Record<keyof B, never>> & A) | (Partial<Record<keyof A, never>> & B);
4
4
  export declare type AcceptEmpty = boolean | null | undefined;
5
5
  export declare type EmptyOrOneOrMore<T> = React.ReactElement<T> | AcceptEmpty | Array<React.ReactElement<T> | AcceptEmpty>;
6
+ export declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
7
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
8
+ }[Keys];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aivenio/aquarium",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Aiven Aquarium design system",
5
5
  "main": "dist/system.cjs",
6
6
  "module": "dist/system.mjs",
@@ -163,9 +163,9 @@
163
163
  "@iconify/types": "^1.0.12",
164
164
  "@popperjs/core": "^2.11.5",
165
165
  "classnames": "^2.3.1",
166
- "downshift": "^7.0.1",
166
+ "downshift": "^7.0.5",
167
167
  "match-sorter": "^6.3.1",
168
- "react-aria": "^3.20.0",
168
+ "react-aria": "^3.22.0",
169
169
  "react-popper": "^2.3.0",
170
170
  "react-stately": "^3.18.0"
171
171
  },
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- export const useTableSelect = (data, { key }) => {
3
- const [selected, setSelected] = React.useState([]);
4
- const allSelected = selected.length === data.length;
5
- const isSelected = (dot) => selected.includes(dot[key]);
6
- const selectAll = () => setSelected(data.map((dot) => dot[key]));
7
- const selectOnlyOne = (dot) => setSelected([dot[key]]);
8
- const unselectAll = () => setSelected([]);
9
- const toggle = (dot) => {
10
- if (isSelected(dot)) {
11
- setSelected((current) => current.filter((selectedDot) => selectedDot !== dot[key]));
12
- }
13
- else {
14
- setSelected((current) => [...current, dot[key]]);
15
- }
16
- };
17
- const toggleAll = () => (allSelected ? unselectAll() : selectAll());
18
- return {
19
- selected,
20
- allSelected,
21
- toggle,
22
- toggleAll,
23
- isSelected,
24
- selectOnlyOne,
25
- };
26
- };
27
- export const useScrollTarget = (callback) => {
28
- const targetRef = React.useRef(null);
29
- React.useLayoutEffect(() => {
30
- const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
31
- root: null,
32
- rootMargin: `0px 0px 200px 0px`,
33
- });
34
- if (targetRef.current) {
35
- observer.observe(targetRef.current);
36
- }
37
- return () => observer.disconnect();
38
- }, []);
39
- return targetRef;
40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