@algolia/satellite 1.0.0-beta.119 → 1.0.0-beta.123

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 (179) hide show
  1. package/README.md +2 -2
  2. package/cjs/AutoComplete/AutoComplete.d.ts +6 -2
  3. package/cjs/AutoComplete/AutoComplete.js +10 -5
  4. package/cjs/AutoComplete/types.d.ts +5 -0
  5. package/cjs/AutoComplete/utils.js +1 -1
  6. package/cjs/Avatars/ApplicationAvatar.d.ts +1 -1
  7. package/cjs/Avatars/utils.js +1 -1
  8. package/cjs/Button/styles.d.ts +1 -1
  9. package/cjs/Button/styles.js +1 -1
  10. package/cjs/Card/components/CardHeader.d.ts +2 -2
  11. package/cjs/Checkbox/Checkbox.d.ts +1 -1
  12. package/cjs/Checkbox/Checkbox.js +1 -0
  13. package/cjs/ClickAwayContainer/ClickAwayContainer.js +1 -1
  14. package/cjs/DatePicker/DatePicker/datePickerReducer.js +1 -1
  15. package/cjs/DatePicker/DatePicker.tailwind.js +7 -2
  16. package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +1 -1
  17. package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +1 -1
  18. package/cjs/DatePicker/utils.d.ts +1 -1
  19. package/cjs/Dropdown/DropdownButton.d.ts +1 -1
  20. package/cjs/Dropdown/DropdownContext.js +1 -1
  21. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +0 -2
  22. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +2 -2
  23. package/cjs/Dropdown/useDropdownItemProps.js +1 -1
  24. package/cjs/Field/useFieldState.js +1 -1
  25. package/cjs/Link/Link.d.ts +2 -2
  26. package/cjs/Pagination/CompactPagination/CompactPagination.js +1 -1
  27. package/cjs/Pagination/DotPagination/DotPagination.d.ts +2 -1
  28. package/cjs/Pagination/DotPagination/DotPagination.js +4 -2
  29. package/cjs/Pagination/Pagination/Pagination.js +3 -0
  30. package/cjs/ProgressSpinner/ProgressSpinner.js +1 -1
  31. package/cjs/RadioGroup/RadioButton.d.ts +1 -1
  32. package/cjs/RadioGroup/RadioGroup.js +1 -1
  33. package/cjs/RangeSlider/RangeSlider.d.ts +1 -1
  34. package/cjs/Satellite/SatelliteContext.js +1 -1
  35. package/cjs/Sidebar/SidebarContext.js +1 -1
  36. package/cjs/Switch/utils.js +1 -1
  37. package/cjs/Tables/DataTable/DataTable.d.ts +41 -0
  38. package/cjs/Tables/DataTable/DataTable.js +280 -0
  39. package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +5 -0
  40. package/cjs/Tables/DataTable/DataTable.tailwind.js +23 -0
  41. package/cjs/Tables/DataTable/components/Body.d.ts +14 -0
  42. package/cjs/Tables/DataTable/components/Body.js +125 -0
  43. package/cjs/Tables/DataTable/components/Footer.d.ts +8 -0
  44. package/cjs/Tables/DataTable/components/Footer.js +81 -0
  45. package/cjs/Tables/DataTable/components/Header.d.ts +10 -0
  46. package/cjs/Tables/DataTable/components/Header.js +44 -0
  47. package/cjs/Tables/DataTable/components/HeaderCell.d.ts +11 -0
  48. package/cjs/Tables/DataTable/components/HeaderCell.js +61 -0
  49. package/cjs/Tables/DataTable/components/Loader.d.ts +6 -0
  50. package/cjs/Tables/DataTable/components/Loader.js +63 -0
  51. package/cjs/Tables/DataTable/components/index.d.ts +5 -0
  52. package/cjs/Tables/DataTable/components/index.js +70 -0
  53. package/cjs/Tables/DataTable/index.d.ts +3 -0
  54. package/cjs/Tables/DataTable/index.js +46 -0
  55. package/cjs/Tables/DataTable/types.d.ts +49 -0
  56. package/cjs/Tables/DataTable/types.js +5 -0
  57. package/cjs/Tables/DataTable/utils.d.ts +4 -0
  58. package/cjs/Tables/DataTable/utils.js +32 -0
  59. package/cjs/{Table → Tables/Table}/Table.d.ts +1 -1
  60. package/cjs/{Table → Tables/Table}/Table.js +8 -6
  61. package/cjs/Tables/Table/Table.tailwind.d.ts +5 -0
  62. package/cjs/{Table → Tables/Table}/Table.tailwind.js +6 -20
  63. package/cjs/Tables/Table/components/Footer.d.ts +8 -0
  64. package/cjs/Tables/Table/components/Footer.js +35 -0
  65. package/cjs/Tables/Table/index.d.ts +2 -0
  66. package/cjs/{Table → Tables/Table}/index.js +7 -5
  67. package/cjs/Tables/index.d.ts +3 -0
  68. package/cjs/Tables/index.js +46 -0
  69. package/cjs/Tabs/LinkTabs.js +1 -1
  70. package/cjs/Tag/Tag.d.ts +1 -1
  71. package/cjs/Toggle/Toggle.d.ts +1 -1
  72. package/cjs/Tooltip/OverflowTooltipWrapper.js +1 -1
  73. package/cjs/Tooltip/Tooltip.d.ts +1 -1
  74. package/cjs/index.d.ts +1 -1
  75. package/cjs/index.js +12 -12
  76. package/cjs/styles/brandColors.d.ts +6 -6
  77. package/cjs/styles/colors.d.ts +9 -9
  78. package/cjs/styles/helpers/icons.d.ts +12 -0
  79. package/cjs/styles/helpers/makeTailwindPrefixer.d.ts +1 -1
  80. package/cjs/styles/tailwind.config.d.ts +24 -33
  81. package/cjs/styles/tailwind.config.js +1 -1
  82. package/cjs/styles/zIndexes.d.ts +7 -7
  83. package/cjs/utils/genericChangeHandler.js +1 -1
  84. package/cjs/utils/hashCode.js +1 -1
  85. package/cjs/utils/index.d.ts +1 -0
  86. package/cjs/utils/index.js +15 -7
  87. package/cjs/utils/isCssPropertySupported.d.ts +1 -1
  88. package/cjs/utils/isNil.js +1 -1
  89. package/cjs/utils/matchLocation.d.ts +1 -1
  90. package/cjs/utils/parseUrl.js +1 -1
  91. package/cjs/utils/pluralize.js +1 -1
  92. package/cjs/utils/range.js +1 -1
  93. package/cjs/utils/toSentenceCase.d.ts +3 -0
  94. package/cjs/utils/toSentenceCase.js +21 -0
  95. package/cjs/utils/uniqBy.js +1 -1
  96. package/cjs/utils/uniqueId.js +1 -1
  97. package/cjs/utils/useLinkProps.d.ts +1 -1
  98. package/cjs/utils/useLinkProps.js +1 -1
  99. package/cjs/utils/useTriggerInputChange.d.ts +2 -1
  100. package/esm/AutoComplete/AutoComplete.d.ts +6 -2
  101. package/esm/AutoComplete/AutoComplete.js +10 -5
  102. package/esm/AutoComplete/types.d.ts +5 -0
  103. package/esm/Avatars/ApplicationAvatar.d.ts +1 -1
  104. package/esm/Button/styles.d.ts +1 -1
  105. package/esm/Card/components/CardHeader.d.ts +2 -2
  106. package/esm/Checkbox/Checkbox.d.ts +1 -1
  107. package/esm/Checkbox/Checkbox.js +1 -0
  108. package/esm/DatePicker/DatePicker.tailwind.js +7 -2
  109. package/esm/DatePicker/utils.d.ts +1 -1
  110. package/esm/Dropdown/DropdownButton.d.ts +1 -1
  111. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +0 -2
  112. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +1 -1
  113. package/esm/Link/Link.d.ts +2 -2
  114. package/esm/Pagination/DotPagination/DotPagination.d.ts +2 -1
  115. package/esm/Pagination/DotPagination/DotPagination.js +4 -2
  116. package/esm/Pagination/Pagination/Pagination.js +3 -0
  117. package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
  118. package/esm/RadioGroup/RadioButton.d.ts +1 -1
  119. package/esm/RangeSlider/RangeSlider.d.ts +1 -1
  120. package/esm/Tables/DataTable/DataTable.d.ts +41 -0
  121. package/esm/Tables/DataTable/DataTable.js +248 -0
  122. package/esm/Tables/DataTable/DataTable.tailwind.d.ts +5 -0
  123. package/esm/Tables/DataTable/DataTable.tailwind.js +21 -0
  124. package/esm/Tables/DataTable/components/Body.d.ts +14 -0
  125. package/esm/Tables/DataTable/components/Body.js +106 -0
  126. package/esm/Tables/DataTable/components/Footer.d.ts +8 -0
  127. package/esm/Tables/DataTable/components/Footer.js +60 -0
  128. package/esm/Tables/DataTable/components/Header.d.ts +10 -0
  129. package/esm/Tables/DataTable/components/Header.js +29 -0
  130. package/esm/Tables/DataTable/components/HeaderCell.d.ts +11 -0
  131. package/esm/Tables/DataTable/components/HeaderCell.js +42 -0
  132. package/esm/Tables/DataTable/components/Loader.d.ts +6 -0
  133. package/esm/Tables/DataTable/components/Loader.js +40 -0
  134. package/esm/Tables/DataTable/components/index.d.ts +5 -0
  135. package/esm/Tables/DataTable/components/index.js +5 -0
  136. package/esm/Tables/DataTable/index.d.ts +3 -0
  137. package/esm/Tables/DataTable/index.js +3 -0
  138. package/esm/Tables/DataTable/types.d.ts +49 -0
  139. package/esm/Tables/DataTable/types.js +1 -0
  140. package/esm/Tables/DataTable/utils.d.ts +4 -0
  141. package/esm/Tables/DataTable/utils.js +14 -0
  142. package/esm/{Table → Tables/Table}/Table.d.ts +1 -1
  143. package/esm/{Table → Tables/Table}/Table.js +7 -6
  144. package/esm/Tables/Table/Table.tailwind.d.ts +5 -0
  145. package/esm/{Table → Tables/Table}/Table.tailwind.js +6 -20
  146. package/esm/Tables/Table/components/Footer.d.ts +8 -0
  147. package/esm/Tables/Table/components/Footer.js +20 -0
  148. package/esm/Tables/Table/index.d.ts +2 -0
  149. package/esm/Tables/Table/index.js +2 -0
  150. package/esm/Tables/index.d.ts +3 -0
  151. package/esm/Tables/index.js +3 -0
  152. package/esm/Tag/Tag.d.ts +1 -1
  153. package/esm/Toggle/Toggle.d.ts +1 -1
  154. package/esm/Tooltip/Tooltip.d.ts +1 -1
  155. package/esm/index.d.ts +1 -1
  156. package/esm/index.js +1 -1
  157. package/esm/styles/brandColors.d.ts +6 -6
  158. package/esm/styles/colors.d.ts +9 -9
  159. package/esm/styles/helpers/icons.d.ts +12 -0
  160. package/esm/styles/helpers/makeTailwindPrefixer.d.ts +1 -1
  161. package/esm/styles/tailwind.config.d.ts +24 -33
  162. package/esm/styles/tailwind.config.js +1 -1
  163. package/esm/styles/zIndexes.d.ts +7 -7
  164. package/esm/utils/index.d.ts +1 -0
  165. package/esm/utils/index.js +2 -1
  166. package/esm/utils/isCssPropertySupported.d.ts +1 -1
  167. package/esm/utils/matchLocation.d.ts +1 -1
  168. package/esm/utils/toSentenceCase.d.ts +3 -0
  169. package/esm/utils/toSentenceCase.js +9 -0
  170. package/esm/utils/useLinkProps.d.ts +1 -1
  171. package/esm/utils/useTriggerInputChange.d.ts +2 -1
  172. package/package.json +4 -4
  173. package/satellite.css +445 -175
  174. package/satellite.min.css +2 -2
  175. package/cjs/Table/Table.tailwind.d.ts +0 -5
  176. package/cjs/Table/index.d.ts +0 -3
  177. package/esm/Table/Table.tailwind.d.ts +0 -5
  178. package/esm/Table/index.d.ts +0 -3
  179. package/esm/Table/index.js +0 -3
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.uniqBy = uniqBy;
7
6
  exports["default"] = void 0;
7
+ exports.uniqBy = uniqBy;
8
8
 
9
9
  function uniqBy(arr, identity) {
10
10
  if (!arr) return arr;
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.uniqueId = uniqueId;
7
6
  exports["default"] = void 0;
7
+ exports.uniqueId = uniqueId;
8
8
  var counters = {};
9
9
 
10
10
  function uniqueId() {
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  export declare type UseLinkProps = Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel">;
3
- export declare const useLinkProps: (props: Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "href" | "onClick" | "rel">) => Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "href" | "onClick" | "rel">;
3
+ export declare const useLinkProps: (props: UseLinkProps) => UseLinkProps;
4
4
  export default useLinkProps;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = exports.useLinkProps = void 0;
8
+ exports.useLinkProps = exports["default"] = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
+ declare type InputValue = JSX.IntrinsicElements["input"]["value"];
2
3
  /**
3
4
  * Trigger a native input change event.
4
5
  * See https://stackoverflow.com/questions/23892547/what-is-the-best-way-to-trigger-onchange-event-in-react-js
5
6
  */
6
- declare const useTriggerInputChange: (inputRef: import("react").MutableRefObject<HTMLInputElement | null>) => (value: string | number | string[] | undefined) => void;
7
+ declare const useTriggerInputChange: (inputRef: React.MutableRefObject<HTMLInputElement | null>) => (value: InputValue) => void;
7
8
  export default useTriggerInputChange;
@@ -13,6 +13,10 @@ interface State {
13
13
  *
14
14
  * Use this component when the user needs to search through a long list of results.
15
15
  *
16
+ * ## Menu Size Variations
17
+ * - **Medium (default)**: the standard dropdown menu height for most use cases
18
+ * - **Large**: when numerous results should be displayed in the dropdown to ease selection
19
+ *
16
20
  * ## Best practices
17
21
  *
18
22
  * - Provide an empty state if there is no result
@@ -31,7 +35,7 @@ export declare class AutoComplete<T extends Option> extends Component<AutoComple
31
35
  options: never[];
32
36
  separatorKeyCodes: never[];
33
37
  separatorKeys: never[];
34
- optionItemComponent: React.ComponentType<import("./types").OptionItemProps>;
38
+ optionItemComponent: import("./types").OptionItemComponentType;
35
39
  noWrap: boolean;
36
40
  };
37
41
  state: State;
@@ -46,7 +50,7 @@ export declare class AutoComplete<T extends Option> extends Component<AutoComple
46
50
  updateInputWidth: () => void;
47
51
  handleKeyDown: (state: ControllerStateAndHelpers<Option>) => (evt: React.KeyboardEvent<any>) => void;
48
52
  handleChange: (option: Option) => void;
49
- handleShowAllResults: (evt: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
53
+ handleShowAllResults: (evt: React.MouseEvent<HTMLButtonElement>) => void;
50
54
  removeValue: (removedOption: Option) => void;
51
55
  renderInput: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>, fieldState: FieldState) => JSX.Element;
52
56
  renderMenu: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>) => JSX.Element;
@@ -10,7 +10,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
10
10
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
11
11
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
12
12
 
13
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
13
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
14
14
 
15
15
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
16
 
@@ -113,6 +113,10 @@ var defaultEmptyState = /*#__PURE__*/React.createElement(AutoCompleteEmptyState,
113
113
  *
114
114
  * Use this component when the user needs to search through a long list of results.
115
115
  *
116
+ * ## Menu Size Variations
117
+ * - **Medium (default)**: the standard dropdown menu height for most use cases
118
+ * - **Large**: when numerous results should be displayed in the dropdown to ease selection
119
+ *
116
120
  * ## Best practices
117
121
  *
118
122
  * - Provide an empty state if there is no result
@@ -420,6 +424,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
420
424
  isOpen = autocompleteHelpers.isOpen;
421
425
  var _this$props4 = _this.props,
422
426
  menuClassName = _this$props4.menuClassName,
427
+ menuSize = _this$props4.menuSize,
423
428
  _this$props4$emptySta = _this$props4.emptyState,
424
429
  emptyState = _this$props4$emptySta === void 0 ? AutoComplete.defaultProps.emptyState : _this$props4$emptySta,
425
430
  menuFooter = _this$props4.menuFooter,
@@ -468,26 +473,26 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
468
473
  }, results.length === 0 ? /*#__PURE__*/React.createElement("div", _extends({}, getMenuProps(), {
469
474
  className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["min-h-10"])))
470
475
  }), emptyState) : /*#__PURE__*/React.createElement(ScrollIndicator, {
471
- className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["max-h-64"])))
476
+ className: menuSize === "large" ? stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["max-h-96"]))) : stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["max-h-64"])))
472
477
  }, /*#__PURE__*/React.createElement("ul", getMenuProps(), results.slice(0, showAllResults ? Number.MAX_SAFE_INTEGER : maxResults).map(function (result, index) {
473
478
  return /*#__PURE__*/React.createElement("li", _extends({
474
479
  key: result.value
475
480
  }, getItemProps({
476
481
  item: result,
477
482
  disabled: result.disabled,
478
- className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n autocomplete-result\n flex items-center min-h-10 px-4 cursor-pointer\n ", "\n ", "\n "])), index === highlightedIndex && "bg-grey-100", result.disabled && "cursor-not-allowed")
483
+ className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n autocomplete-result\n flex items-center min-h-10 px-4 cursor-pointer\n ", "\n ", "\n "])), index === highlightedIndex && "bg-grey-100", result.disabled && "cursor-not-allowed")
479
484
  })), /*#__PURE__*/React.createElement(OptionItem, _extends({}, optionItemProps, {
480
485
  highlighted: index === highlightedIndex,
481
486
  option: result
482
487
  })));
483
488
  }), extraResults > 0 && !showAllResults && /*#__PURE__*/React.createElement("li", {
484
- className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["p-2 text-right"])))
489
+ className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["p-2 text-right"])))
485
490
  }, /*#__PURE__*/React.createElement(Button, {
486
491
  variant: "subtle",
487
492
  size: "small",
488
493
  onMouseDown: _this.handleShowAllResults
489
494
  }, "Show ", pluralize(extraResults, "result"), " more")))), menuFooter && /*#__PURE__*/React.createElement("footer", {
490
- className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"])))
495
+ className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"])))
491
496
  }, menuFooter)));
492
497
  });
493
498
  });
@@ -31,6 +31,11 @@ export interface AutoCompleteBaseProps {
31
31
  /** Keep the input on a single line */
32
32
  noWrap?: boolean;
33
33
  endItem?: React.ReactNode;
34
+ /**
35
+ * `medium` will display about 5 results in the dropdown; use `large` variant to display more
36
+ * @default "medium"
37
+ */
38
+ menuSize?: "medium" | "large";
34
39
  }
35
40
  export interface AutoCompleteSingleProps extends AutoCompleteBaseProps {
36
41
  multiple?: false;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { ApplicationAvatarSize, MinimalApplication } from "./types";
3
- interface ApplicationAvatarProps {
3
+ export interface ApplicationAvatarProps {
4
4
  /** A minimal application object containing `applicationID` and `name`. */
5
5
  application: MinimalApplication;
6
6
  /** @default "medium" */
@@ -2,4 +2,4 @@ import { ButtonBaseProps, ButtonSize, ButtonVariant } from "./types";
2
2
  export declare const BUTTON_SIZE_CLASSNAMES: Record<ButtonSize, string>;
3
3
  export declare const BUTTON_LOADER_ICON_SIZES: Record<ButtonSize, number>;
4
4
  export declare const BUTTON_VARIANT_CLASSNAMES: Record<ButtonVariant, string>;
5
- export declare const getIconColorClassName: ({ disabled, variant }: ButtonBaseProps) => string;
5
+ export declare const getIconColorClassName: ({ disabled, variant }: Pick<ButtonBaseProps, "disabled" | "variant">) => string;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  export declare type CardHeaderProps = JSX.IntrinsicElements["div"];
3
- export declare const CardHeader: ({ className, ...props }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => JSX.Element;
3
+ export declare const CardHeader: ({ className, ...props }: CardHeaderProps) => JSX.Element;
4
4
  export default CardHeader;
@@ -20,5 +20,5 @@ export declare type CheckboxProps = CheckboxInputProps & CheckboxCustomProps;
20
20
  * - A checkbox control has two primary states: selected and unselected. If required, there's an additional visual state for indeterminate (usually for a parent checkbox, when some children checkboxes are selected, but not all of them)
21
21
  * - Checkboxes require the use of a button to apply the settings once they are selected
22
22
  */
23
- export declare const Checkbox: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLInputElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "children" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & Pick<React.InputHTMLAttributes<HTMLInputElement>, "required" | "disabled" | "onChange" | "defaultChecked" | "autoFocus" | "checked"> & CheckboxCustomProps & React.RefAttributes<HTMLInputElement>>;
23
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLInputElement>, "onChange"> & Pick<React.InputHTMLAttributes<HTMLInputElement>, "required" | "disabled" | "defaultChecked" | "onChange" | "autoFocus" | "checked"> & CheckboxCustomProps & React.RefAttributes<HTMLInputElement>>;
24
24
  export default Checkbox;
@@ -77,6 +77,7 @@ export var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
77
77
  }, /*#__PURE__*/React.createElement(CheckboxIcon, {
78
78
  className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["checkbox-icon"])))
79
79
  }), /*#__PURE__*/React.createElement("input", _extends({}, checkboxProps, {
80
+ "aria-checked": indeterminate ? "mixed" : isChecked,
80
81
  id: id,
81
82
  className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n opacity-0 absolute inset-0 cursor-pointer\n ", "\n "])), disabled && "cursor-not-allowed"),
82
83
  type: "checkbox",
@@ -28,6 +28,10 @@ var datePickerPlugin = function datePickerPlugin(_ref) {
28
28
  textAlign: "center"
29
29
  }
30
30
  }, _defineProperty(_addComponents, prefix(".date-picker, .date-range-picker"), {
31
+ "& .DayPicker-Months": {
32
+ // Hack to align dates on the same grid
33
+ alignItems: "start"
34
+ },
31
35
  "& .DayPicker-Day": (_DayPickerDay = {
32
36
  borderRadius: defaultRadius
33
37
  }, _defineProperty(_DayPickerDay, "&--today".concat(not("outside")), {
@@ -42,8 +46,9 @@ var datePickerPlugin = function datePickerPlugin(_ref) {
42
46
  borderRadius: 9999,
43
47
  width: 32,
44
48
  height: 32,
45
- left: 2,
46
- top: 4,
49
+ left: "50%",
50
+ top: "50%",
51
+ transform: "translate(-50%, -50%)",
47
52
  zIndex: -1
48
53
  }
49
54
  }), _defineProperty(_DayPickerDay, "&--selected".concat(not("outside")), {
@@ -1 +1 @@
1
- export declare const formatDate: (date: number | Date) => string;
1
+ export declare const formatDate: (date: Date | number) => string;
@@ -1,7 +1,7 @@
1
1
  import React, { FunctionComponent } from "react";
2
2
  import { ButtonProps } from "../Button";
3
3
  import { RenderTargetParams } from "./Dropdown";
4
- export interface DropdownButtonProps extends Omit<ButtonProps<"button">, "title"> {
4
+ export interface DropdownButtonProps extends Omit<ButtonProps<"button">, "title" | "endIcon"> {
5
5
  /** Title displayed in the `Dropdown` */
6
6
  title: React.ReactNode;
7
7
  renderFooter?: (args: RenderTargetParams) => React.ReactNode;
@@ -1,6 +1,4 @@
1
1
  import React, { FC } from "react";
2
- export declare type DropdownCollapsibleValue = undefined | string | string[];
3
- export declare type DropdownCollapsiblePropsOnChange = (name: string, value: DropdownCollapsibleValue) => void;
4
2
  export interface DropdownCollapsibleItemProps {
5
3
  title: React.ReactNode;
6
4
  name?: string;
@@ -7,7 +7,7 @@ import React, { useState } from "react";
7
7
  import { ChevronDown, ChevronRight } from "react-feather";
8
8
  import { uniqueId } from "../../../utils";
9
9
  import stl from "../../../styles/helpers/satellitePrefixer";
10
- import { useDropdownCollapsibleItemsGroup } from ".";
10
+ import { useDropdownCollapsibleItemsGroup } from "./DropdownCollapsibleItemsGroupContext";
11
11
  export var DropdownCollapsibleItem = function DropdownCollapsibleItem(_ref) {
12
12
  var title = _ref.title,
13
13
  name = _ref.name,
@@ -5,7 +5,7 @@ export declare type LinkProps = {
5
5
  endIcon?: IconComponentType;
6
6
  } & React.AnchorHTMLAttributes<HTMLAnchorElement>;
7
7
  export declare const Link: React.ForwardRefExoticComponent<{
8
- startIcon?: React.ComponentClass<import("react-feather").IconProps, any> | React.FunctionComponent<import("react-feather").IconProps> | undefined;
9
- endIcon?: React.ComponentClass<import("react-feather").IconProps, any> | React.FunctionComponent<import("react-feather").IconProps> | undefined;
8
+ startIcon?: IconComponentType | undefined;
9
+ endIcon?: IconComponentType | undefined;
10
10
  } & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
11
11
  export default Link;
@@ -4,6 +4,7 @@ export declare type DotPaginationProps = {
4
4
  currentPage: number;
5
5
  onChange: (page: number) => void;
6
6
  nbPages: number;
7
+ size?: "small" | "medium";
7
8
  };
8
- export declare const DotPagination: ({ currentPage, onChange, nbPages }: DotPaginationProps) => JSX.Element;
9
+ export declare const DotPagination: ({ currentPage, onChange, nbPages, size }: DotPaginationProps) => JSX.Element;
9
10
  export default DotPagination;
@@ -7,7 +7,9 @@ import stl from "../../styles/helpers/satellitePrefixer";
7
7
  export var DotPagination = function DotPagination(_ref) {
8
8
  var currentPage = _ref.currentPage,
9
9
  onChange = _ref.onChange,
10
- nbPages = _ref.nbPages;
10
+ nbPages = _ref.nbPages,
11
+ _ref$size = _ref.size,
12
+ size = _ref$size === void 0 ? "medium" : _ref$size;
11
13
  return /*#__PURE__*/React.createElement("ul", {
12
14
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex"])))
13
15
  }, new Array(nbPages).fill(undefined).map(function (_, idx) {
@@ -16,7 +18,7 @@ export var DotPagination = function DotPagination(_ref) {
16
18
  key: idx
17
19
  }, /*#__PURE__*/React.createElement("button", {
18
20
  "aria-label": "Go to page ".concat(pageIdx),
19
- className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n h-3 w-3 rounded-full mx-1\n ", "\n "])), currentPage === pageIdx ? "bg-accent-600" : "bg-grey-200"),
21
+ className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n rounded-full mx-1\n ", "\n ", "\n "])), currentPage === pageIdx ? "bg-accent-600" : "bg-grey-200", size === "medium" ? "h-3 w-3" : "h-2 w-2"),
20
22
  onClick: function onClick() {
21
23
  return onChange(pageIdx);
22
24
  }
@@ -23,6 +23,7 @@ var Group = function Group(_ref) {
23
23
  onChange = _ref.onChange;
24
24
  return /*#__PURE__*/React.createElement(React.Fragment, null, group.map(function (index) {
25
25
  return /*#__PURE__*/React.createElement(Button, {
26
+ "aria-label": "Go to page ".concat(index),
26
27
  key: index,
27
28
  variant: index === currentPage ? "primary" : "neutral",
28
29
  onClick: function onClick() {
@@ -63,6 +64,7 @@ export var Pagination = function Pagination(_ref2) {
63
64
  return /*#__PURE__*/React.createElement(ButtonGroup, {
64
65
  as: "nav"
65
66
  }, /*#__PURE__*/React.createElement(Button, {
67
+ "aria-label": "Go to previous page",
66
68
  disabled: currentPage === 1,
67
69
  onClick: function onClick() {
68
70
  return onChange(currentPage - 1);
@@ -82,6 +84,7 @@ export var Pagination = function Pagination(_ref2) {
82
84
  onChange: onChange,
83
85
  group: groups[2]
84
86
  }), /*#__PURE__*/React.createElement(Button, {
87
+ "aria-label": "Go to next page",
85
88
  disabled: currentPage === nbPages,
86
89
  onClick: function onClick() {
87
90
  return onChange(currentPage + 1);
@@ -28,7 +28,7 @@ export var ProgressSpinner = function ProgressSpinner(_ref) {
28
28
  viewBox: "".concat(size / 2, " ").concat(size / 2, " ").concat(size, " ").concat(size),
29
29
  width: size,
30
30
  height: size
31
- }), /*#__PURE__*/React.createElement("circle", {
31
+ }), /*#__PURE__*/React.createElement("title", null, "Loading spinner"), /*#__PURE__*/React.createElement("circle", {
32
32
  cx: size,
33
33
  cy: size,
34
34
  r: (size - thickness) / 2,
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  export declare type RadioButtonProps = React.HTMLAttributes<HTMLInputElement> & Pick<React.InputHTMLAttributes<HTMLInputElement>, "value" | "name" | "checked" | "defaultChecked" | "onChange" | "required" | "autoFocus" | "disabled">;
3
- export declare const RadioButton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLInputElement> & Pick<React.InputHTMLAttributes<HTMLInputElement>, "required" | "disabled" | "name" | "onChange" | "defaultChecked" | "value" | "autoFocus" | "checked"> & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const RadioButton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLInputElement> & Pick<React.InputHTMLAttributes<HTMLInputElement>, "required" | "disabled" | "defaultChecked" | "onChange" | "name" | "autoFocus" | "value" | "checked"> & React.RefAttributes<HTMLInputElement>>;
4
4
  export default RadioButton;
@@ -14,5 +14,5 @@ export interface RangeSliderProps extends Omit<React.DetailedHTMLProps<React.Inp
14
14
  * - Provide min and max value whenever possible
15
15
  * - Provide text input for better accessibility
16
16
  */
17
- export declare const RangeSlider: React.ForwardRefExoticComponent<Pick<RangeSliderProps, "max" | "required" | "disabled" | "hidden" | "dir" | "form" | "slot" | "style" | "title" | "pattern" | "color" | "size" | "multiple" | "className" | "height" | "id" | "lang" | "min" | "name" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "src" | "value" | "alt" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "list" | "maxLength" | "minLength" | "readOnly" | "step" | "track1Color" | "track2Color"> & React.RefAttributes<HTMLInputElement>>;
17
+ export declare const RangeSlider: React.ForwardRefExoticComponent<Pick<RangeSliderProps, "max" | "required" | "disabled" | "hidden" | "dir" | "form" | "slot" | "style" | "title" | "pattern" | "color" | "size" | "multiple" | "key" | "list" | "step" | "className" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "height" | "min" | "width" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "accept" | "alt" | "autoComplete" | "capture" | "maxLength" | "minLength" | "readOnly" | "src" | "track1Color" | "track2Color"> & React.RefAttributes<HTMLInputElement>>;
18
18
  export default RangeSlider;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import type { ColumnDefinition, Row, Status, SelectMode, PaginationConfiguration, Sorting, DataConfiguration, GetItemId } from "./types";
3
+ declare type CanSelectItem<Item> = (item: Item, idx: number) => boolean;
4
+ export interface DataTableProps<Item> {
5
+ data: Item[];
6
+ itemId?: GetItemId<Item>;
7
+ pagination?: PaginationConfiguration;
8
+ sorting?: Sorting[];
9
+ onChange?(dataConfiguration: DataConfiguration): void;
10
+ status?: Status;
11
+ noDataContent?: React.ReactNode;
12
+ errorContent?: React.ReactNode;
13
+ columns: ColumnDefinition<Item>[];
14
+ selectMode?: SelectMode;
15
+ selection?: string[];
16
+ onSelectionChange?(rowId: string[]): void;
17
+ canSelectItem?: CanSelectItem<Item>;
18
+ canHoverRow?(row: Row<Item>): boolean;
19
+ onRowHoveredChanged?(row: Row<Item> | null): void;
20
+ }
21
+ /**
22
+ * Tables are used to structure content in a grid to make it easier to see relationships and to facilitate understanding.
23
+ *
24
+ * #### Do
25
+ *
26
+ * - Organize columns and rows based on the needs of your users. To help people read the table, order the columns by importance from left to right, with the key pieces of content opening the row
27
+ * - Include units of measurement symbols in the header so you don't need to repeat them throughout the columns
28
+ * - Indicate sorting capabilities of a column with a chevron in the cell header
29
+ * - Start by columns with highest value to the user, and continue with less important ones
30
+ *
31
+ * #### Do not
32
+ *
33
+ * - Center align text in cells
34
+ *
35
+ * ## Best practices
36
+ *
37
+ * - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
38
+ * - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
39
+ */
40
+ export declare const DataTable: <Item extends {}>({ data, itemId, columns, onChange, status, noDataContent, errorContent, sorting, pagination, selectMode, selection, onSelectionChange, canSelectItem, canHoverRow, onRowHoveredChanged, }: DataTableProps<Item>) => JSX.Element;
41
+ export default DataTable;