@algolia/satellite 1.0.0-beta.156 → 1.0.0-beta.158

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 (86) hide show
  1. package/cjs/Avatars/UserAvatar.d.ts +7 -3
  2. package/cjs/Avatars/UserAvatar.js +28 -28
  3. package/cjs/Badge/Badge.d.ts +2 -2
  4. package/cjs/Badge/Badge.js +7 -6
  5. package/cjs/Banners/Alert/Alert.js +1 -1
  6. package/cjs/Button/Button.d.ts +3 -5
  7. package/cjs/Button/Button.js +8 -51
  8. package/cjs/Button/Button.tailwind.js +0 -2
  9. package/cjs/Button/IconButton.d.ts +3 -15
  10. package/cjs/Button/IconButton.js +8 -62
  11. package/cjs/Button/PolymorphicButton.d.ts +11 -0
  12. package/cjs/Button/PolymorphicButton.js +76 -0
  13. package/cjs/Button/PolymorphicIconButton.d.ts +24 -0
  14. package/cjs/Button/PolymorphicIconButton.js +84 -0
  15. package/cjs/Button/index.d.ts +1 -1
  16. package/cjs/Button/index.js +16 -12
  17. package/cjs/Button/types.d.ts +11 -6
  18. package/cjs/Button/types.js +3 -1
  19. package/cjs/Dropdown/DropdownButton.d.ts +3 -3
  20. package/cjs/Dropdown/DropdownButton.js +5 -2
  21. package/cjs/FlexGrid/FlexGrid.js +1 -1
  22. package/cjs/Link/ButtonLink.d.ts +5 -3
  23. package/cjs/Link/ButtonLink.js +9 -6
  24. package/cjs/Link/IconButtonLink.d.ts +5 -4
  25. package/cjs/Link/IconButtonLink.js +8 -5
  26. package/cjs/Medallion/Medallion.js +1 -1
  27. package/cjs/Modal/Modal.d.ts +35 -11
  28. package/cjs/Modal/Modal.js +131 -95
  29. package/cjs/Modal/Modal.tailwind.js +7 -0
  30. package/cjs/RangeSlider/RangeSlider.js +1 -1
  31. package/cjs/Satellite/Satellite.d.ts +2 -1
  32. package/cjs/Satellite/Satellite.js +26 -2
  33. package/cjs/Satellite/locale.d.ts +2 -0
  34. package/cjs/Tables/DataTable/DataTable.js +12 -12
  35. package/cjs/Tag/Tag.d.ts +26 -6
  36. package/cjs/Tag/Tag.js +51 -19
  37. package/cjs/Tag/Tag.tailwind.js +17 -1
  38. package/cjs/Tooltip/Tooltip.tailwind.js +2 -1
  39. package/cjs/styles/colors.d.ts +18 -0
  40. package/cjs/styles/colors.js +33 -15
  41. package/cjs/types.d.ts +9 -0
  42. package/cjs/utils/isCssPropertySupported.d.ts +1 -1
  43. package/esm/Avatars/UserAvatar.d.ts +7 -3
  44. package/esm/Avatars/UserAvatar.js +28 -28
  45. package/esm/Badge/Badge.d.ts +2 -2
  46. package/esm/Badge/Badge.js +7 -6
  47. package/esm/Banners/Alert/Alert.js +1 -1
  48. package/esm/Button/Button.d.ts +3 -5
  49. package/esm/Button/Button.js +8 -52
  50. package/esm/Button/Button.tailwind.js +0 -2
  51. package/esm/Button/IconButton.d.ts +3 -15
  52. package/esm/Button/IconButton.js +8 -64
  53. package/esm/Button/PolymorphicButton.d.ts +11 -0
  54. package/esm/Button/PolymorphicButton.js +66 -0
  55. package/esm/Button/PolymorphicIconButton.d.ts +24 -0
  56. package/esm/Button/PolymorphicIconButton.js +78 -0
  57. package/esm/Button/index.d.ts +1 -1
  58. package/esm/Button/index.js +1 -1
  59. package/esm/Button/types.d.ts +11 -6
  60. package/esm/Button/types.js +3 -1
  61. package/esm/Dropdown/DropdownButton.d.ts +3 -3
  62. package/esm/Dropdown/DropdownButton.js +5 -2
  63. package/esm/Link/ButtonLink.d.ts +5 -3
  64. package/esm/Link/ButtonLink.js +9 -6
  65. package/esm/Link/IconButtonLink.d.ts +5 -4
  66. package/esm/Link/IconButtonLink.js +8 -5
  67. package/esm/Medallion/Medallion.js +1 -1
  68. package/esm/Modal/Modal.d.ts +35 -11
  69. package/esm/Modal/Modal.js +129 -96
  70. package/esm/Modal/Modal.tailwind.js +7 -0
  71. package/esm/RangeSlider/RangeSlider.js +2 -0
  72. package/esm/Satellite/Satellite.d.ts +2 -1
  73. package/esm/Satellite/Satellite.js +24 -1
  74. package/esm/Satellite/locale.d.ts +2 -0
  75. package/esm/Tables/DataTable/DataTable.js +12 -12
  76. package/esm/Tag/Tag.d.ts +26 -6
  77. package/esm/Tag/Tag.js +52 -20
  78. package/esm/Tag/Tag.tailwind.js +17 -1
  79. package/esm/Tooltip/Tooltip.tailwind.js +2 -1
  80. package/esm/styles/colors.d.ts +18 -0
  81. package/esm/styles/colors.js +33 -15
  82. package/esm/types.d.ts +9 -0
  83. package/esm/utils/isCssPropertySupported.d.ts +1 -1
  84. package/package.json +8 -4
  85. package/satellite.min.css +1 -1
  86. package/scss/colors.scss +27 -10
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
7
  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; }
8
8
  import compact from "lodash/compact";
@@ -30,6 +30,9 @@ var DEFAULT_DATATABLE_LOCALE = {
30
30
  errorTitle: "Error",
31
31
  errorDescription: "An error occurred while loading data."
32
32
  };
33
+
34
+ // Selection
35
+
33
36
  var DEFAULT_GET_ITEM_ID = function DEFAULT_GET_ITEM_ID(_, idx) {
34
37
  return String(idx);
35
38
  };
@@ -133,10 +136,7 @@ export var DataTable = function DataTable(_ref) {
133
136
  var isChecked = selectionLength === dataLength;
134
137
  var isIndeterminate = selectionLength > 0 && selectionLength !== dataLength;
135
138
  return /*#__PURE__*/_jsx(Checkbox, {
136
- "aria-label": locale.selectAllButton
137
- // Small hack to position the checkbox in the center of the header
138
- ,
139
- className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["absolute mb-2.5"]))),
139
+ "aria-label": locale.selectAllButton,
140
140
  checked: isChecked,
141
141
  indeterminate: isIndeterminate,
142
142
  onClick: function onClick() {
@@ -147,15 +147,15 @@ export var DataTable = function DataTable(_ref) {
147
147
  Cell: function Cell(_ref3) {
148
148
  var row = _ref3.row;
149
149
  return /*#__PURE__*/_jsx("div", {
150
- className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["flex"]))),
150
+ className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["flex"]))),
151
151
  children: /*#__PURE__*/_jsx(Checkbox, {
152
152
  checked: row.selected,
153
153
  disabled: !row.selectable,
154
- className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["", ""])), row.hovered || row.selected ? "opacity-100" : "opacity-0 select-none")
154
+ className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["", ""])), row.hovered || row.selected ? "opacity-100" : "opacity-0 select-none")
155
155
  })
156
156
  });
157
157
  },
158
- className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-3"])))
158
+ className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["w-3"])))
159
159
  }].concat(_toConsumableArray(columns.map(function (c) {
160
160
  var _c$Header;
161
161
  return typeof c === "string" ? {
@@ -215,15 +215,15 @@ export var DataTable = function DataTable(_ref) {
215
215
  return onChange === null || onChange === void 0 ? void 0 : onChange(dataConfiguration);
216
216
  };
217
217
  return /*#__PURE__*/_jsxs("div", {
218
- className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["relative"]))),
218
+ className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["relative"]))),
219
219
  children: [status === "loading" && /*#__PURE__*/_jsx("div", {
220
- className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["absolute bg-white/50 z-10 w-full h-full flex items-center justify-center"]))),
220
+ className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["absolute bg-white/50 z-10 w-full h-full flex items-center justify-center"]))),
221
221
  children: /*#__PURE__*/_jsx(DataTableLoader, {
222
- className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["-mt-12"]))),
222
+ className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["-mt-12"]))),
223
223
  locale: locale
224
224
  })
225
225
  }), /*#__PURE__*/_jsxs(Table, {
226
- className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["datatable ", " ", ""])), status === "loading" && "pointer-events-none select-none", status === "loading" && data.length === 0 && "h-48"),
226
+ className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["datatable ", " ", ""])), status === "loading" && "pointer-events-none select-none", status === "loading" && data.length === 0 && "h-48"),
227
227
  highlight: false,
228
228
  footer: shouldRenderPagination() && /*#__PURE__*/_jsx(DataTableFooter, {
229
229
  pagination: pagination,
package/esm/Tag/Tag.d.ts CHANGED
@@ -2,20 +2,40 @@ import type { DetailedHTMLProps, HTMLAttributes, MouseEventHandler } from "react
2
2
  import type { ColorVariant } from "../types";
3
3
  export declare type TagVariants = ColorVariant | "pink";
4
4
  export declare type TagLocale = {
5
- removeButton?: string | ((title: string) => string);
5
+ addButton?: string | ((title: string) => string);
6
+ deleteButton?: string | ((title: string) => string);
6
7
  };
7
8
  export interface TagProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> {
8
9
  /**
9
10
  * The "pink" variant should only be used for **Algolia admin** related things.
10
11
  * @default "grey"
11
- * */
12
+ */
12
13
  variant?: TagVariants;
14
+ /**
15
+ * Handler function called when the "add" button is clicked.
16
+ */
17
+ onAdd?: MouseEventHandler<HTMLElement>;
18
+ /**
19
+ * The tooltip text to display when hovering over the "add" button.
20
+ */
21
+ addTooltip?: string;
22
+ /**
23
+ * Handler function called when the "delete" button is clicked.
24
+ */
13
25
  onDelete?: MouseEventHandler<HTMLElement>;
26
+ /**
27
+ * The tooltip text to display when hovering over the "delete" button.
28
+ */
29
+ deleteTooltip?: string;
30
+ /**
31
+ * Customize the text describing the "add" and "delete" buttons.
32
+ * If not provided, default values will be used.
33
+ */
14
34
  locale?: TagLocale;
15
35
  }
16
36
  /**
17
- * Use tags to visually label UI objects for quick recognition and navigation. (!) **Tags can be added or removed from an object by users**.
18
- * Keep in mind that tags increase the amount of visual noise, particularly when combined with other visual labelling elements, so use them in moderation. Tags can be added or removed from an object by users.
37
+ * Use tags to visually label UI objects for quick recognition and navigation. (!) **Tags can be added or deleted from an object by users**.
38
+ * Keep in mind that tags increase the amount of visual noise, particularly when combined with other visual labelling elements, so use them in moderation. Tags can be added or deleted from an object by users.
19
39
  *
20
40
  * - For status information, use badges instead
21
41
  * - For tallies or counts, use badges
@@ -30,9 +50,9 @@ export interface TagProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanEleme
30
50
  * - **Error**: `variant="red"`
31
51
  *
32
52
  * ## Usability best practices
33
- * - Present tags close to or within the input control to allow users to add and remove tags
53
+ * - Present tags close to or within the input control to allow users to add and delete tags
34
54
  * - When writing tags, avoid line-wrapping
35
55
  * - Define the max width of text within a tag. Once the text reaches the max, truncate with ellipses
36
56
  */
37
- export declare const Tag: import("react").ForwardRefExoticComponent<Pick<TagProps, "key" | "id" | "color" | "translate" | "hidden" | "dir" | "slot" | "style" | "title" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "variant" | "locale" | "onDelete"> & import("react").RefAttributes<HTMLSpanElement>>;
57
+ export declare const Tag: import("react").ForwardRefExoticComponent<Pick<TagProps, "key" | "id" | "color" | "translate" | "hidden" | "dir" | "slot" | "style" | "title" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "variant" | "locale" | "onAdd" | "addTooltip" | "onDelete" | "deleteTooltip"> & import("react").RefAttributes<HTMLSpanElement>>;
38
58
  export default Tag;
package/esm/Tag/Tag.js CHANGED
@@ -1,20 +1,24 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
- var _excluded = ["children", "variant", "className", "onDelete", "locale"];
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
4
+ var _excluded = ["children", "variant", "className", "onAdd", "addTooltip", "onDelete", "deleteTooltip", "locale"];
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
7
  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; }
8
8
  import cx from "clsx";
9
9
  import { forwardRef } from "react";
10
- import { X } from "react-feather";
10
+ import { Plus, X } from "react-feather";
11
11
  import { useLocale } from "../Satellite";
12
12
  import stl from "../styles/helpers/satellitePrefixer";
13
+ import { TooltipWrapper } from "../Tooltip";
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
16
  var DEFAULT_TAG_LOCALE = {
16
- removeButton: function removeButton(title) {
17
- return "Remove ".concat(title);
17
+ addButton: function addButton(title) {
18
+ return "Add ".concat(title);
19
+ },
20
+ deleteButton: function deleteButton(title) {
21
+ return "Delete ".concat(title);
18
22
  }
19
23
  };
20
24
  var VARIANT_CLASSNAMES = {
@@ -26,7 +30,7 @@ var VARIANT_CLASSNAMES = {
26
30
  red: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["bg-red-100 border-red-200 text-red-700"]))),
27
31
  pink: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["bg-pink-100 border-pink-200 text-pink-700"])))
28
32
  };
29
- var BUTTON_CLOSE_VARIANT_CLASSNAMES = {
33
+ var BUTTON_VARIANT_CLASSNAMES = {
30
34
  accent: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["border-accent-200 hover:bg-accent-200 focus:bg-accent-200"]))),
31
35
  grey: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border-grey-200 hover:bg-grey-200 focus:bg-grey-200"]))),
32
36
  blue: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["border-blue-200 hover:bg-blue-200 focus:bg-blue-200"]))),
@@ -37,8 +41,8 @@ var BUTTON_CLOSE_VARIANT_CLASSNAMES = {
37
41
  };
38
42
 
39
43
  /**
40
- * Use tags to visually label UI objects for quick recognition and navigation. (!) **Tags can be added or removed from an object by users**.
41
- * Keep in mind that tags increase the amount of visual noise, particularly when combined with other visual labelling elements, so use them in moderation. Tags can be added or removed from an object by users.
44
+ * Use tags to visually label UI objects for quick recognition and navigation. (!) **Tags can be added or deleted from an object by users**.
45
+ * Keep in mind that tags increase the amount of visual noise, particularly when combined with other visual labelling elements, so use them in moderation. Tags can be added or deleted from an object by users.
42
46
  *
43
47
  * - For status information, use badges instead
44
48
  * - For tallies or counts, use badges
@@ -53,7 +57,7 @@ var BUTTON_CLOSE_VARIANT_CLASSNAMES = {
53
57
  * - **Error**: `variant="red"`
54
58
  *
55
59
  * ## Usability best practices
56
- * - Present tags close to or within the input control to allow users to add and remove tags
60
+ * - Present tags close to or within the input control to allow users to add and delete tags
57
61
  * - When writing tags, avoid line-wrapping
58
62
  * - Define the max width of text within a tag. Once the text reaches the max, truncate with ellipses
59
63
  */
@@ -62,31 +66,59 @@ export var Tag = /*#__PURE__*/forwardRef(function (_ref, ref) {
62
66
  _ref$variant = _ref.variant,
63
67
  variant = _ref$variant === void 0 ? "grey" : _ref$variant,
64
68
  className = _ref.className,
69
+ onAdd = _ref.onAdd,
70
+ addTooltip = _ref.addTooltip,
65
71
  onDelete = _ref.onDelete,
72
+ deleteTooltip = _ref.deleteTooltip,
66
73
  propsLocale = _ref.locale,
67
74
  props = _objectWithoutProperties(_ref, _excluded);
68
75
  var title = typeof children === "string" ? children : "tag";
69
76
  var contextLocale = useLocale("tag");
70
77
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_TAG_LOCALE), contextLocale), propsLocale);
71
78
  var tagClassName = cx(stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["tag"]))), VARIANT_CLASSNAMES[variant], className);
72
- var editable = Boolean(onDelete);
79
+ var addable = Boolean(onAdd);
80
+ var deletable = Boolean(onDelete);
81
+ var handleAdd = function handleAdd(evt) {
82
+ evt.stopPropagation();
83
+ onAdd === null || onAdd === void 0 ? void 0 : onAdd(evt);
84
+ };
73
85
  var handleDelete = function handleDelete(evt) {
74
86
  evt.stopPropagation();
75
87
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(evt);
76
88
  };
89
+ var content = /*#__PURE__*/_jsx("span", {
90
+ className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["truncate flex-1 leading-base"]))),
91
+ children: children
92
+ });
77
93
  return /*#__PURE__*/_jsxs("span", _objectSpread(_objectSpread({}, props), {}, {
78
94
  className: tagClassName,
79
95
  ref: ref,
80
- children: [/*#__PURE__*/_jsx("span", {
81
- className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["truncate flex-1"]))),
82
- children: children
83
- }), editable && /*#__PURE__*/_jsx("button", {
84
- className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["tag-close-button"]))), BUTTON_CLOSE_VARIANT_CLASSNAMES[variant]),
85
- type: "button",
86
- onClick: handleDelete,
87
- "aria-label": typeof locale.removeButton === "function" ? locale.removeButton(title) : locale.removeButton,
88
- children: /*#__PURE__*/_jsx(X, {
89
- size: "1em"
96
+ children: [addable ? /*#__PURE__*/_jsx(TooltipWrapper, {
97
+ content: addTooltip,
98
+ hideDelay: 0,
99
+ placement: "bottom",
100
+ wrapperClassName: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["h-full"]))),
101
+ children: /*#__PURE__*/_jsxs("button", {
102
+ className: cx(stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["tag-add-button"]))), !deletable && stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["-mr-2"]))), BUTTON_VARIANT_CLASSNAMES[variant]),
103
+ type: "button",
104
+ onClick: handleAdd,
105
+ "aria-label": typeof locale.addButton === "function" ? locale.addButton(title) : locale.addButton,
106
+ children: [/*#__PURE__*/_jsx(Plus, {
107
+ size: "1em"
108
+ }), content]
109
+ })
110
+ }) : content, deletable && /*#__PURE__*/_jsx(TooltipWrapper, {
111
+ content: deleteTooltip,
112
+ hideDelay: 0,
113
+ placement: "bottom-start",
114
+ children: /*#__PURE__*/_jsx("button", {
115
+ className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["tag-close-button p-1"]))), !addable && stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["ml-2"]))), BUTTON_VARIANT_CLASSNAMES[variant]),
116
+ type: "button",
117
+ onClick: handleDelete,
118
+ "aria-label": typeof locale.deleteButton === "function" ? locale.deleteButton(title) : locale.deleteButton,
119
+ children: /*#__PURE__*/_jsx(X, {
120
+ size: "1em"
121
+ })
90
122
  })
91
123
  })]
92
124
  }));
@@ -16,11 +16,27 @@ var tagPlugin = plugin(function (_ref) {
16
16
  fontSize: theme("fontSize.base"),
17
17
  lineHeight: theme("lineHeight.sm")
18
18
  },
19
+ ".tag-add-button": {
20
+ display: "inline-flex",
21
+ alignItems: "center",
22
+ height: "100%",
23
+ paddingLeft: theme("spacing.2"),
24
+ paddingRight: theme("spacing.2"),
25
+ marginLeft: "-".concat(theme("spacing.2")),
26
+ columnGap: theme("spacing.2"),
27
+ "&, &:focus": {
28
+ outlineWidth: "0px"
29
+ },
30
+ "&:focus-visible": {
31
+ outlineOffset: "-2px",
32
+ outlineWidth: "3px",
33
+ outlineColor: theme("colors.accent.600")
34
+ }
35
+ },
19
36
  ".tag-close-button": {
20
37
  height: "100%",
21
38
  paddingLeft: theme("spacing.1"),
22
39
  paddingRight: theme("spacing.1"),
23
- marginLeft: theme("spacing.2"),
24
40
  marginRight: "-".concat(theme("spacing.2")),
25
41
  borderLeft: "1px solid transparent",
26
42
  "&, &:focus": {
@@ -28,7 +28,8 @@ var tooltipPlugin = plugin(function (_ref) {
28
28
  },
29
29
  ".tooltip-dark": {
30
30
  ".typo-link": {
31
- color: theme("colors.accent.300")
31
+ color: theme("colors.accent.300"),
32
+ textDecoration: "underline"
32
33
  }
33
34
  },
34
35
  ".tooltip-light": {
@@ -23,6 +23,7 @@ export const pink: {
23
23
  300: string;
24
24
  200: string;
25
25
  100: string;
26
+ 50: string;
26
27
  };
27
28
  export const nebula: {
28
29
  900: string;
@@ -45,6 +46,7 @@ export const xenon: {
45
46
  300: string;
46
47
  200: string;
47
48
  100: string;
49
+ 50: string;
48
50
  };
49
51
  export const blue: {
50
52
  900: string;
@@ -56,6 +58,7 @@ export const blue: {
56
58
  300: string;
57
59
  200: string;
58
60
  100: string;
61
+ 50: string;
59
62
  };
60
63
  export const green: {
61
64
  900: string;
@@ -67,6 +70,7 @@ export const green: {
67
70
  300: string;
68
71
  200: string;
69
72
  100: string;
73
+ 50: string;
70
74
  };
71
75
  export const orange: {
72
76
  900: string;
@@ -78,6 +82,7 @@ export const orange: {
78
82
  300: string;
79
83
  200: string;
80
84
  100: string;
85
+ 50: string;
81
86
  };
82
87
  export const red: {
83
88
  900: string;
@@ -89,4 +94,17 @@ export const red: {
89
94
  300: string;
90
95
  200: string;
91
96
  100: string;
97
+ 50: string;
98
+ };
99
+ export const purple: {
100
+ 900: string;
101
+ 800: string;
102
+ 700: string;
103
+ 600: string;
104
+ 500: string;
105
+ 400: string;
106
+ 300: string;
107
+ 200: string;
108
+ 100: string;
109
+ 50: string;
92
110
  };
@@ -24,7 +24,8 @@ var colors = {
24
24
  400: "#fb5abc",
25
25
  300: "#fd89ce",
26
26
  200: "#feb9e2",
27
- 100: "#ffeaf6"
27
+ 100: "#ffeaf6",
28
+ 50: "#fff5fb"
28
29
  },
29
30
  nebula: {
30
31
  900: "#141d61",
@@ -46,7 +47,8 @@ var colors = {
46
47
  400: "#457aff",
47
48
  300: "#76a0ff",
48
49
  200: "#bbd1ff",
49
- 100: "#f2f4ff"
50
+ 100: "#f2f4ff",
51
+ 50: "#f9f9ff"
50
52
  },
51
53
  blue: {
52
54
  900: "#00526c",
@@ -57,18 +59,20 @@ var colors = {
57
59
  400: "#5adaff",
58
60
  300: "#89e5ff",
59
61
  200: "#b9efff",
60
- 100: "#e8faff"
62
+ 100: "#e8faff",
63
+ 50: "#f3fdff"
61
64
  },
62
65
  green: {
63
- 900: "#005e36",
64
- 800: "#028950",
65
- 700: "#06b66c",
66
- 600: "#0de589",
67
- 500: "#5feb9e",
68
- 400: "#88f0b3",
69
- 300: "#aaf4c8",
70
- 200: "#c9f8de",
71
- 100: "#e6fcf3"
66
+ 900: "#005d43",
67
+ 800: "#007046",
68
+ 700: "#008b4a",
69
+ 600: "#00a648",
70
+ 500: "#00c241",
71
+ 400: "#4ade6d",
72
+ 300: "#86f195",
73
+ 200: "#bffbc2",
74
+ 100: "#e5fde4",
75
+ 50: "#f2fef1"
72
76
  },
73
77
  orange: {
74
78
  900: "#963209",
@@ -79,18 +83,32 @@ var colors = {
79
83
  400: "#fcbc73",
80
84
  300: "#fed59a",
81
85
  200: "#ffe9c3",
82
- 100: "#fff9ec"
86
+ 100: "#fff9ec",
87
+ 50: "#fffcf5"
83
88
  },
84
89
  red: {
85
90
  900: "#83111e",
86
91
  800: "#ab1325",
87
92
  700: "#d4142a",
88
- 600: "#ee243c",
93
+ 600: "#e9122c",
89
94
  500: "#f4495d",
90
95
  400: "#f86e7e",
91
96
  300: "#fc95a1",
92
97
  200: "#febdc5",
93
- 100: "#ffe6e9"
98
+ 100: "#ffe6e9",
99
+ 50: "#fff3f4"
100
+ },
101
+ purple: {
102
+ 900: "#3c0b93",
103
+ 800: "#5612b7",
104
+ 700: "#731adb",
105
+ 600: "#9524ff",
106
+ 500: "#b75aff",
107
+ 400: "#cc7bff",
108
+ 300: "#e2a7ff",
109
+ 200: "#f2d3ff",
110
+ 100: "#fcf4ff",
111
+ 50: "#fdf9ff"
94
112
  }
95
113
  };
96
114
  export default colors;
package/esm/types.d.ts CHANGED
@@ -17,3 +17,12 @@ export declare type AtLeastOne<T, U = {
17
17
  export declare type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
18
18
  [Property in Key]-?: Type[Property];
19
19
  };
20
+ declare type Without<T, U> = {
21
+ [P in Exclude<keyof T, keyof U>]?: never;
22
+ };
23
+ /**
24
+ * Makes two types mutually exclusive
25
+ * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
26
+ */
27
+ export declare type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
28
+ export {};
@@ -1,2 +1,2 @@
1
- declare const isCssPropertySupported: <P extends number | "filter" | "fill" | "animationName" | "all" | "offset" | "height" | "width" | "left" | "top" | "item" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "blockSize" | "border" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "contain" | "content" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fillOpacity" | "fillRule" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetRotate" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarGutter" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
1
+ declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "animationName" | "all" | "offset" | "height" | "width" | "left" | "top" | "item" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "blockSize" | "border" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "contain" | "content" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fillOpacity" | "fillRule" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetRotate" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarGutter" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
2
2
  export default isCssPropertySupported;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/satellite",
3
- "version": "1.0.0-beta.156",
3
+ "version": "1.0.0-beta.158",
4
4
  "description": "Algolia design system React components",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",
@@ -46,7 +46,9 @@
46
46
  "contributors": [
47
47
  "Vincent Lemeunier <vincent.lemeunier@algolia.com>",
48
48
  "Kevin Østerkilde <kevin.osterkilde@algolia.com>",
49
- "Clément Aupiais <clement.aupiais@algolia.com>"
49
+ "Clément Aupiais <clement.aupiais@algolia.com>",
50
+ "Mark Messenger <mark.messenger@algolia.com>",
51
+ "Fabien Motte <fabien.motte@algolia.com>"
50
52
  ],
51
53
  "license": "MIT",
52
54
  "bugs": {
@@ -68,8 +70,10 @@
68
70
  "dependencies": {
69
71
  "@babel/runtime": "^7.21.0",
70
72
  "@popperjs/core": "^2.4.4",
71
- "@radix-ui/react-slider": "^1.1.0",
72
- "@radix-ui/react-tabs": "^1.0.2",
73
+ "@radix-ui/react-avatar": "^1.0.3",
74
+ "@radix-ui/react-dialog": "^1.0.4",
75
+ "@radix-ui/react-slider": "^1.1.2",
76
+ "@radix-ui/react-tabs": "^1.0.4",
73
77
  "clsx": "^1.2.1",
74
78
  "color": "^4.2.3",
75
79
  "date-fns": "^2.29.3",