@algolia/satellite 1.0.0-beta.145 → 1.0.0-beta.147

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 (114) hide show
  1. package/cjs/AutoComplete/AutoComplete.js +4 -4
  2. package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +1 -1
  3. package/cjs/Button/Button.tailwind.d.ts +1 -1
  4. package/cjs/Button/ButtonGroup.d.ts +2 -1
  5. package/cjs/Card/Card.tailwind.d.ts +1 -1
  6. package/cjs/Checkbox/Checkbox.tailwind.d.ts +1 -1
  7. package/cjs/DatePicker/DatePicker.tailwind.d.ts +2 -2
  8. package/cjs/DatePicker/DatePicker.tailwind.js +1 -1
  9. package/cjs/DatePicker/components/Calendar.js +2 -7
  10. package/cjs/DatePicker/components/NavBar.js +26 -14
  11. package/cjs/DatePicker/types.d.ts +3 -7
  12. package/cjs/DatePicker/utils.d.ts +1 -8
  13. package/cjs/DatePicker/utils.js +1 -28
  14. package/cjs/Dropdown/components/DropdownLinkItem.d.ts +1 -0
  15. package/cjs/EmptyState/EmptyState.tailwind.d.ts +1 -1
  16. package/cjs/Flag/Flag.tailwind.d.ts +1 -1
  17. package/cjs/FlexGrid/FlexGrid.tailwind.d.ts +1 -1
  18. package/cjs/HelpUnderline/HelpUnderline.tailwind.d.ts +1 -1
  19. package/cjs/Input/Input.tailwind.d.ts +1 -1
  20. package/cjs/InstantSearch/InstantSearch.tailwind.d.ts +1 -1
  21. package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +1 -1
  22. package/cjs/Link/BaseLink.d.ts +6 -2
  23. package/cjs/Link/ButtonLink.d.ts +3 -1
  24. package/cjs/Link/IconButtonLink.d.ts +3 -1
  25. package/cjs/Link/Link.d.ts +2 -0
  26. package/cjs/Medallion/Medallion.tailwind.d.ts +1 -1
  27. package/cjs/Modal/Modal.tailwind.d.ts +1 -1
  28. package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  29. package/cjs/Pagination/CompactPagination/CompactPagination.js +3 -0
  30. package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +1 -1
  31. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.d.ts +1 -1
  32. package/cjs/RadioGroup/RadioButton.tailwind.d.ts +1 -1
  33. package/cjs/RangeSlider/RangeSlider.tailwind.d.ts +1 -1
  34. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +1 -1
  35. package/cjs/Select/Select.tailwind.d.ts +1 -1
  36. package/cjs/Sidebar/SidebarButtonLink.d.ts +7 -1
  37. package/cjs/Sidebar/SidebarButtonLink.js +15 -19
  38. package/cjs/Sidebar/SidebarLink.d.ts +2 -1
  39. package/cjs/Switch/Switch.tailwind.d.ts +1 -1
  40. package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +1 -1
  41. package/cjs/Tables/Table/Table.tailwind.d.ts +1 -1
  42. package/cjs/Tabs/ContentTabs.js +18 -41
  43. package/cjs/Tabs/Tabs.tailwind.d.ts +1 -1
  44. package/cjs/Tag/Tag.tailwind.d.ts +1 -1
  45. package/cjs/TextArea/TextArea.tailwind.d.ts +1 -1
  46. package/cjs/TextWrap/TextWrap.d.ts +1 -0
  47. package/cjs/Toggle/Toggle.tailwind.d.ts +1 -1
  48. package/cjs/Tooltip/Tooltip.tailwind.d.ts +1 -1
  49. package/cjs/Typography/Typography.tailwind.d.ts +1 -1
  50. package/cjs/Typography/Typography.tailwind.js +3 -3
  51. package/cjs/UserContent/UserContent.js +4 -5
  52. package/cjs/UserContent/UserContent.tailwind.d.ts +1 -1
  53. package/cjs/UserContent/UserContent.tailwind.js +2 -2
  54. package/cjs/styles/base.tailwind.d.ts +1 -1
  55. package/cjs/styles/helpers/prefixTailwindClassName.js +10 -10
  56. package/cjs/utilities/utilities.tailwind.d.ts +1 -1
  57. package/esm/AutoComplete/AutoComplete.js +4 -4
  58. package/esm/AutoComplete/AutoComplete.tailwind.d.ts +1 -1
  59. package/esm/Button/Button.tailwind.d.ts +1 -1
  60. package/esm/Button/ButtonGroup.d.ts +2 -1
  61. package/esm/Card/Card.tailwind.d.ts +1 -1
  62. package/esm/Checkbox/Checkbox.tailwind.d.ts +1 -1
  63. package/esm/DatePicker/DatePicker.tailwind.d.ts +2 -2
  64. package/esm/DatePicker/DatePicker.tailwind.js +1 -1
  65. package/esm/DatePicker/components/Calendar.js +2 -6
  66. package/esm/DatePicker/components/NavBar.js +25 -14
  67. package/esm/DatePicker/types.d.ts +3 -7
  68. package/esm/DatePicker/utils.d.ts +1 -8
  69. package/esm/DatePicker/utils.js +1 -19
  70. package/esm/Dropdown/components/DropdownLinkItem.d.ts +1 -0
  71. package/esm/EmptyState/EmptyState.tailwind.d.ts +1 -1
  72. package/esm/Flag/Flag.tailwind.d.ts +1 -1
  73. package/esm/FlexGrid/FlexGrid.tailwind.d.ts +1 -1
  74. package/esm/HelpUnderline/HelpUnderline.tailwind.d.ts +1 -1
  75. package/esm/Input/Input.tailwind.d.ts +1 -1
  76. package/esm/InstantSearch/InstantSearch.tailwind.d.ts +1 -1
  77. package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +1 -1
  78. package/esm/Link/BaseLink.d.ts +6 -2
  79. package/esm/Link/ButtonLink.d.ts +3 -1
  80. package/esm/Link/IconButtonLink.d.ts +3 -1
  81. package/esm/Link/Link.d.ts +2 -0
  82. package/esm/Medallion/Medallion.tailwind.d.ts +1 -1
  83. package/esm/Modal/Modal.tailwind.d.ts +1 -1
  84. package/esm/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  85. package/esm/Pagination/CompactPagination/CompactPagination.js +4 -0
  86. package/esm/ProgressBar/ProgressBar.tailwind.d.ts +1 -1
  87. package/esm/ProgressSpinner/ProgressSpinner.tailwind.d.ts +1 -1
  88. package/esm/RadioGroup/RadioButton.tailwind.d.ts +1 -1
  89. package/esm/RangeSlider/RangeSlider.tailwind.d.ts +1 -1
  90. package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +1 -1
  91. package/esm/Select/Select.tailwind.d.ts +1 -1
  92. package/esm/Sidebar/SidebarButtonLink.d.ts +7 -1
  93. package/esm/Sidebar/SidebarButtonLink.js +15 -18
  94. package/esm/Sidebar/SidebarLink.d.ts +2 -1
  95. package/esm/Switch/Switch.tailwind.d.ts +1 -1
  96. package/esm/Tables/DataTable/DataTable.tailwind.d.ts +1 -1
  97. package/esm/Tables/Table/Table.tailwind.d.ts +1 -1
  98. package/esm/Tabs/ContentTabs.js +18 -39
  99. package/esm/Tabs/Tabs.tailwind.d.ts +1 -1
  100. package/esm/Tag/Tag.tailwind.d.ts +1 -1
  101. package/esm/TextArea/TextArea.tailwind.d.ts +1 -1
  102. package/esm/TextWrap/TextWrap.d.ts +1 -0
  103. package/esm/Toggle/Toggle.tailwind.d.ts +1 -1
  104. package/esm/Tooltip/Tooltip.tailwind.d.ts +1 -1
  105. package/esm/Typography/Typography.tailwind.d.ts +1 -1
  106. package/esm/Typography/Typography.tailwind.js +3 -3
  107. package/esm/UserContent/UserContent.js +4 -4
  108. package/esm/UserContent/UserContent.tailwind.d.ts +1 -1
  109. package/esm/UserContent/UserContent.tailwind.js +2 -2
  110. package/esm/styles/base.tailwind.d.ts +1 -1
  111. package/esm/styles/helpers/prefixTailwindClassName.js +10 -10
  112. package/esm/utilities/utilities.tailwind.d.ts +1 -1
  113. package/package.json +3 -3
  114. package/satellite.min.css +1 -1
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonBaseProps } from "../Button/IconButton";
3
3
  import type { ExtractProps } from "../Button/types";
4
- export declare type IconButtonLinkProps = IconButtonBaseProps & ExtractProps<"a">;
4
+ export declare type IconButtonLinkProps = IconButtonBaseProps & ExtractProps<"a"> & {
5
+ href: string;
6
+ };
5
7
  export declare const IconButtonLink: ({ href, onClick, ...props }: IconButtonLinkProps) => JSX.Element;
6
8
  export default IconButtonLink;
@@ -1,10 +1,12 @@
1
1
  import type { AnchorHTMLAttributes } from "react";
2
2
  import type { IconComponentType } from "../types";
3
3
  export declare type LinkProps = {
4
+ href: string;
4
5
  startIcon?: IconComponentType;
5
6
  endIcon?: IconComponentType;
6
7
  } & AnchorHTMLAttributes<HTMLAnchorElement>;
7
8
  export declare const Link: import("react").ForwardRefExoticComponent<{
9
+ href: string;
8
10
  startIcon?: IconComponentType | undefined;
9
11
  endIcon?: IconComponentType | undefined;
10
12
  } & AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -1,5 +1,5 @@
1
1
  export = medallionPlugin;
2
2
  declare const medallionPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = modalPlugin;
2
2
  declare const modalPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -23,7 +23,9 @@ export declare type IndeterminateCompactPaginationProps = BaseCompactPaginationP
23
23
  nextDisabled?: boolean;
24
24
  };
25
25
  export declare type CompactPaginationProps = DeterminateCompactPaginationProps | IndeterminateCompactPaginationProps;
26
+ /** @ignore */
26
27
  export declare const isDeterminateCompactPaginationProps: (props: CompactPaginationProps) => props is DeterminateCompactPaginationProps;
28
+ /** @ignore */
27
29
  export declare const isIndeterminateCompactPaginationProps: (props: CompactPaginationProps) => props is IndeterminateCompactPaginationProps;
28
30
  export declare const CompactPagination: (props: CompactPaginationProps) => JSX.Element;
29
31
  export default CompactPagination;
@@ -22,9 +22,13 @@ var DEFAULT_COMPACT_PAGINATION_LOCALE = {
22
22
  return typeof nbPages === "number" ? "Page ".concat(page, " of ").concat(nbPages) : "Page ".concat(page, " of many");
23
23
  }
24
24
  };
25
+
26
+ /** @ignore */
25
27
  export var isDeterminateCompactPaginationProps = function isDeterminateCompactPaginationProps(props) {
26
28
  return "nbPages" in props;
27
29
  };
30
+ /** @ignore */
31
+
28
32
  export var isIndeterminateCompactPaginationProps = function isIndeterminateCompactPaginationProps(props) {
29
33
  return !isDeterminateCompactPaginationProps(props);
30
34
  };
@@ -1,5 +1,5 @@
1
1
  export = progressBarPlugin;
2
2
  declare const progressBarPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = progressSpinnerPlugin;
2
2
  declare const progressSpinnerPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = radioButtonPlugin;
2
2
  declare const radioButtonPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = rangeSliderPlugin;
2
2
  declare const rangeSliderPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = scrollIndicatorPlugin;
2
2
  declare const scrollIndicatorPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = selectPlugin;
2
2
  declare const selectPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -8,7 +8,13 @@ export interface SidebarButtonLinkProps {
8
8
  id?: string;
9
9
  icon: SidebarButtonLinkIcon;
10
10
  href: string;
11
- children: ReactNode;
12
11
  onClick?: MouseEventHandler<HTMLAnchorElement>;
12
+ disabled?: boolean;
13
+ /**
14
+ * Alternative content for the tooltip.
15
+ * @default children
16
+ */
17
+ tooltipContent?: ReactNode;
18
+ children: ReactNode;
13
19
  }
14
20
  export declare const SidebarButtonLink: FC<SidebarButtonLinkProps>;
@@ -9,7 +9,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
 
11
11
  import { useState } from "react";
12
- import { BaseLink } from "../Link";
13
12
  import stl from "../styles/helpers/satellitePrefixer";
14
13
  import { TooltipWrapper } from "../Tooltip";
15
14
  import useLinkProps from "../utils/useLinkProps";
@@ -18,7 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
18
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
18
 
20
19
  var Tooltip = function Tooltip(_ref) {
21
- var title = _ref.title,
20
+ var content = _ref.content,
22
21
  children = _ref.children;
23
22
  return /*#__PURE__*/_jsx(TooltipWrapper, {
24
23
  placement: "right",
@@ -30,40 +29,38 @@ var Tooltip = function Tooltip(_ref) {
30
29
  offset: [0, 32]
31
30
  }
32
31
  }],
33
- content: title,
32
+ content: content,
34
33
  wrapperClassName: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["block"]))),
35
34
  interactive: false,
36
35
  children: children
37
36
  });
38
37
  };
39
38
 
40
- export var SidebarButtonLink = function SidebarButtonLink(_ref2) {
41
- var id = _ref2.id,
42
- icon = _ref2.icon,
43
- href = _ref2.href,
44
- children = _ref2.children,
45
- onClick = _ref2.onClick;
39
+ export var SidebarButtonLink = function SidebarButtonLink(props) {
40
+ var id = props.id,
41
+ icon = props.icon,
42
+ href = props.href,
43
+ disabled = props.disabled,
44
+ children = props.children;
46
45
 
47
46
  var _useSidebarContext = useSidebarContext(),
48
47
  isLinkActive = _useSidebarContext.isLinkActive,
49
48
  collapsed = _useSidebarContext.collapsed;
50
49
 
51
- var linkProps = useLinkProps({
52
- href: href,
53
- onClick: onClick
54
- });
50
+ var linkProps = useLinkProps(props);
55
51
 
56
52
  var _useState = useState(false),
57
53
  _useState2 = _slicedToArray(_useState, 2),
58
54
  isInteractedWith = _useState2[0],
59
55
  setIsInteractedWith = _useState2[1];
60
56
 
61
- var isActive = isLinkActive(href);
62
- var showColors = isActive || isInteractedWith;
57
+ var isActive = !disabled && isLinkActive(href);
58
+ var showColors = !disabled && (isActive || isInteractedWith);
63
59
  var Icon = "active" in icon ? showColors ? icon.active : icon.inactive : icon;
60
+ var tooltipContent = "tooltipContent" in props ? props.tooltipContent : children;
64
61
  return /*#__PURE__*/_jsx(Tooltip, {
65
- title: collapsed ? children : null,
66
- children: /*#__PURE__*/_jsxs(BaseLink, _objectSpread(_objectSpread({}, linkProps), {}, {
62
+ content: collapsed ? tooltipContent : null,
63
+ children: /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({}, linkProps), {}, {
67
64
  id: id,
68
65
  onMouseEnter: function onMouseEnter() {
69
66
  return setIsInteractedWith(true);
@@ -77,7 +74,7 @@ export var SidebarButtonLink = function SidebarButtonLink(_ref2) {
77
74
  onBlur: function onBlur() {
78
75
  return setIsInteractedWith(false);
79
76
  },
80
- className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n h-8 min-w-8 w-full rounded\n flex items-center space-x-3\n border border-transparent\n display-body hover:no-underline\n focus:outline-none focus:border-grey-500\n ", "\n ", "\n ", "\n "])), isActive ? "shadow-z100" : "hover:border-grey-200", isActive && "bg-gradient-to-b from-white to-grey-50", collapsed ? "pl-2" : "px-2"),
77
+ className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n h-8 min-w-8 w-full rounded\n flex items-center space-x-3\n border border-transparent\n display-body\n hover:no-underline focus:no-underline\n ", "\n ", "\n ", "\n ", "\n "])), disabled ? "cursor-not-allowed opacity-70" : "focus:border-grey-500", isActive ? "shadow-z100" : !disabled && "hover:border-grey-200", isActive && "bg-gradient-to-b from-white to-grey-50", collapsed ? "pl-2" : "px-2"),
81
78
  "aria-current": isActive,
82
79
  children: [/*#__PURE__*/_jsx(Icon, {
83
80
  className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["", " ml-[-3px]"])), showColors ? "text-accent-600" : "text-grey-400"),
@@ -2,7 +2,8 @@ import type { FC, ReactNode } from "react";
2
2
  import type { IconComponentType } from "../types";
3
3
  export declare type SidebarLinkProps = {
4
4
  icon: IconComponentType;
5
+ href: string;
5
6
  disabled?: boolean;
6
7
  children: ReactNode;
7
- } & Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "id" | "className" | "href" | "target" | "rel" | "aria-label" | "onClick">;
8
+ } & Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "id" | "className" | "target" | "rel" | "aria-label" | "onClick">;
8
9
  export declare const SidebarLink: FC<SidebarLinkProps>;
@@ -1,5 +1,5 @@
1
1
  export = switchPlugin;
2
2
  declare const switchPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = datatablePlugin;
2
2
  declare const datatablePlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = tablePlugin;
2
2
  declare const tablePlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,11 +1,9 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
 
4
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
4
 
6
- import { Tabs as ReachTabs, Tab, TabList, TabPanel, TabPanels } from "@reach/tabs";
5
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@radix-ui/react-tabs";
7
6
  import cx from "clsx";
8
- import { useEffect, useState } from "react";
9
7
  import Badge from "../Badge";
10
8
  import stl from "../styles/helpers/satellitePrefixer";
11
9
  import { ACTIVE_UNDERLINE_VARIANT_CLASSNAMES } from "./utils";
@@ -18,31 +16,13 @@ export var ContentTabs = function ContentTabs(_ref) {
18
16
  _ref$defaultIndex = _ref.defaultIndex,
19
17
  defaultIndex = _ref$defaultIndex === void 0 ? 0 : _ref$defaultIndex,
20
18
  onChange = _ref.onChange;
21
-
22
- var _useState = useState(tabIndex !== null && tabIndex !== void 0 ? tabIndex : defaultIndex),
23
- _useState2 = _slicedToArray(_useState, 2),
24
- internalTabIndex = _useState2[0],
25
- setInternalTabIndex = _useState2[1];
26
-
27
- useEffect(function () {
28
- if (tabIndex !== undefined && internalTabIndex !== tabIndex) {
29
- setInternalTabIndex(tabIndex);
30
- }
31
- }, [internalTabIndex, tabIndex]);
32
-
33
- var handleTabsChange = function handleTabsChange(index) {
34
- onChange === null || onChange === void 0 ? void 0 : onChange(index);
35
-
36
- if (tabIndex === undefined) {
37
- setInternalTabIndex(index);
38
- }
39
- };
40
-
41
- return /*#__PURE__*/_jsxs(ReachTabs, {
42
- index: internalTabIndex,
43
- onChange: handleTabsChange,
44
- defaultIndex: internalTabIndex,
45
- children: [/*#__PURE__*/_jsx(TabList, {
19
+ return /*#__PURE__*/_jsxs(Tabs, {
20
+ value: typeof tabIndex !== "undefined" ? String(tabIndex) : undefined,
21
+ defaultValue: typeof defaultIndex !== "undefined" ? String(defaultIndex) : undefined,
22
+ onValueChange: function onValueChange(value) {
23
+ return onChange === null || onChange === void 0 ? void 0 : onChange(Number(value));
24
+ },
25
+ children: [/*#__PURE__*/_jsx(TabsList, {
46
26
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["tabs-tabbar border-b border-grey-200 flex overflow-x-auto whitespace-nowrap space-x-6"]))), className),
47
27
  children: tabs.map(function (_ref2, index) {
48
28
  var _ref2$variant = _ref2.variant,
@@ -51,9 +31,10 @@ export var ContentTabs = function ContentTabs(_ref) {
51
31
  disabled = _ref2.disabled,
52
32
  label = _ref2.label,
53
33
  value = _ref2.value;
54
- return /*#__PURE__*/_jsxs(Tab, {
55
- className: cx(ACTIVE_UNDERLINE_VARIANT_CLASSNAMES[variant], stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["tab pb-3 text-base leading-sm"]))), className),
34
+ return /*#__PURE__*/_jsxs(TabsTrigger, {
35
+ value: String(index),
56
36
  disabled: disabled,
37
+ className: cx(ACTIVE_UNDERLINE_VARIANT_CLASSNAMES[variant], stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["tab pb-3 text-base leading-sm"]))), className),
57
38
  children: [label, value && /*#__PURE__*/_jsx(Badge, {
58
39
  size: "small",
59
40
  variant: variant,
@@ -62,15 +43,13 @@ export var ContentTabs = function ContentTabs(_ref) {
62
43
  })]
63
44
  }, index);
64
45
  })
65
- }), /*#__PURE__*/_jsx(TabPanels, {
66
- children: tabs.map(function (_ref3, index) {
67
- var content = _ref3.content;
68
- var isActive = internalTabIndex === index;
69
- return /*#__PURE__*/_jsx(TabPanel, {
70
- className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["focus:outline-none"]))),
71
- children: isActive ? content : null
72
- }, index);
73
- })
46
+ }), tabs.map(function (_ref3, index) {
47
+ var content = _ref3.content;
48
+ return /*#__PURE__*/_jsx(TabsContent, {
49
+ value: String(index),
50
+ className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["focus:outline-none"]))),
51
+ children: content
52
+ }, index);
74
53
  })]
75
54
  });
76
55
  };
@@ -1,5 +1,5 @@
1
1
  export = tabsPlugin;
2
2
  declare const tabsPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = tagPlugin;
2
2
  declare const tagPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = textAreaPlugin;
2
2
  declare const textAreaPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface TextWrapProps extends Omit<JSX.IntrinsicElements["span"], "children"> {
3
+ /** The max number of lines before the text is cut with an ellipsis */
3
4
  maxLines?: number;
4
5
  children: string;
5
6
  }
@@ -1,5 +1,5 @@
1
1
  export = togglePlugin;
2
2
  declare const togglePlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = tooltipPlugin;
2
2
  declare const tooltipPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export = typographyPlugin;
2
2
  declare const typographyPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -15,8 +15,8 @@ var typographyPlugin = plugin(function (_ref) {
15
15
  addUtilities = _ref.addUtilities,
16
16
  addComponents = _ref.addComponents,
17
17
  e = _ref.e;
18
- var desktop = theme("typography.desktop", {});
19
- var mobile = theme("typography.mobile", {});
18
+ var desktop = theme("stlTypography.desktop", {});
19
+ var mobile = theme("stlTypography.mobile", {});
20
20
  var common = {
21
21
  reversed: {
22
22
  color: theme("colors.white")
@@ -61,7 +61,7 @@ var typographyPlugin = plugin(function (_ref) {
61
61
  content: [],
62
62
  theme: {
63
63
  // @ts-ignore
64
- typography: function typography(_ref2) {
64
+ stlTypography: function stlTypography(_ref2) {
65
65
  var theme = _ref2.theme;
66
66
  // Need to transform it to a string because in this context, Tailwind doesn't automagically turn it into a string value
67
67
  // Asked here https://github.com/tailwindlabs/tailwindcss/discussions/8755
@@ -1,4 +1,3 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
2
 
4
3
  var _templateObject;
@@ -11,11 +10,12 @@ export var UserContent = function UserContent(_ref) {
11
10
  content = _ref.content,
12
11
  _ref$styled = _ref.styled,
13
12
  styled = _ref$styled === void 0 ? true : _ref$styled;
14
- return content ? /*#__PURE__*/_jsx("div", {
15
- className: cx(_defineProperty({}, stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["usercontent"]))), styled), className),
13
+ if (!content) return null;
14
+ return /*#__PURE__*/_jsx("div", {
15
+ className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["", ""])), styled && "usercontent"), className),
16
16
  dangerouslySetInnerHTML: {
17
17
  __html: content
18
18
  }
19
- }) : null;
19
+ });
20
20
  };
21
21
  export default UserContent;
@@ -1,5 +1,5 @@
1
1
  declare const _exports: {
2
2
  handler: import("tailwindcss/types/config").PluginCreator;
3
- config?: import("tailwindcss").Config | undefined;
3
+ config?: Partial<import("tailwindcss").Config> | undefined;
4
4
  };
5
5
  export = _exports;
@@ -17,10 +17,10 @@ export default plugin(function (_ref) {
17
17
  theme = _ref.theme;
18
18
 
19
19
  /** @type {any} */
20
- var desktop = theme("typography.desktop", {});
20
+ var desktop = theme("stlTypography.desktop", {});
21
21
  /** @type {any} */
22
22
 
23
- var mobile = theme("typography.mobile", {});
23
+ var mobile = theme("stlTypography.mobile", {});
24
24
  addComponents({
25
25
  ".usercontent": _defineProperty({
26
26
  "h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table": {
@@ -1,5 +1,5 @@
1
1
  export = basePlugin;
2
2
  declare const basePlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -6,21 +6,21 @@
6
6
  * @param {string} classname
7
7
  */
8
8
  function prefixTailwindClassName(tailwindPrefix, classname) {
9
- var modifiers = "";
10
- var arbitraryValueIndex = classname.indexOf("-[");
11
- var classNameSafeZone = arbitraryValueIndex === -1 ? classname : classname.slice(0, arbitraryValueIndex);
12
- var prefixInsertIndex = classNameSafeZone.lastIndexOf("!");
9
+ var searchZone = classname.replace(/-\[[^\]]+\]$/, ""); // important marker
10
+
11
+ var prefixInsertIndex = searchZone.lastIndexOf("!"); // modifier separator
13
12
 
14
13
  if (prefixInsertIndex === -1) {
15
- prefixInsertIndex = classNameSafeZone.lastIndexOf(":");
16
- }
14
+ prefixInsertIndex = searchZone.lastIndexOf(":");
15
+ } // container marker
17
16
 
18
- if (prefixInsertIndex !== -1) {
19
- modifiers = classname.slice(0, prefixInsertIndex + 1);
20
- classname = classname.slice(prefixInsertIndex + 1);
17
+
18
+ if (prefixInsertIndex === -1) {
19
+ prefixInsertIndex = searchZone.lastIndexOf("@");
21
20
  }
22
21
 
23
- return "".concat(modifiers).concat(tailwindPrefix).concat(classname);
22
+ prefixInsertIndex += 1;
23
+ return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
24
24
  }
25
25
 
26
26
  export default prefixTailwindClassName;
@@ -1,5 +1,5 @@
1
1
  declare const _exports: {
2
2
  handler: import("tailwindcss/types/config").PluginCreator;
3
- config?: import("tailwindcss").Config | undefined;
3
+ config?: Partial<import("tailwindcss").Config> | undefined;
4
4
  };
5
5
  export = _exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/satellite",
3
- "version": "1.0.0-beta.145",
3
+ "version": "1.0.0-beta.147",
4
4
  "description": "Algolia design system React components",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",
@@ -67,7 +67,7 @@
67
67
  "dependencies": {
68
68
  "@babel/runtime": "^7.17.7",
69
69
  "@popperjs/core": "^2.4.4",
70
- "@reach/tabs": "^0.16.1",
70
+ "@radix-ui/react-tabs": "^1.0.1",
71
71
  "clsx": "^1.2.1",
72
72
  "color": "^4.2.3",
73
73
  "date-fns": "2.22.1",
@@ -79,7 +79,7 @@
79
79
  "react-popper": "^2.2.5",
80
80
  "react-transition-group": "4.4.2",
81
81
  "react-use": "^15.3.8",
82
- "tailwindcss": "^3.1.4"
82
+ "tailwindcss": "^3.2.2"
83
83
  },
84
84
  "main": "./cjs/index.js",
85
85
  "module": "./esm/index.js",