@algolia/satellite 1.0.0-beta.171 → 1.0.0-beta.172
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.
- package/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +5 -0
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +6 -0
- package/cjs/AutoComplete/AutoComplete.d.ts +2 -13
- package/cjs/AutoComplete/AutoComplete.js +17 -30
- package/cjs/AutoComplete/utils.d.ts +1 -1
- package/cjs/Avatars/ApplicationAvatar.d.ts +5 -1
- package/cjs/Avatars/ApplicationAvatar.js +5 -1
- package/cjs/Avatars/UserAvatar.d.ts +5 -1
- package/cjs/Avatars/UserAvatar.js +5 -1
- package/cjs/Badge/Badge.d.ts +2 -12
- package/cjs/Badge/Badge.js +2 -12
- package/cjs/Banners/Alert/Alert.d.ts +3 -48
- package/cjs/Banners/Alert/Alert.js +3 -48
- package/cjs/Banners/BigBertha/BigBertha.d.ts +3 -31
- package/cjs/Banners/BigBertha/BigBertha.js +3 -31
- package/cjs/Banners/Promote/Promote.d.ts +3 -26
- package/cjs/Banners/Promote/Promote.js +3 -26
- package/cjs/Button/Button.d.ts +2 -11
- package/cjs/Button/Button.js +2 -11
- package/cjs/Button/ButtonGroup.d.ts +3 -3
- package/cjs/Button/ButtonGroup.js +3 -3
- package/cjs/Button/IconButton.d.ts +2 -2
- package/cjs/Button/IconButton.js +2 -2
- package/cjs/Card/Card.d.ts +5 -1
- package/cjs/Card/Card.js +5 -1
- package/cjs/Checkbox/Checkbox.d.ts +2 -3
- package/cjs/Checkbox/Checkbox.js +2 -3
- package/cjs/DatePicker/DatePicker/DatePicker.d.ts +5 -0
- package/cjs/DatePicker/DatePicker/DatePicker.js +5 -0
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +6 -0
- package/cjs/Dropdown/Dropdown.d.ts +3 -8
- package/cjs/Dropdown/Dropdown.js +3 -8
- package/cjs/Dropzone/Dropzone.d.ts +5 -0
- package/cjs/Dropzone/Dropzone.js +6 -0
- package/cjs/EmptyState/EmptyState.d.ts +2 -21
- package/cjs/EmptyState/EmptyState.js +2 -21
- package/cjs/Field/Field.d.ts +2 -31
- package/cjs/Field/Field.js +2 -31
- package/cjs/Flag/Flag.d.ts +5 -0
- package/cjs/Flag/Flag.js +6 -0
- package/cjs/FlexGrid/FlexGrid.d.ts +5 -0
- package/cjs/FlexGrid/FlexGrid.js +6 -0
- package/cjs/HelpUnderline/HelpUnderline.d.ts +5 -0
- package/cjs/HelpUnderline/HelpUnderline.js +5 -0
- package/cjs/Input/Input.d.ts +2 -4
- package/cjs/Input/Input.js +2 -4
- package/cjs/Insert/Insert.d.ts +3 -29
- package/cjs/Insert/Insert.js +3 -29
- package/cjs/KeyboardKey/KeyboardKey.d.ts +5 -0
- package/cjs/KeyboardKey/KeyboardKey.js +5 -0
- package/cjs/Link/ButtonLink.d.ts +5 -0
- package/cjs/Link/ButtonLink.js +5 -0
- package/cjs/Link/IconButtonLink.d.ts +5 -0
- package/cjs/Link/IconButtonLink.js +5 -0
- package/cjs/Link/Link.d.ts +5 -0
- package/cjs/Link/Link.js +5 -0
- package/cjs/Medallion/Medallion.d.ts +5 -0
- package/cjs/Medallion/Medallion.js +6 -0
- package/cjs/Modal/Modal.d.ts +5 -0
- package/cjs/Modal/Modal.js +6 -0
- package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +5 -0
- package/cjs/Pagination/CompactPagination/CompactPagination.js +6 -0
- package/cjs/Pagination/DotPagination/DotPagination.d.ts +5 -0
- package/cjs/Pagination/DotPagination/DotPagination.js +5 -0
- package/cjs/Pagination/Pagination/Pagination.d.ts +2 -4
- package/cjs/Pagination/Pagination/Pagination.js +2 -4
- package/cjs/Popover/Popover.d.ts +5 -0
- package/cjs/Popover/Popover.js +6 -0
- package/cjs/ProgressBar/ProgressBar.d.ts +1 -1
- package/cjs/ProgressBar/ProgressBar.js +1 -1
- package/cjs/ProgressSpinner/ProgressSpinner.d.ts +5 -0
- package/cjs/ProgressSpinner/ProgressSpinner.js +27 -19
- package/cjs/RadioGroup/RadioGroup.d.ts +2 -12
- package/cjs/RadioGroup/RadioGroup.js +2 -12
- package/cjs/RangeSlider/RangeSlider.d.ts +2 -4
- package/cjs/RangeSlider/RangeSlider.js +2 -4
- package/cjs/ScrollIndicator/ScrollIndicator.d.ts +5 -0
- package/cjs/ScrollIndicator/ScrollIndicator.js +6 -0
- package/cjs/Select/Select.d.ts +2 -5
- package/cjs/Select/Select.js +2 -5
- package/cjs/Separator/Separator.d.ts +5 -0
- package/cjs/Separator/Separator.js +5 -0
- package/cjs/Sidebar/Sidebar.d.ts +5 -0
- package/cjs/Sidebar/Sidebar.js +6 -0
- package/cjs/Switch/Switch.d.ts +5 -0
- package/cjs/Switch/Switch.js +5 -0
- package/cjs/Tables/DataTable/DataTable.d.ts +2 -16
- package/cjs/Tables/DataTable/DataTable.js +2 -16
- package/cjs/Tables/Table/Table.d.ts +2 -16
- package/cjs/Tables/Table/Table.js +2 -16
- package/cjs/Tabs/LinkTabs.d.ts +2 -25
- package/cjs/Tabs/LinkTabs.js +2 -25
- package/cjs/Tag/Tag.d.ts +2 -19
- package/cjs/Tag/Tag.js +2 -19
- package/cjs/TextArea/TextArea.d.ts +5 -0
- package/cjs/TextArea/TextArea.js +5 -0
- package/cjs/TextWrap/TextWrap.d.ts +5 -0
- package/cjs/TextWrap/TextWrap.js +6 -0
- package/cjs/Toggle/Toggle.d.ts +2 -3
- package/cjs/Toggle/Toggle.js +2 -3
- package/cjs/Tooltip/OverflowTooltipWrapper.d.ts +5 -0
- package/cjs/Tooltip/OverflowTooltipWrapper.js +5 -0
- package/cjs/Tooltip/Tooltip.d.ts +2 -14
- package/cjs/Tooltip/Tooltip.js +2 -14
- package/cjs/Tooltip/TooltipWrapper.d.ts +5 -0
- package/cjs/Tooltip/TooltipWrapper.js +5 -0
- package/cjs/UserContent/UserContent.d.ts +5 -0
- package/cjs/UserContent/UserContent.js +5 -0
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +5 -0
- package/esm/AnnouncementBadge/AnnouncementBadge.js +6 -0
- package/esm/AutoComplete/AutoComplete.d.ts +2 -13
- package/esm/AutoComplete/AutoComplete.js +17 -30
- package/esm/AutoComplete/utils.d.ts +1 -1
- package/esm/Avatars/ApplicationAvatar.d.ts +5 -1
- package/esm/Avatars/ApplicationAvatar.js +5 -1
- package/esm/Avatars/UserAvatar.d.ts +5 -1
- package/esm/Avatars/UserAvatar.js +5 -1
- package/esm/Badge/Badge.d.ts +2 -12
- package/esm/Badge/Badge.js +2 -12
- package/esm/Banners/Alert/Alert.d.ts +3 -48
- package/esm/Banners/Alert/Alert.js +3 -48
- package/esm/Banners/BigBertha/BigBertha.d.ts +3 -31
- package/esm/Banners/BigBertha/BigBertha.js +3 -31
- package/esm/Banners/Promote/Promote.d.ts +3 -26
- package/esm/Banners/Promote/Promote.js +3 -26
- package/esm/Button/Button.d.ts +2 -11
- package/esm/Button/Button.js +2 -11
- package/esm/Button/ButtonGroup.d.ts +3 -3
- package/esm/Button/ButtonGroup.js +3 -3
- package/esm/Button/IconButton.d.ts +2 -2
- package/esm/Button/IconButton.js +2 -2
- package/esm/Card/Card.d.ts +5 -1
- package/esm/Card/Card.js +5 -1
- package/esm/Checkbox/Checkbox.d.ts +2 -3
- package/esm/Checkbox/Checkbox.js +2 -3
- package/esm/DatePicker/DatePicker/DatePicker.d.ts +5 -0
- package/esm/DatePicker/DatePicker/DatePicker.js +5 -0
- package/esm/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +6 -0
- package/esm/Dropdown/Dropdown.d.ts +3 -8
- package/esm/Dropdown/Dropdown.js +3 -8
- package/esm/Dropzone/Dropzone.d.ts +5 -0
- package/esm/Dropzone/Dropzone.js +6 -0
- package/esm/EmptyState/EmptyState.d.ts +2 -21
- package/esm/EmptyState/EmptyState.js +2 -21
- package/esm/Field/Field.d.ts +2 -31
- package/esm/Field/Field.js +2 -31
- package/esm/Flag/Flag.d.ts +5 -0
- package/esm/Flag/Flag.js +6 -0
- package/esm/FlexGrid/FlexGrid.d.ts +5 -0
- package/esm/FlexGrid/FlexGrid.js +6 -0
- package/esm/HelpUnderline/HelpUnderline.d.ts +5 -0
- package/esm/HelpUnderline/HelpUnderline.js +5 -0
- package/esm/Input/Input.d.ts +2 -4
- package/esm/Input/Input.js +2 -4
- package/esm/Insert/Insert.d.ts +3 -29
- package/esm/Insert/Insert.js +3 -29
- package/esm/KeyboardKey/KeyboardKey.d.ts +5 -0
- package/esm/KeyboardKey/KeyboardKey.js +5 -0
- package/esm/Link/ButtonLink.d.ts +5 -0
- package/esm/Link/ButtonLink.js +5 -0
- package/esm/Link/IconButtonLink.d.ts +5 -0
- package/esm/Link/IconButtonLink.js +5 -0
- package/esm/Link/Link.d.ts +5 -0
- package/esm/Link/Link.js +5 -0
- package/esm/Medallion/Medallion.d.ts +5 -0
- package/esm/Medallion/Medallion.js +6 -0
- package/esm/Modal/Modal.d.ts +5 -0
- package/esm/Modal/Modal.js +6 -0
- package/esm/Pagination/CompactPagination/CompactPagination.d.ts +5 -0
- package/esm/Pagination/CompactPagination/CompactPagination.js +6 -0
- package/esm/Pagination/DotPagination/DotPagination.d.ts +5 -0
- package/esm/Pagination/DotPagination/DotPagination.js +5 -0
- package/esm/Pagination/Pagination/Pagination.d.ts +2 -4
- package/esm/Pagination/Pagination/Pagination.js +2 -4
- package/esm/Popover/Popover.d.ts +5 -0
- package/esm/Popover/Popover.js +6 -0
- package/esm/ProgressBar/ProgressBar.d.ts +1 -1
- package/esm/ProgressBar/ProgressBar.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.d.ts +5 -0
- package/esm/ProgressSpinner/ProgressSpinner.js +27 -19
- package/esm/RadioGroup/RadioGroup.d.ts +2 -12
- package/esm/RadioGroup/RadioGroup.js +2 -12
- package/esm/RangeSlider/RangeSlider.d.ts +2 -4
- package/esm/RangeSlider/RangeSlider.js +2 -4
- package/esm/ScrollIndicator/ScrollIndicator.d.ts +5 -0
- package/esm/ScrollIndicator/ScrollIndicator.js +6 -0
- package/esm/Select/Select.d.ts +2 -5
- package/esm/Select/Select.js +2 -5
- package/esm/Separator/Separator.d.ts +5 -0
- package/esm/Separator/Separator.js +5 -0
- package/esm/Sidebar/Sidebar.d.ts +5 -0
- package/esm/Sidebar/Sidebar.js +6 -0
- package/esm/Switch/Switch.d.ts +5 -0
- package/esm/Switch/Switch.js +5 -0
- package/esm/Tables/DataTable/DataTable.d.ts +2 -16
- package/esm/Tables/DataTable/DataTable.js +2 -16
- package/esm/Tables/Table/Table.d.ts +2 -16
- package/esm/Tables/Table/Table.js +2 -16
- package/esm/Tabs/LinkTabs.d.ts +2 -25
- package/esm/Tabs/LinkTabs.js +2 -25
- package/esm/Tag/Tag.d.ts +2 -19
- package/esm/Tag/Tag.js +2 -19
- package/esm/TextArea/TextArea.d.ts +5 -0
- package/esm/TextArea/TextArea.js +5 -0
- package/esm/TextWrap/TextWrap.d.ts +5 -0
- package/esm/TextWrap/TextWrap.js +6 -0
- package/esm/Toggle/Toggle.d.ts +2 -3
- package/esm/Toggle/Toggle.js +2 -3
- package/esm/Tooltip/OverflowTooltipWrapper.d.ts +5 -0
- package/esm/Tooltip/OverflowTooltipWrapper.js +5 -0
- package/esm/Tooltip/Tooltip.d.ts +2 -14
- package/esm/Tooltip/Tooltip.js +2 -14
- package/esm/Tooltip/TooltipWrapper.d.ts +5 -0
- package/esm/Tooltip/TooltipWrapper.js +5 -0
- package/esm/UserContent/UserContent.d.ts +5 -0
- package/esm/UserContent/UserContent.js +5 -0
- package/package.json +1 -1
@@ -17,5 +17,10 @@ export interface AnnouncementBadgeProps extends HTMLAttributes<HTMLSpanElement>
|
|
17
17
|
locale?: AnnouncementBadgeLocale;
|
18
18
|
children?: never;
|
19
19
|
}
|
20
|
+
/**
|
21
|
+
* The `AnnouncementBadge` component is used to display a small badge with a text on it.
|
22
|
+
*
|
23
|
+
* See the [Announcement Badge documentation page](https://satellite.algolia.com/components/feedback/announcement-badge) for more information.
|
24
|
+
*/
|
20
25
|
export declare const AnnouncementBadge: import("react").ForwardRefExoticComponent<AnnouncementBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
21
26
|
export default AnnouncementBadge;
|
@@ -28,6 +28,12 @@ var SIZE_CLASSNAMES = {
|
|
28
28
|
"default": (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["display-body h-6 leading-md px-2"]))),
|
29
29
|
small: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["display-caption px-1"])))
|
30
30
|
};
|
31
|
+
|
32
|
+
/**
|
33
|
+
* The `AnnouncementBadge` component is used to display a small badge with a text on it.
|
34
|
+
*
|
35
|
+
* See the [Announcement Badge documentation page](https://satellite.algolia.com/components/feedback/announcement-badge) for more information.
|
36
|
+
*/
|
31
37
|
var AnnouncementBadge = exports.AnnouncementBadge = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
32
38
|
var _ref$size = _ref.size,
|
33
39
|
size = _ref$size === void 0 ? "default" : _ref$size,
|
@@ -1,20 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import type { AutoCompleteProps, Option } from "./types";
|
3
3
|
/**
|
4
|
-
* Autocomplete
|
4
|
+
* The `Autocomplete` component enables users to search and select from a list using real-time input matching.
|
5
5
|
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* ## Menu Size Variations
|
9
|
-
* - **Medium (default)**: the standard dropdown menu height for most use cases
|
10
|
-
* - **Large**: when numerous results should be displayed in the dropdown to ease selection
|
11
|
-
*
|
12
|
-
* ## Best practices
|
13
|
-
*
|
14
|
-
* - Provide an empty state if there is no result
|
15
|
-
* - Highlight letters in results matching the query
|
16
|
-
* - Provide matching results quickly
|
17
|
-
* - Style different data
|
6
|
+
* See the [Autocomplete documentation page](https://satellite.algolia.com/components/forms/autocomplete) for more information.
|
18
7
|
*/
|
19
8
|
export declare const AutoComplete: <O extends Option = Option>({ locale: localeProp, id, labelId, "aria-label": ariaLabel, name, placeholder, autoFocus, inputValue: inputValueProp, onTextChange, onFocus, onBlur, disabled, clearable, renderValueTemplate, noWrap, separatorKeys, multiple, value, selectOnBlur, onChange, options, optionItemComponent, creatable, createFromInputValue, emptyState, maxResults: maxItems, menuFooter, menuSize, variant, icon: Icon, endItem, className, menuClassName, valuesClassName, internalsRef, }: AutoCompleteProps<O>) => JSX.Element;
|
20
9
|
export default AutoComplete;
|
@@ -15,6 +15,7 @@ var _react = require("react");
|
|
15
15
|
var _reactFeather = require("react-feather");
|
16
16
|
var _reactPopper = require("react-popper");
|
17
17
|
var _useMeasure3 = _interopRequireDefault(require("react-use/lib/useMeasure"));
|
18
|
+
var _usePrevious = _interopRequireDefault(require("react-use/lib/usePrevious"));
|
18
19
|
var _Card = require("../Card");
|
19
20
|
var _ClickAwayContainer = require("../ClickAwayContainer");
|
20
21
|
var _Field = require("../Field");
|
@@ -51,20 +52,9 @@ var updateRef = function updateRef(ref, value) {
|
|
51
52
|
};
|
52
53
|
|
53
54
|
/**
|
54
|
-
* Autocomplete
|
55
|
+
* The `Autocomplete` component enables users to search and select from a list using real-time input matching.
|
55
56
|
*
|
56
|
-
*
|
57
|
-
*
|
58
|
-
* ## Menu Size Variations
|
59
|
-
* - **Medium (default)**: the standard dropdown menu height for most use cases
|
60
|
-
* - **Large**: when numerous results should be displayed in the dropdown to ease selection
|
61
|
-
*
|
62
|
-
* ## Best practices
|
63
|
-
*
|
64
|
-
* - Provide an empty state if there is no result
|
65
|
-
* - Highlight letters in results matching the query
|
66
|
-
* - Provide matching results quickly
|
67
|
-
* - Style different data
|
57
|
+
* See the [Autocomplete documentation page](https://satellite.algolia.com/components/forms/autocomplete) for more information.
|
68
58
|
*/
|
69
59
|
var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
70
60
|
var localeProp = _ref.locale,
|
@@ -123,17 +113,12 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
123
113
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
124
114
|
internalInputValue = _useState4[0],
|
125
115
|
setInternalInputValue = _useState4[1];
|
126
|
-
|
127
|
-
// See https://github.com/downshift-js/downshift/issues/1108
|
128
|
-
// as to why we manage the input value ourselves completely
|
129
|
-
var updateInputValue = function updateInputValue(value) {
|
130
|
-
setInternalInputValue(value);
|
131
|
-
onTextChange === null || onTextChange === void 0 || onTextChange(value);
|
132
|
-
};
|
116
|
+
var previousValue = (0, _usePrevious["default"])(value);
|
133
117
|
(0, _react.useEffect)(function () {
|
134
118
|
if (multiple || typeof inputValueProp !== "undefined") return;
|
135
|
-
|
136
|
-
|
119
|
+
if (!Array.isArray(previousValue) && (0, _utils.optionToString)(previousValue) === (0, _utils.optionToString)(value)) return;
|
120
|
+
setInternalInputValue((0, _utils.optionToString)(value));
|
121
|
+
}, [multiple, inputValueProp, previousValue, value]);
|
137
122
|
var inputValue = inputValueProp !== null && inputValueProp !== void 0 ? inputValueProp : internalInputValue;
|
138
123
|
var _useState5 = (0, _react.useState)(null),
|
139
124
|
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
@@ -232,11 +217,11 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
232
217
|
combobox.setHighlightedIndex(maxItems);
|
233
218
|
} else if (multiple) {
|
234
219
|
multipleSelection.addSelectedItem(selectedItem);
|
235
|
-
|
220
|
+
setInternalInputValue("");
|
236
221
|
setShowAllItems(false);
|
237
222
|
} else {
|
238
223
|
multipleSelection.setSelectedItems([selectedItem]);
|
239
|
-
|
224
|
+
setInternalInputValue((0, _utils.optionToString)(selectedItem));
|
240
225
|
setShowAllItems(false);
|
241
226
|
}
|
242
227
|
break;
|
@@ -244,7 +229,7 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
244
229
|
case _downshift.useCombobox.stateChangeTypes.InputKeyDownEscape:
|
245
230
|
{
|
246
231
|
if (!combobox.isOpen) {
|
247
|
-
|
232
|
+
setInternalInputValue("");
|
248
233
|
multipleSelection.setSelectedItems([]);
|
249
234
|
}
|
250
235
|
break;
|
@@ -261,10 +246,13 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
261
246
|
ref: inputRef,
|
262
247
|
autoFocus: autoFocus,
|
263
248
|
disabled: disabled,
|
249
|
+
// See https://github.com/downshift-js/downshift/issues/1108
|
250
|
+
// as to why we manage the input value ourselves completely
|
264
251
|
onChange: function onChange(evt) {
|
265
252
|
var _value, _menuPopper$update;
|
266
253
|
var newInputValue = (_value = evt.currentTarget.value) !== null && _value !== void 0 ? _value : "";
|
267
|
-
|
254
|
+
setInternalInputValue(newInputValue);
|
255
|
+
onTextChange === null || onTextChange === void 0 || onTextChange(newInputValue);
|
268
256
|
if (!multiple && value && !newInputValue) {
|
269
257
|
multipleSelection.setSelectedItems([]);
|
270
258
|
}
|
@@ -294,7 +282,7 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
294
282
|
newOption = _createFromInputValue2[0];
|
295
283
|
if (newOption && !newOption.disabled) {
|
296
284
|
multipleSelection.addSelectedItem(newOption);
|
297
|
-
|
285
|
+
setInternalInputValue("");
|
298
286
|
}
|
299
287
|
}
|
300
288
|
}
|
@@ -386,9 +374,8 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
|
|
386
374
|
}), showClearButton && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
387
375
|
type: "button",
|
388
376
|
className: (0, _satellitePrefixer["default"])(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["w-6 h-6 flex items-center justify-center text-grey-500"]))),
|
389
|
-
onClick: function onClick(
|
390
|
-
|
391
|
-
updateInputValue("");
|
377
|
+
onClick: function onClick() {
|
378
|
+
setInternalInputValue("");
|
392
379
|
multipleSelection.setSelectedItems([]);
|
393
380
|
},
|
394
381
|
"aria-label": locale.clearInputButton,
|
@@ -3,6 +3,6 @@ export declare function isAutoCompleteMultiProps<T extends Option = Option>(prop
|
|
3
3
|
export declare const defaultCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
4
4
|
export declare const caseInsensitiveCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
5
5
|
export declare const DEFAULT_AUTOCOMPLETE_LOCALE: Required<AutoCompleteLocale>;
|
6
|
-
export declare const optionToString: (option: Option | null) => string;
|
6
|
+
export declare const optionToString: (option: Option | null | undefined) => string;
|
7
7
|
export declare function filter<T extends Option = Option>(options: T[], selectedItems: T[], itemValue: string): T[];
|
8
8
|
export declare function inputValueFromProps<T extends Option = Option>(props: AutoCompleteProps<T>): string;
|
@@ -8,6 +8,10 @@ export interface ApplicationAvatarProps {
|
|
8
8
|
/** @ignore */
|
9
9
|
className?: string;
|
10
10
|
}
|
11
|
-
/**
|
11
|
+
/**
|
12
|
+
* The `ApplicationAvatar` component is used as a visual representation of an application.
|
13
|
+
*
|
14
|
+
* See the [Application Avatar documentation page](https://satellite.algolia.com/components/images/application-avatar) for more information.
|
15
|
+
*/
|
12
16
|
export declare const ApplicationAvatar: VFC<ApplicationAvatarProps>;
|
13
17
|
export default ApplicationAvatar;
|
@@ -15,7 +15,11 @@ var SIZE_CLASSNAMES = {
|
|
15
15
|
small: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["w-4 h-4"]))),
|
16
16
|
medium: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["w-8 h-8"])))
|
17
17
|
};
|
18
|
-
/**
|
18
|
+
/**
|
19
|
+
* The `ApplicationAvatar` component is used as a visual representation of an application.
|
20
|
+
*
|
21
|
+
* See the [Application Avatar documentation page](https://satellite.algolia.com/components/images/application-avatar) for more information.
|
22
|
+
*/
|
19
23
|
var ApplicationAvatar = exports.ApplicationAvatar = function ApplicationAvatar(_ref) {
|
20
24
|
var className = _ref.className,
|
21
25
|
application = _ref.application,
|
@@ -15,6 +15,10 @@ export interface UserAvatarProps {
|
|
15
15
|
className?: string;
|
16
16
|
locale?: UserAvatarLocale;
|
17
17
|
}
|
18
|
-
/**
|
18
|
+
/**
|
19
|
+
* The `UserAvatar` component is used as a visual representation of a user.
|
20
|
+
*
|
21
|
+
* See the [User Avatar documentation page](https://satellite.algolia.com/components/images/user-avatar) for more information.
|
22
|
+
*/
|
19
23
|
export declare const UserAvatar: VFC<UserAvatarProps>;
|
20
24
|
export default UserAvatar;
|
@@ -19,7 +19,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
19
19
|
var DEFAULT_LOCALE = {
|
20
20
|
fallbackText: "User's avatar"
|
21
21
|
};
|
22
|
-
/**
|
22
|
+
/**
|
23
|
+
* The `UserAvatar` component is used as a visual representation of a user.
|
24
|
+
*
|
25
|
+
* See the [User Avatar documentation page](https://satellite.algolia.com/components/images/user-avatar) for more information.
|
26
|
+
*/
|
23
27
|
var UserAvatar = exports.UserAvatar = function UserAvatar(_ref) {
|
24
28
|
var _user$email;
|
25
29
|
var className = _ref.className,
|
package/cjs/Badge/Badge.d.ts
CHANGED
@@ -15,19 +15,9 @@ declare type BadgeContentProps = {
|
|
15
15
|
};
|
16
16
|
export declare type BadgeProps = BaseBadgeProps & AtLeastOne<BadgeContentProps>;
|
17
17
|
/**
|
18
|
-
*
|
18
|
+
* The `Badge` component is a visual marker highlighting information or status. It enhances UI, indicates progress, and classifies data.
|
19
19
|
*
|
20
|
-
*
|
21
|
-
* - Bages usually come after a textual information or explanation
|
22
|
-
* - Don't use badges where traditional error messages (such as form validation) can be used instead
|
23
|
-
* - Don't use badges with combination of buttons
|
24
|
-
* - Badges are not interactive
|
25
|
-
*
|
26
|
-
* Do use
|
27
|
-
*
|
28
|
-
* - To indicate progress of an A/B test
|
29
|
-
* - To indicate problem with an index
|
30
|
-
* - To display numeric values for multiple items (similar to a "tag cloud")
|
20
|
+
* See the [Badge documentation page](https://satellite.algolia.com/components/feedback/badge) for more information.
|
31
21
|
*/
|
32
22
|
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
33
23
|
export default Badge;
|
package/cjs/Badge/Badge.js
CHANGED
@@ -34,19 +34,9 @@ var SIZE_CLASSNAMES = {
|
|
34
34
|
};
|
35
35
|
|
36
36
|
/**
|
37
|
-
*
|
37
|
+
* The `Badge` component is a visual marker highlighting information or status. It enhances UI, indicates progress, and classifies data.
|
38
38
|
*
|
39
|
-
*
|
40
|
-
* - Bages usually come after a textual information or explanation
|
41
|
-
* - Don't use badges where traditional error messages (such as form validation) can be used instead
|
42
|
-
* - Don't use badges with combination of buttons
|
43
|
-
* - Badges are not interactive
|
44
|
-
*
|
45
|
-
* Do use
|
46
|
-
*
|
47
|
-
* - To indicate progress of an A/B test
|
48
|
-
* - To indicate problem with an index
|
49
|
-
* - To display numeric values for multiple items (similar to a "tag cloud")
|
39
|
+
* See the [Badge documentation page](https://satellite.algolia.com/components/feedback/badge) for more information.
|
50
40
|
*/
|
51
41
|
var Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
52
42
|
var children = _ref.children,
|
@@ -25,54 +25,9 @@ export interface AlertProps {
|
|
25
25
|
children: ReactNode;
|
26
26
|
}
|
27
27
|
/**
|
28
|
-
*
|
29
|
-
|
30
|
-
*
|
31
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A262266)
|
32
|
-
|
33
|
-
* ## Current Status
|
34
|
-
* - [x] Figma
|
35
|
-
* - [x] React
|
36
|
-
* - [ ] Documentation
|
37
|
-
|
38
|
-
* ## Component structure
|
39
|
-
* This component uses a common banner structure. It uses an icon that should match the intent of the message, an optional title _(Highly recommended)_, a short paragraph of text and optional buttons for follow up actions. The `Alert` is dismissible by default, to do so a cross icon is displayed on the top-right corner.
|
40
|
-
|
41
|
-
* ## Guidelines
|
42
|
-
* ### How to use it?
|
43
|
-
* Use the `Alert` if you want to inform the user about a specific action they need to do after something happened.
|
44
|
-
|
45
|
-
* ### How to NOT use it?
|
46
|
-
* Do not use the component to give higher visibility to trivial information, use the [Insert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-insert--basic) component instead.
|
47
|
-
* Make sure that alerts are not stacking, We highly recommend to have only one per page if possible, though we understand that sometimes this is not possible.
|
48
|
-
* Do not use a product wide `Alert` to display features information.
|
49
|
-
|
50
|
-
* ### Variants
|
51
|
-
* This component comes with two sets of Variants:
|
52
|
-
|
53
|
-
* #### Color
|
54
|
-
* - `Grey` `Default`
|
55
|
-
* Use this as your default Alert if no other color matches your use-case.
|
56
|
-
* - `Accent` `Primary`
|
57
|
-
* Use this to represent something that is currently happening with no level of severity.
|
58
|
-
* - `Green` `Success`
|
59
|
-
* Use this to inform the user that an action has been completed in the background while the user wasn't on that page and/or needs further exploration from the user. For smaller and quick processes use the [Flag](https://algolia-satellite.netlify.app/?path=/docs/indicators-flag--basic) instead.
|
60
|
-
* - `Orange` `Warning`
|
61
|
-
* Use this to show the user that something important requires their attention. The warning should be used for low to medium errors.
|
62
|
-
* - `Red` `Failure`
|
63
|
-
* Use this to show the user that something requires their full attention and actions. Only use red for critical warnings that will result in a loss of data of production down time.
|
64
|
-
|
65
|
-
* #### Usage Context
|
66
|
-
* - `Page`
|
67
|
-
* This is for global and product wide alerts, use that with extreme caution as it's will impact every page and every feature.
|
68
|
-
* - `Section`
|
69
|
-
* This alert should be inside the frame of a section and linked to the content it impacts
|
70
|
-
|
71
|
-
* ### Do's and Don't
|
72
|
-
* TODO
|
73
|
-
|
74
|
-
* ## Accessibility
|
75
|
-
* TODO
|
28
|
+
* The `Alert` component give users suggestions, tips, warnings, and error information without stopping them from completing the tasks they're doing.
|
29
|
+
*
|
30
|
+
* See the [Alert documentation page](https://satellite.algolia.com/components/feedback/alert) for more information.
|
76
31
|
*/
|
77
32
|
export declare const Alert: VFC<AlertProps>;
|
78
33
|
export default Alert;
|
@@ -43,54 +43,9 @@ var ICON_CLASSNAME_VARIANTS = {
|
|
43
43
|
};
|
44
44
|
|
45
45
|
/**
|
46
|
-
*
|
47
|
-
|
48
|
-
*
|
49
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A262266)
|
50
|
-
|
51
|
-
* ## Current Status
|
52
|
-
* - [x] Figma
|
53
|
-
* - [x] React
|
54
|
-
* - [ ] Documentation
|
55
|
-
|
56
|
-
* ## Component structure
|
57
|
-
* This component uses a common banner structure. It uses an icon that should match the intent of the message, an optional title _(Highly recommended)_, a short paragraph of text and optional buttons for follow up actions. The `Alert` is dismissible by default, to do so a cross icon is displayed on the top-right corner.
|
58
|
-
|
59
|
-
* ## Guidelines
|
60
|
-
* ### How to use it?
|
61
|
-
* Use the `Alert` if you want to inform the user about a specific action they need to do after something happened.
|
62
|
-
|
63
|
-
* ### How to NOT use it?
|
64
|
-
* Do not use the component to give higher visibility to trivial information, use the [Insert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-insert--basic) component instead.
|
65
|
-
* Make sure that alerts are not stacking, We highly recommend to have only one per page if possible, though we understand that sometimes this is not possible.
|
66
|
-
* Do not use a product wide `Alert` to display features information.
|
67
|
-
|
68
|
-
* ### Variants
|
69
|
-
* This component comes with two sets of Variants:
|
70
|
-
|
71
|
-
* #### Color
|
72
|
-
* - `Grey` `Default`
|
73
|
-
* Use this as your default Alert if no other color matches your use-case.
|
74
|
-
* - `Accent` `Primary`
|
75
|
-
* Use this to represent something that is currently happening with no level of severity.
|
76
|
-
* - `Green` `Success`
|
77
|
-
* Use this to inform the user that an action has been completed in the background while the user wasn't on that page and/or needs further exploration from the user. For smaller and quick processes use the [Flag](https://algolia-satellite.netlify.app/?path=/docs/indicators-flag--basic) instead.
|
78
|
-
* - `Orange` `Warning`
|
79
|
-
* Use this to show the user that something important requires their attention. The warning should be used for low to medium errors.
|
80
|
-
* - `Red` `Failure`
|
81
|
-
* Use this to show the user that something requires their full attention and actions. Only use red for critical warnings that will result in a loss of data of production down time.
|
82
|
-
|
83
|
-
* #### Usage Context
|
84
|
-
* - `Page`
|
85
|
-
* This is for global and product wide alerts, use that with extreme caution as it's will impact every page and every feature.
|
86
|
-
* - `Section`
|
87
|
-
* This alert should be inside the frame of a section and linked to the content it impacts
|
88
|
-
|
89
|
-
* ### Do's and Don't
|
90
|
-
* TODO
|
91
|
-
|
92
|
-
* ## Accessibility
|
93
|
-
* TODO
|
46
|
+
* The `Alert` component give users suggestions, tips, warnings, and error information without stopping them from completing the tasks they're doing.
|
47
|
+
*
|
48
|
+
* See the [Alert documentation page](https://satellite.algolia.com/components/feedback/alert) for more information.
|
94
49
|
*/
|
95
50
|
var Alert = exports.Alert = function Alert(_ref) {
|
96
51
|
var title = _ref.title,
|
@@ -5,37 +5,9 @@ export interface BigBerthaProps {
|
|
5
5
|
children: ReactNode;
|
6
6
|
}
|
7
7
|
/**
|
8
|
-
*
|
9
|
-
|
10
|
-
*
|
11
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A279476)
|
12
|
-
|
13
|
-
* ## Current Status
|
14
|
-
* - [x] Figma
|
15
|
-
* - [x] React
|
16
|
-
* - [ ] Documentation
|
17
|
-
|
18
|
-
* ## Component structure
|
19
|
-
* This is a simple high contrast banner. It use an icon that should match the content of the message, a short text that describe the situation and can contain "Learn more" links.
|
20
|
-
|
21
|
-
* ## Guidelines
|
22
|
-
|
23
|
-
* ### How to use it?
|
24
|
-
* This component should only be used to inform the user about an on-going situation at Algolia that will impact the users' or end-users' experience with our products. The content of the message should be concise and explicit. Make sure that the tone used in the text does not generate stress.
|
25
|
-
|
26
|
-
* ### How to NOT use it?
|
27
|
-
* - Do not use this banner for any non critical announcement or any non product wide announcement.
|
28
|
-
* - If you want to inform the user about something in your features, please use the [Alert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-alert--variants) component.
|
29
|
-
* - If you want to promote a specific feature, please use the [Promote Banner](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-promote--basic) component.
|
30
|
-
|
31
|
-
* ### Variants
|
32
|
-
* - Blue banner : Default state of this component
|
33
|
-
|
34
|
-
* ### Do's and Don't
|
35
|
-
* TODO
|
36
|
-
|
37
|
-
* ## Accessibility
|
38
|
-
* TODO
|
8
|
+
* The `BigBertha` component is a top-of-page alert for critical system messages, updates, and urgent warnings.
|
9
|
+
*
|
10
|
+
* See the [Big Bertha documentation page](https://satellite.algolia.com/components/feedback/big-bertha) for more information.
|
39
11
|
*/
|
40
12
|
export declare const BigBertha: VFC<BigBerthaProps>;
|
41
13
|
export default BigBertha;
|
@@ -11,37 +11,9 @@ var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/sa
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
12
12
|
var _templateObject, _templateObject2, _templateObject3;
|
13
13
|
/**
|
14
|
-
*
|
15
|
-
|
16
|
-
*
|
17
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A279476)
|
18
|
-
|
19
|
-
* ## Current Status
|
20
|
-
* - [x] Figma
|
21
|
-
* - [x] React
|
22
|
-
* - [ ] Documentation
|
23
|
-
|
24
|
-
* ## Component structure
|
25
|
-
* This is a simple high contrast banner. It use an icon that should match the content of the message, a short text that describe the situation and can contain "Learn more" links.
|
26
|
-
|
27
|
-
* ## Guidelines
|
28
|
-
|
29
|
-
* ### How to use it?
|
30
|
-
* This component should only be used to inform the user about an on-going situation at Algolia that will impact the users' or end-users' experience with our products. The content of the message should be concise and explicit. Make sure that the tone used in the text does not generate stress.
|
31
|
-
|
32
|
-
* ### How to NOT use it?
|
33
|
-
* - Do not use this banner for any non critical announcement or any non product wide announcement.
|
34
|
-
* - If you want to inform the user about something in your features, please use the [Alert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-alert--variants) component.
|
35
|
-
* - If you want to promote a specific feature, please use the [Promote Banner](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-promote--basic) component.
|
36
|
-
|
37
|
-
* ### Variants
|
38
|
-
* - Blue banner : Default state of this component
|
39
|
-
|
40
|
-
* ### Do's and Don't
|
41
|
-
* TODO
|
42
|
-
|
43
|
-
* ## Accessibility
|
44
|
-
* TODO
|
14
|
+
* The `BigBertha` component is a top-of-page alert for critical system messages, updates, and urgent warnings.
|
15
|
+
*
|
16
|
+
* See the [Big Bertha documentation page](https://satellite.algolia.com/components/feedback/big-bertha) for more information.
|
45
17
|
*/
|
46
18
|
var BigBertha = exports.BigBertha = function BigBertha(_ref) {
|
47
19
|
var icon = _ref.icon,
|
@@ -20,32 +20,9 @@ export declare type PromoteProps = {
|
|
20
20
|
children: ReactNode;
|
21
21
|
} & (CompactPromoteProps | WidePromoteProps);
|
22
22
|
/**
|
23
|
-
*
|
24
|
-
|
25
|
-
*
|
26
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A279945)
|
27
|
-
|
28
|
-
* ## Current Status
|
29
|
-
* - [x] Figma
|
30
|
-
* - [x] React
|
31
|
-
* - [ ] Documentation
|
32
|
-
|
33
|
-
* ## Component structure
|
34
|
-
* This component is a bigger banner. It include an optional image, an optional product context, a title, a short text (2 lines maximum without an image and 3 lines maximum with an image), optional CTAs (one primary and one secondary). It comes in two different variants: `large` and `compact`.
|
35
|
-
|
36
|
-
* ## Guidelines
|
37
|
-
* ### How to use it?
|
38
|
-
* You should use this component to display to the users that a new features/product is now available for them in the current context they are in. This feature can be automatically available or locked behind higher plan tier, please make sure you adapt the content to not give false impression of availability to the user.
|
39
|
-
|
40
|
-
* This component is permanently dismissible by default.
|
41
|
-
|
42
|
-
* ### How to NOT use it?
|
43
|
-
* - Do not use this banner as a regular [Alert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-alert--variants).
|
44
|
-
* - You can only use one `large` promotion banner per context and two/four compact per context.
|
45
|
-
|
46
|
-
* ### Variants
|
47
|
-
* - `large`
|
48
|
-
* - `compact`
|
23
|
+
* The `Promote` component is a contextual way of showing a user that a new feature or product is available to them on a higher plan or as an option.
|
24
|
+
*
|
25
|
+
* See the [Promote documentation page](https://satellite.algolia.com/components/feedback/promote-banner) for more information.
|
49
26
|
*/
|
50
27
|
export declare const Promote: VFC<PromoteProps>;
|
51
28
|
export default Promote;
|
@@ -27,32 +27,9 @@ var ACTIONS_VARIANT_CLASSNAMES = {
|
|
27
27
|
};
|
28
28
|
|
29
29
|
/**
|
30
|
-
*
|
31
|
-
|
32
|
-
*
|
33
|
-
* [See the component in Figma](https://www.figma.com/file/99l59il97k2n5y4n6Jucal/%5BSatellite%5D-Components?node-id=2912%3A279945)
|
34
|
-
|
35
|
-
* ## Current Status
|
36
|
-
* - [x] Figma
|
37
|
-
* - [x] React
|
38
|
-
* - [ ] Documentation
|
39
|
-
|
40
|
-
* ## Component structure
|
41
|
-
* This component is a bigger banner. It include an optional image, an optional product context, a title, a short text (2 lines maximum without an image and 3 lines maximum with an image), optional CTAs (one primary and one secondary). It comes in two different variants: `large` and `compact`.
|
42
|
-
|
43
|
-
* ## Guidelines
|
44
|
-
* ### How to use it?
|
45
|
-
* You should use this component to display to the users that a new features/product is now available for them in the current context they are in. This feature can be automatically available or locked behind higher plan tier, please make sure you adapt the content to not give false impression of availability to the user.
|
46
|
-
|
47
|
-
* This component is permanently dismissible by default.
|
48
|
-
|
49
|
-
* ### How to NOT use it?
|
50
|
-
* - Do not use this banner as a regular [Alert](https://algolia-satellite.netlify.app/?path=/docs/indicators-banners-alert--variants).
|
51
|
-
* - You can only use one `large` promotion banner per context and two/four compact per context.
|
52
|
-
|
53
|
-
* ### Variants
|
54
|
-
* - `large`
|
55
|
-
* - `compact`
|
30
|
+
* The `Promote` component is a contextual way of showing a user that a new feature or product is available to them on a higher plan or as an option.
|
31
|
+
*
|
32
|
+
* See the [Promote documentation page](https://satellite.algolia.com/components/feedback/promote-banner) for more information.
|
56
33
|
*/
|
57
34
|
var Promote = exports.Promote = function Promote(_ref) {
|
58
35
|
var context = _ref.context,
|
package/cjs/Button/Button.d.ts
CHANGED
@@ -2,18 +2,9 @@
|
|
2
2
|
import { type PolymorphicButtonProps } from "./PolymorphicButton";
|
3
3
|
export declare type ButtonProps = Omit<PolymorphicButtonProps<"button">, "as" | "ref">;
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* The `Button` component is used to trigger user actions (like "Add", "Close" or "Save") or navigate users elsewhere through the links. It can contain a combination of a clear label and an icon while links are always text.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
* - **Primary**: to highlight the strongest action on a page. Should only appear once per screen. Not every screen requires a primary button
|
9
|
-
* - **Neutral (default)**: the standard button for most use cases
|
10
|
-
* - **Destructive**: appears as a final confirmation for a destructive action (e.g. deleting an index). Should be used with care, primarily in confirmation modals
|
11
|
-
* - **Subtle-neutral**: user with a primary button or for actionals that are less crucial (e.g. Cancel)
|
12
|
-
*
|
13
|
-
* ## Styles
|
14
|
-
* - Use icons before the label in any button type to draw more attention to it, or help convey more meaning
|
15
|
-
* - Use icon-only button for an action that is less critical and doesn't have to drag too much of user attention
|
16
|
-
* - Buttons can take the full width to fill the parent container
|
7
|
+
* See the [Button documentation page](https://satellite.algolia.com/components/actions/button) for more information.
|
17
8
|
*/
|
18
9
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
19
10
|
export default Button;
|
package/cjs/Button/Button.js
CHANGED
@@ -12,18 +12,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* The `Button` component is used to trigger user actions (like "Add", "Close" or "Save") or navigate users elsewhere through the links. It can contain a combination of a clear label and an icon while links are always text.
|
16
16
|
*
|
17
|
-
*
|
18
|
-
* - **Primary**: to highlight the strongest action on a page. Should only appear once per screen. Not every screen requires a primary button
|
19
|
-
* - **Neutral (default)**: the standard button for most use cases
|
20
|
-
* - **Destructive**: appears as a final confirmation for a destructive action (e.g. deleting an index). Should be used with care, primarily in confirmation modals
|
21
|
-
* - **Subtle-neutral**: user with a primary button or for actionals that are less crucial (e.g. Cancel)
|
22
|
-
*
|
23
|
-
* ## Styles
|
24
|
-
* - Use icons before the label in any button type to draw more attention to it, or help convey more meaning
|
25
|
-
* - Use icon-only button for an action that is less critical and doesn't have to drag too much of user attention
|
26
|
-
* - Buttons can take the full width to fill the parent container
|
17
|
+
* See the [Button documentation page](https://satellite.algolia.com/components/actions/button) for more information.
|
27
18
|
*/
|
28
19
|
var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
29
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PolymorphicButton.PolymorphicButton, _objectSpread(_objectSpread({}, props), {}, {
|
@@ -10,9 +10,9 @@ export interface ButtonGroupProps {
|
|
10
10
|
children: ReactNode;
|
11
11
|
}
|
12
12
|
/**
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
13
|
+
* The `ButtonGroup` component is used to group buttons together.
|
14
|
+
*
|
15
|
+
* See the [Button Group documentation page](https://satellite.algolia.com/components/actions/button-group) for more information.
|
16
16
|
*/
|
17
17
|
export declare const ButtonGroup: VFC<ButtonGroupProps>;
|
18
18
|
export default ButtonGroup;
|
@@ -11,9 +11,9 @@ var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satel
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
12
12
|
var _templateObject;
|
13
13
|
/**
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
14
|
+
* The `ButtonGroup` component is used to group buttons together.
|
15
|
+
*
|
16
|
+
* See the [Button Group documentation page](https://satellite.algolia.com/components/actions/button-group) for more information.
|
17
17
|
*/
|
18
18
|
var ButtonGroup = exports.ButtonGroup = function ButtonGroup(_ref) {
|
19
19
|
var className = _ref.className,
|