@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
@@ -9,14 +9,10 @@ exports["default"] = exports.ContentTabs = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
-
14
- var _tabs = require("@reach/tabs");
12
+ var _reactTabs = require("@radix-ui/react-tabs");
15
13
 
16
14
  var _clsx = _interopRequireDefault(require("clsx"));
17
15
 
18
- var _react = require("react");
19
-
20
16
  var _Badge = _interopRequireDefault(require("../Badge"));
21
17
 
22
18
  var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
@@ -34,31 +30,13 @@ var ContentTabs = function ContentTabs(_ref) {
34
30
  _ref$defaultIndex = _ref.defaultIndex,
35
31
  defaultIndex = _ref$defaultIndex === void 0 ? 0 : _ref$defaultIndex,
36
32
  onChange = _ref.onChange;
37
-
38
- var _useState = (0, _react.useState)(tabIndex !== null && tabIndex !== void 0 ? tabIndex : defaultIndex),
39
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
40
- internalTabIndex = _useState2[0],
41
- setInternalTabIndex = _useState2[1];
42
-
43
- (0, _react.useEffect)(function () {
44
- if (tabIndex !== undefined && internalTabIndex !== tabIndex) {
45
- setInternalTabIndex(tabIndex);
46
- }
47
- }, [internalTabIndex, tabIndex]);
48
-
49
- var handleTabsChange = function handleTabsChange(index) {
50
- onChange === null || onChange === void 0 ? void 0 : onChange(index);
51
-
52
- if (tabIndex === undefined) {
53
- setInternalTabIndex(index);
54
- }
55
- };
56
-
57
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_tabs.Tabs, {
58
- index: internalTabIndex,
59
- onChange: handleTabsChange,
60
- defaultIndex: internalTabIndex,
61
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.TabList, {
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactTabs.Tabs, {
34
+ value: typeof tabIndex !== "undefined" ? String(tabIndex) : undefined,
35
+ defaultValue: typeof defaultIndex !== "undefined" ? String(defaultIndex) : undefined,
36
+ onValueChange: function onValueChange(value) {
37
+ return onChange === null || onChange === void 0 ? void 0 : onChange(Number(value));
38
+ },
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTabs.TabsList, {
62
40
  className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["tabs-tabbar border-b border-grey-200 flex overflow-x-auto whitespace-nowrap space-x-6"]))), className),
63
41
  children: tabs.map(function (_ref2, index) {
64
42
  var _ref2$variant = _ref2.variant,
@@ -67,9 +45,10 @@ var ContentTabs = function ContentTabs(_ref) {
67
45
  disabled = _ref2.disabled,
68
46
  label = _ref2.label,
69
47
  value = _ref2.value;
70
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_tabs.Tab, {
71
- className: (0, _clsx["default"])(_utils.ACTIVE_UNDERLINE_VARIANT_CLASSNAMES[variant], (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["tab pb-3 text-base leading-sm"]))), className),
48
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactTabs.TabsTrigger, {
49
+ value: String(index),
72
50
  disabled: disabled,
51
+ className: (0, _clsx["default"])(_utils.ACTIVE_UNDERLINE_VARIANT_CLASSNAMES[variant], (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["tab pb-3 text-base leading-sm"]))), className),
73
52
  children: [label, value && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge["default"], {
74
53
  size: "small",
75
54
  variant: variant,
@@ -78,15 +57,13 @@ var ContentTabs = function ContentTabs(_ref) {
78
57
  })]
79
58
  }, index);
80
59
  })
81
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.TabPanels, {
82
- children: tabs.map(function (_ref3, index) {
83
- var content = _ref3.content;
84
- var isActive = internalTabIndex === index;
85
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.TabPanel, {
86
- className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["focus:outline-none"]))),
87
- children: isActive ? content : null
88
- }, index);
89
- })
60
+ }), tabs.map(function (_ref3, index) {
61
+ var content = _ref3.content;
62
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTabs.TabsContent, {
63
+ value: String(index),
64
+ className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["focus:outline-none"]))),
65
+ children: content
66
+ }, index);
90
67
  })]
91
68
  });
92
69
  };
@@ -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
  };
@@ -19,8 +19,8 @@ var typographyPlugin = plugin(function (_ref) {
19
19
  addUtilities = _ref.addUtilities,
20
20
  addComponents = _ref.addComponents,
21
21
  e = _ref.e;
22
- var desktop = theme("typography.desktop", {});
23
- var mobile = theme("typography.mobile", {});
22
+ var desktop = theme("stlTypography.desktop", {});
23
+ var mobile = theme("stlTypography.mobile", {});
24
24
  var common = {
25
25
  reversed: {
26
26
  color: theme("colors.white")
@@ -65,7 +65,7 @@ var typographyPlugin = plugin(function (_ref) {
65
65
  content: [],
66
66
  theme: {
67
67
  // @ts-ignore
68
- typography: function typography(_ref2) {
68
+ stlTypography: function stlTypography(_ref2) {
69
69
  var theme = _ref2.theme;
70
70
  // Need to transform it to a string because in this context, Tailwind doesn't automagically turn it into a string value
71
71
  // Asked here https://github.com/tailwindlabs/tailwindcss/discussions/8755
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = exports.UserContent = void 0;
9
9
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
11
 
14
12
  var _clsx = _interopRequireDefault(require("clsx"));
@@ -24,12 +22,13 @@ var UserContent = function UserContent(_ref) {
24
22
  content = _ref.content,
25
23
  _ref$styled = _ref.styled,
26
24
  styled = _ref$styled === void 0 ? true : _ref$styled;
27
- return content ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
28
- className: (0, _clsx["default"])((0, _defineProperty2["default"])({}, (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["usercontent"]))), styled), className),
25
+ if (!content) return null;
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
27
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["", ""])), styled && "usercontent"), className),
29
28
  dangerouslySetInnerHTML: {
30
29
  __html: content
31
30
  }
32
- }) : null;
31
+ });
33
32
  };
34
33
 
35
34
  exports.UserContent = 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;
@@ -21,10 +21,10 @@ module.exports = plugin(function (_ref) {
21
21
  theme = _ref.theme;
22
22
 
23
23
  /** @type {any} */
24
- var desktop = theme("typography.desktop", {});
24
+ var desktop = theme("stlTypography.desktop", {});
25
25
  /** @type {any} */
26
26
 
27
- var mobile = theme("typography.mobile", {});
27
+ var mobile = theme("stlTypography.mobile", {});
28
28
  addComponents({
29
29
  ".usercontent": (0, _defineProperty2["default"])({
30
30
  "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
  };
@@ -8,21 +8,21 @@
8
8
  * @param {string} classname
9
9
  */
10
10
  function prefixTailwindClassName(tailwindPrefix, classname) {
11
- var modifiers = "";
12
- var arbitraryValueIndex = classname.indexOf("-[");
13
- var classNameSafeZone = arbitraryValueIndex === -1 ? classname : classname.slice(0, arbitraryValueIndex);
14
- var prefixInsertIndex = classNameSafeZone.lastIndexOf("!");
11
+ var searchZone = classname.replace(/-\[[^\]]+\]$/, ""); // important marker
12
+
13
+ var prefixInsertIndex = searchZone.lastIndexOf("!"); // modifier separator
15
14
 
16
15
  if (prefixInsertIndex === -1) {
17
- prefixInsertIndex = classNameSafeZone.lastIndexOf(":");
18
- }
16
+ prefixInsertIndex = searchZone.lastIndexOf(":");
17
+ } // container marker
19
18
 
20
- if (prefixInsertIndex !== -1) {
21
- modifiers = classname.slice(0, prefixInsertIndex + 1);
22
- classname = classname.slice(prefixInsertIndex + 1);
19
+
20
+ if (prefixInsertIndex === -1) {
21
+ prefixInsertIndex = searchZone.lastIndexOf("@");
23
22
  }
24
23
 
25
- return "".concat(modifiers).concat(tailwindPrefix).concat(classname);
24
+ prefixInsertIndex += 1;
25
+ return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
26
26
  }
27
27
 
28
28
  module.exports = 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;
@@ -10,7 +10,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
11
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
12
12
 
13
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
13
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
14
14
 
15
15
  var _excluded = ["optionItemPrefix"],
16
16
  _excluded2 = ["ref"];
@@ -379,7 +379,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
379
379
  var shouldRenderCustomTemplate = Boolean(!multiple && !inputFocused && value && renderValueTemplate);
380
380
  var status = fieldState.status;
381
381
  var inputContainerClassName = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n autocomplete-container\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), variant === "large" && "autocomplete-large py-1", inputFocused && "autocomplete-focused", disabled && "autocomplete-disabled", status === "invalid" && "autocomplete-invalid", noWrap && "autocomplete-nowrap");
382
- var inputClassName = stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n autocomplete-input\n ", "\n ", "\n "])), multiple && "ml-1", shouldRenderCustomTemplate && hasValue && "h-0 w-0 opacity-0");
382
+ var inputClassName = stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n autocomplete-input py-1.5\n ", "\n ", "\n "])), multiple && "ml-1", shouldRenderCustomTemplate && hasValue && "h-0 w-0 opacity-0");
383
383
  var inputProps = getInputProps({
384
384
  id: id,
385
385
  name: name,
@@ -422,7 +422,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
422
422
  className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 shrink-0 ", ""])), disabled ? "text-grey-200" : inputFocused ? "text-accent-600" : "text-grey-500"),
423
423
  size: "1rem"
424
424
  }), /*#__PURE__*/_jsxs("div", {
425
- className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
425
+ className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 max-h-full ", " ", ""])), !noWrap && "flex-wrap overflow-y-scroll no-scrollbar", multiple && "-ml-1"), valuesClassName),
426
426
  children: [multiple && Array.isArray(value) && value.map(function (option) {
427
427
  return renderValueTemplate ? renderValueTemplate({
428
428
  option: option,
@@ -598,7 +598,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
598
598
  }
599
599
 
600
600
  return /*#__PURE__*/_jsxs("div", {
601
- className: className,
601
+ className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["flex"]))), className),
602
602
  children: [_this.renderInput(autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), (_this$context$portalT = _this.context["portalTarget"]) !== null && _this$context$portalT !== void 0 ? _this$context$portalT : document.body)]
603
603
  });
604
604
  });
@@ -1,5 +1,5 @@
1
1
  export = autoCompletePlugin;
2
2
  declare const autoCompletePlugin: {
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 = buttonPlugin;
2
2
  declare const buttonPlugin: {
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,12 @@
1
1
  import type { FunctionComponent, ReactNode } from "react";
2
2
  export interface ButtonGroupProps {
3
- className?: string;
4
3
  /**
5
4
  * Specify HTML element `ButtonGroup` should be presented as.
6
5
  * @default "div"
7
6
  */
8
7
  as?: keyof JSX.IntrinsicElements;
8
+ /** @ignore */
9
+ className?: string;
9
10
  children: ReactNode;
10
11
  }
11
12
  /**
@@ -1,5 +1,5 @@
1
1
  export = cardPlugin;
2
2
  declare const cardPlugin: {
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 = checkboxPlugin;
2
2
  declare const checkboxPlugin: {
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 = datePickerPlugin;
2
2
  declare const datePickerPlugin: {
3
- handler: import("tailwindcss/types/config").PluginCreator; /** @type {string} */
4
- config?: import("tailwindcss").Config | undefined;
3
+ handler: import("tailwindcss/types/config").PluginCreator;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -95,7 +95,7 @@ var datePickerPlugin = plugin(function (_ref) {
95
95
  textTransform: "capitalize",
96
96
  fontWeight: "normal",
97
97
  fontSize: "0.95em",
98
- color: theme("colors.grey.500")
98
+ color: theme("colors.grey.600")
99
99
  },
100
100
  "& .rdp-day": (_rdpDay2 = {
101
101
  borderRadius: defaultRadius
@@ -6,7 +6,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  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; }
7
7
 
8
8
  import { DayPicker } from "react-day-picker";
9
- import { getDateFnsLocale } from "../utils";
10
9
  import NavBar from "./NavBar";
11
10
  import { jsx as _jsx } from "react/jsx-runtime";
12
11
  var excludedDayPickerPropsList = ["captionElement", "showOutsideDays", "enableOutsideDaysClick", "fixedWeeks", "labels", "navbarElement", "onTodayButtonClick", "pagedNavigation", "renderDay", "renderWeek", "reverseMonths", "showWeekNumber", "showWeekDays", "weekdayElement", "weekdaysLong", "weekdaysShort"];
@@ -34,14 +33,11 @@ var Calendar = function Calendar(props) {
34
33
  //stl`bg-grey-600 text-white rounded-l border-0`,
35
34
  displayedRangesEnd: "rdp-day_displayedRangesEnd" //stl`bg-grey-600 text-white rounded-r border-0`,
36
35
 
37
- }; // This could be expanded further to incorporate expanding the number system as well as the text:
38
- // https://react-day-picker.js.org/basics/localization#adopting-other-numbering-systems
39
-
40
- var dateFnsLocale = getDateFnsLocale(props.locale.code);
36
+ };
41
37
  return /*#__PURE__*/_jsx(DayPicker, _objectSpread(_objectSpread({
42
38
  mode: props.mode
43
39
  }, curatedProps), {}, {
44
- locale: dateFnsLocale,
40
+ locale: props.locale.formatter,
45
41
  dir: props.locale.rtl ? "rtl" : "ltr",
46
42
  modifiersClassNames: modifierClassNames,
47
43
  showOutsideDays: false,
@@ -1,7 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
 
4
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
4
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
5
5
 
6
6
  import cx from "clsx";
7
7
  import { add, eachYearOfInterval, getYear, setYear } from "date-fns";
@@ -11,6 +11,7 @@ import { useDayPicker, useNavigation } from "react-day-picker";
11
11
  import { ChevronLeft, ChevronRight } from "react-feather";
12
12
  import { IconButton } from "../../Button";
13
13
  import stl from "../../styles/helpers/satellitePrefixer";
14
+ import { uniqueId } from "../../utils";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
 
@@ -75,6 +76,9 @@ var NavBar = function NavBar(props) {
75
76
  return i + minYear;
76
77
  });
77
78
  }, [props, initialDate]);
79
+ var yearSelectId = useMemo(function () {
80
+ return uniqueId("year-select");
81
+ }, []);
78
82
  return /*#__PURE__*/_jsxs("div", {
79
83
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full top-3 left-0 pt-1 px-2 pb-2 flex justify-between"]))),
80
84
  children: [showPrevious ? /*#__PURE__*/_jsx(IconButton, {
@@ -89,18 +93,25 @@ var NavBar = function NavBar(props) {
89
93
  className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["font-medium text-md"]))),
90
94
  children: [formatMonthCaption(props.displayMonth, {
91
95
  locale: locale
92
- }), " ", props.editableYear ? /*#__PURE__*/_jsx("select", {
93
- className: cx("rdp-year", stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-accent-600 focus:shadow-z100 appearance-none"])))),
94
- value: props.displayMonth.getFullYear(),
95
- onChange: function onChange(e) {
96
- return goToDate(setYear(props.displayMonth, parseInt(e.currentTarget.value)));
97
- },
98
- children: years.map(function (year) {
99
- return /*#__PURE__*/_jsx("option", {
100
- value: year,
101
- children: year
102
- }, year);
103
- })
96
+ }), " ", props.editableYear ? /*#__PURE__*/_jsxs("label", {
97
+ htmlFor: yearSelectId,
98
+ children: [/*#__PURE__*/_jsx("span", {
99
+ className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["sr-only"]))),
100
+ children: "Select a year"
101
+ }), /*#__PURE__*/_jsx("select", {
102
+ id: yearSelectId,
103
+ className: cx("rdp-year", stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-accent-600 focus:shadow-z100 appearance-none"])))),
104
+ value: props.displayMonth.getFullYear(),
105
+ onChange: function onChange(e) {
106
+ return goToDate(setYear(props.displayMonth, parseInt(e.currentTarget.value)));
107
+ },
108
+ children: years.map(function (year) {
109
+ return /*#__PURE__*/_jsx("option", {
110
+ value: year,
111
+ children: year
112
+ }, year);
113
+ })
114
+ })]
104
115
  }) : props.displayMonth.getFullYear()]
105
116
  })
106
117
  }), showNext ? /*#__PURE__*/_jsx(IconButton, {
@@ -108,7 +119,7 @@ var NavBar = function NavBar(props) {
108
119
  title: nextMonthLabel,
109
120
  onClick: handleNextClick
110
121
  }) : /*#__PURE__*/_jsx("span", {
111
- className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["w-8"])))
122
+ className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["w-8"])))
112
123
  })]
113
124
  });
114
125
  };
@@ -1,12 +1,8 @@
1
- import type * as Locales from "date-fns/locale";
1
+ import type { Locale as DateFnsLocale } from "date-fns";
2
2
  import type { ModalProps } from "./components/Modal";
3
3
  export declare type DatePickerLocale = {
4
- /**
5
- * code is the date-fns ISO 639-1 language code to look up @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
6
- * for rendering the actual calendar component in the correct language. This has no effect on the custom translations
7
- * listed below. (i.e. `openButton`, `apply`, etc.)
8
- */
9
- code?: keyof typeof Locales;
4
+ /** The date-fns locale object used to localize dates. Defaults to* `en-US`. */
5
+ formatter?: DateFnsLocale;
10
6
  /** rtl should be used optionally in conjunction with supported language codes, such as `rtl: true` when code is `arSA` */
11
7
  rtl?: boolean;
12
8
  /**
@@ -1,10 +1,3 @@
1
- import type { Locale } from "date-fns";
2
1
  import type { DatePickerLocale } from "./types";
3
2
  export declare const formatDate: (date: Date | number) => string;
4
- export declare const DEFAULT_DATE_PICKER_LOCALE: Required<DatePickerLocale>;
5
- /**
6
- * Looks up a date-fns locale. This falls back to `en`
7
- * @param locale the ISO 639-1 language code to look up @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
8
- * @returns date-fns locale.
9
- */
10
- export declare function getDateFnsLocale(locale?: string): Locale;
3
+ export declare const DEFAULT_DATE_PICKER_LOCALE: Required<Omit<DatePickerLocale, "formatter">>;
@@ -1,30 +1,12 @@
1
1
  import format from "date-fns/format";
2
- import * as Locales from "date-fns/locale";
3
2
  export var formatDate = function formatDate(date) {
4
3
  return format(date, "MMM do, yyyy");
5
4
  };
6
5
  export var DEFAULT_DATE_PICKER_LOCALE = {
7
- code: "enUS",
8
6
  rtl: false,
9
7
  apply: "Apply",
10
8
  cancel: "Cancel",
11
9
  openButton: "Enter a date...",
12
10
  previousMonth: "Previous month",
13
11
  nextMonth: "Next month"
14
- };
15
- /**
16
- * Looks up a date-fns locale. This falls back to `en`
17
- * @param locale the ISO 639-1 language code to look up @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
18
- * @returns date-fns locale.
19
- */
20
-
21
- export function getDateFnsLocale(locale) {
22
- var _allLocales$locale;
23
-
24
- if (!locale) {
25
- return Locales.enUS;
26
- }
27
-
28
- var allLocales = Locales;
29
- return (_allLocales$locale = allLocales[locale]) !== null && _allLocales$locale !== void 0 ? _allLocales$locale : Locales.enUS;
30
- }
12
+ };
@@ -2,6 +2,7 @@
2
2
  import type { IconComponentType } from "../../types";
3
3
  import { DropdownBaseItemProps } from "../useDropdownItemProps";
4
4
  export declare type DropdownLinkItemProps = DropdownBaseItemProps<HTMLAnchorElement> & JSX.IntrinsicElements["a"] & {
5
+ href: string;
5
6
  /** Left aligned icon */
6
7
  startIcon?: IconComponentType;
7
8
  };
@@ -1,5 +1,5 @@
1
1
  export = emptyStatePlugin;
2
2
  declare const emptyStatePlugin: {
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 = flagPlugin;
2
2
  declare const flagPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -4,5 +4,5 @@ export = flexGridPlugin;
4
4
  **/
5
5
  declare const flexGridPlugin: {
6
6
  handler: import("tailwindcss/types/config").PluginCreator;
7
- config?: import("tailwindcss").Config | undefined;
7
+ config?: Partial<import("tailwindcss").Config> | undefined;
8
8
  };
@@ -1,5 +1,5 @@
1
1
  export = helpUnderlinePlugin;
2
2
  declare const helpUnderlinePlugin: {
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 = inputPlugin;
2
2
  declare const inputPlugin: {
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
  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;
@@ -1,5 +1,5 @@
1
1
  export = keyboardKeyPlugin;
2
2
  declare const keyboardKeyPlugin: {
3
3
  handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
4
+ config?: Partial<import("tailwindcss").Config> | undefined;
5
5
  };
@@ -1,4 +1,8 @@
1
1
  import type { AnchorHTMLAttributes } from "react";
2
- export declare type BaseLinkProps = AnchorHTMLAttributes<HTMLAnchorElement>;
3
- export declare const BaseLink: import("react").ForwardRefExoticComponent<BaseLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
2
+ export declare type BaseLinkProps = {
3
+ href: string;
4
+ } & AnchorHTMLAttributes<HTMLAnchorElement>;
5
+ export declare const BaseLink: import("react").ForwardRefExoticComponent<{
6
+ href: string;
7
+ } & AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
4
8
  export default BaseLink;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { ButtonBaseProps, ExtractProps } from "../Button/types";
3
- export declare type ButtonLinkProps = ButtonBaseProps & ExtractProps<"a">;
3
+ export declare type ButtonLinkProps = ButtonBaseProps & ExtractProps<"a"> & {
4
+ href: string;
5
+ };
4
6
  export declare const ButtonLink: ({ endIcon: EndIcon, href, onClick, ...props }: ButtonLinkProps) => JSX.Element;
5
7
  export default ButtonLink;