@algolia/satellite 1.0.0-beta.175 → 1.0.0-beta.177
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/Button/Button.tailwind.js +1 -0
- package/cjs/Button/PolymorphicButton.js +1 -1
- package/cjs/Dropdown/Dropdown.d.ts +1 -5
- package/cjs/Dropdown/Dropdown.js +12 -15
- package/cjs/Dropdown/DropdownButton.d.ts +3 -0
- package/cjs/Dropdown/DropdownButton.js +3 -0
- package/cjs/Dropdown/components/DropdownButtonItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownButtonItem.js +5 -2
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +2 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +1 -0
- package/cjs/Dropdown/components/DropdownDivider.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownDivider.js +1 -0
- package/cjs/Dropdown/components/DropdownFooterItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownFooterItem.js +1 -0
- package/cjs/Dropdown/components/DropdownLinkItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownLinkItem.js +5 -2
- package/cjs/Dropdown/components/DropdownRadioItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownRadioItem.js +6 -2
- package/cjs/Dropdown/components/DropdownTitle.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownTitle.js +1 -0
- package/cjs/Dropdown/components/DropdownToggleItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownToggleItem.js +6 -2
- package/cjs/EmptyState/EmptyState.js +4 -9
- package/cjs/MenuButton/MenuButton.d.ts +13 -11
- package/cjs/MenuButton/MenuButton.js +15 -39
- package/cjs/MenuButton/components/Content.d.ts +4 -0
- package/cjs/MenuButton/components/Content.js +39 -0
- package/cjs/MenuButton/components/DefaultTrigger.d.ts +2 -2
- package/cjs/MenuButton/components/DefaultTrigger.js +5 -2
- package/cjs/MenuButton/components/items/Item.d.ts +15 -0
- package/cjs/MenuButton/components/items/{ButtonItem.js → Item.js} +14 -17
- package/cjs/MenuButton/components/items/index.d.ts +1 -1
- package/cjs/MenuButton/components/items/index.js +4 -4
- package/cjs/MenuButton/index.d.ts +1 -1
- package/cjs/MenuButton/index.js +11 -8
- package/cjs/MenuButton/useMenuItemProps.d.ts +3 -3
- package/cjs/MenuButton/useMenuItemProps.js +1 -1
- package/cjs/Satellite/locale.d.ts +6 -2
- package/cjs/Stepper/Step.d.ts +7 -0
- package/cjs/Stepper/Step.js +116 -0
- package/cjs/Stepper/Stepper.d.ts +42 -0
- package/cjs/Stepper/Stepper.js +146 -0
- package/cjs/Stepper/StepperContext.d.ts +12 -0
- package/cjs/Stepper/StepperContext.js +15 -0
- package/cjs/Stepper/index.d.ts +4 -0
- package/cjs/Stepper/index.js +51 -0
- package/cjs/Stepper/types.d.ts +26 -0
- package/cjs/Stepper/utils.d.ts +5 -0
- package/cjs/Stepper/utils.js +67 -0
- package/cjs/Toast/Toast.d.ts +6 -0
- package/cjs/{Flag/Flag.js → Toast/Toast.js} +50 -63
- package/{esm/Flag/Flag.tailwind.d.ts → cjs/Toast/Toast.tailwind.d.ts} +2 -2
- package/cjs/{Flag/Flag.tailwind.js → Toast/Toast.tailwind.js} +7 -7
- package/cjs/Toast/Toasts.d.ts +21 -0
- package/cjs/Toast/Toasts.js +102 -0
- package/cjs/Toast/index.d.ts +4 -0
- package/cjs/{Flag → Toast}/index.js +9 -9
- package/cjs/Toast/types.d.ts +34 -0
- package/cjs/Toast/types.js +5 -0
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +24 -12
- package/cjs/styles/tailwind.config.js +1 -1
- package/cjs/types.d.ts +3 -3
- package/cjs/utils/getTextFromReactNode.d.ts +4 -0
- package/cjs/utils/getTextFromReactNode.js +20 -0
- package/esm/Button/Button.tailwind.js +1 -0
- package/esm/Button/PolymorphicButton.js +1 -1
- package/esm/Dropdown/Dropdown.d.ts +1 -5
- package/esm/Dropdown/Dropdown.js +12 -15
- package/esm/Dropdown/DropdownButton.d.ts +3 -0
- package/esm/Dropdown/DropdownButton.js +3 -0
- package/esm/Dropdown/components/DropdownButtonItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownButtonItem.js +5 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +2 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +1 -0
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +1 -0
- package/esm/Dropdown/components/DropdownDivider.d.ts +1 -0
- package/esm/Dropdown/components/DropdownDivider.js +2 -0
- package/esm/Dropdown/components/DropdownFooterItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownFooterItem.js +1 -0
- package/esm/Dropdown/components/DropdownLinkItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownLinkItem.js +5 -2
- package/esm/Dropdown/components/DropdownRadioItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownRadioItem.js +6 -2
- package/esm/Dropdown/components/DropdownTitle.d.ts +1 -0
- package/esm/Dropdown/components/DropdownTitle.js +1 -0
- package/esm/Dropdown/components/DropdownToggleItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownToggleItem.js +6 -2
- package/esm/EmptyState/EmptyState.js +4 -9
- package/esm/MenuButton/MenuButton.d.ts +13 -11
- package/esm/MenuButton/MenuButton.js +15 -39
- package/esm/MenuButton/components/Content.d.ts +4 -0
- package/esm/MenuButton/components/Content.js +32 -0
- package/esm/MenuButton/components/DefaultTrigger.d.ts +2 -2
- package/esm/MenuButton/components/DefaultTrigger.js +5 -2
- package/esm/MenuButton/components/items/Item.d.ts +15 -0
- package/esm/MenuButton/components/items/{ButtonItem.js → Item.js} +13 -16
- package/esm/MenuButton/components/items/index.d.ts +1 -1
- package/esm/MenuButton/components/items/index.js +1 -1
- package/esm/MenuButton/index.d.ts +1 -1
- package/esm/MenuButton/index.js +1 -1
- package/esm/MenuButton/useMenuItemProps.d.ts +3 -3
- package/esm/MenuButton/useMenuItemProps.js +1 -1
- package/esm/Satellite/locale.d.ts +6 -2
- package/esm/Stepper/Step.d.ts +7 -0
- package/esm/Stepper/Step.js +110 -0
- package/esm/Stepper/Stepper.d.ts +42 -0
- package/esm/Stepper/Stepper.js +139 -0
- package/esm/Stepper/StepperContext.d.ts +12 -0
- package/esm/Stepper/StepperContext.js +9 -0
- package/esm/Stepper/index.d.ts +4 -0
- package/esm/Stepper/index.js +4 -0
- package/esm/Stepper/types.d.ts +26 -0
- package/esm/Stepper/utils.d.ts +5 -0
- package/esm/Stepper/utils.js +61 -0
- package/esm/Toast/Toast.d.ts +6 -0
- package/esm/{Flag/Flag.js → Toast/Toast.js} +46 -62
- package/{cjs/Flag/Flag.tailwind.d.ts → esm/Toast/Toast.tailwind.d.ts} +2 -2
- package/esm/{Flag/Flag.tailwind.js → Toast/Toast.tailwind.js} +7 -7
- package/esm/Toast/Toasts.d.ts +21 -0
- package/esm/Toast/Toasts.js +93 -0
- package/esm/Toast/index.d.ts +4 -0
- package/esm/Toast/index.js +4 -0
- package/esm/Toast/types.d.ts +34 -0
- package/esm/Toast/types.js +1 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/styles/tailwind.config.js +1 -1
- package/esm/types.d.ts +3 -3
- package/esm/utils/getTextFromReactNode.d.ts +4 -0
- package/esm/utils/getTextFromReactNode.js +15 -0
- package/package.json +2 -1
- package/satellite.min.css +1 -1
- package/cjs/Flag/Flag.d.ts +0 -11
- package/cjs/Flag/Flags.d.ts +0 -48
- package/cjs/Flag/Flags.js +0 -90
- package/cjs/Flag/index.d.ts +0 -4
- package/cjs/Flag/types.d.ts +0 -27
- package/cjs/MenuButton/components/items/ButtonItem.d.ts +0 -14
- package/esm/Flag/Flag.d.ts +0 -11
- package/esm/Flag/Flags.d.ts +0 -48
- package/esm/Flag/Flags.js +0 -83
- package/esm/Flag/index.d.ts +0 -4
- package/esm/Flag/index.js +0 -4
- package/esm/Flag/types.d.ts +0 -27
- package/esm/MenuButton/components/items/ButtonItem.d.ts +0 -14
- /package/cjs/{Flag → Stepper}/types.js +0 -0
- /package/esm/{Flag → Stepper}/types.js +0 -0
package/cjs/Flag/types.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
2
|
-
import type { IconComponentType } from "../Icons";
|
3
|
-
import type { ColorVariant } from "../types";
|
4
|
-
export interface Notification {
|
5
|
-
/** Unique notification ID */
|
6
|
-
id: string;
|
7
|
-
title?: string;
|
8
|
-
/** Content goes here */
|
9
|
-
content: ReactNode;
|
10
|
-
/** Icon to accompany the notification */
|
11
|
-
icon?: IconComponentType;
|
12
|
-
/** @default false */
|
13
|
-
loading?: boolean;
|
14
|
-
/** @default "blue" */
|
15
|
-
variant?: ColorVariant;
|
16
|
-
/**
|
17
|
-
* Function triggered when the dismiss button is clicked.
|
18
|
-
* Dismiss button won't be rendered if absent.
|
19
|
-
* */
|
20
|
-
onDismiss?: () => void;
|
21
|
-
/** Defines if and how long before the notification should be dismissed (in ms) */
|
22
|
-
autoDismissAfter?: number;
|
23
|
-
locale?: {
|
24
|
-
dismissText?: string;
|
25
|
-
};
|
26
|
-
children?: ReactNode;
|
27
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { IconComponentType } from "Icons";
|
2
|
-
import type { FC } from "react";
|
3
|
-
import type { BaseItemProps } from "../../useMenuItemProps";
|
4
|
-
export declare type ButtonItemProps = BaseItemProps<HTMLButtonElement> & JSX.IntrinsicElements["button"] & {
|
5
|
-
/** Left aligned icon */
|
6
|
-
startIcon?: IconComponentType;
|
7
|
-
/**
|
8
|
-
* Variant of the item
|
9
|
-
* @default "default"
|
10
|
-
*/
|
11
|
-
variant?: "default" | "destructive";
|
12
|
-
};
|
13
|
-
export declare const ButtonItem: FC<ButtonItemProps>;
|
14
|
-
export default ButtonItem;
|
package/esm/Flag/Flag.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { VFC } from "react";
|
2
|
-
import type { Notification } from "./types";
|
3
|
-
export declare type FlagLocale = Notification["locale"];
|
4
|
-
export declare type FlagProps = Omit<Notification, "id" | "content">;
|
5
|
-
/**
|
6
|
-
* The `Toast` component is a brief notification that providing timely feedback to users before vanishing after a short duration.
|
7
|
-
*
|
8
|
-
* See the [Toast documentation page](https://satellite.algolia.com/components/feedback/toast) for more information.
|
9
|
-
*/
|
10
|
-
export declare const Flag: VFC<FlagProps>;
|
11
|
-
export default Flag;
|
package/esm/Flag/Flags.d.ts
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import type { VFC } from "react";
|
2
|
-
import type { Notification } from "./types";
|
3
|
-
export interface FlagsProps {
|
4
|
-
/**
|
5
|
-
* Array of notifications
|
6
|
-
* @example [{ id: "test", title: "Test", content: "Example" }]
|
7
|
-
*/
|
8
|
-
notifications: Notification[];
|
9
|
-
}
|
10
|
-
/**
|
11
|
-
* Use flags for messages containing confirmations, alerts, and acknowledgments that require minimal user interaction. These event-driven messages appear at the bottom of the screen and overlay any content.
|
12
|
-
* For critical messaging about loss of data or functionality, please use banners.
|
13
|
-
*
|
14
|
-
* ## Structure
|
15
|
-
*
|
16
|
-
* - **Icon (or avatar) and title**: flag messages should always contain a concise title and an appropriate icon
|
17
|
-
* - **Message (optional)**: If the text overflows, truncate using an ellipsis
|
18
|
-
* - **Actions (optional)**: two links max that enable users to act on the flag's content
|
19
|
-
* - **Dismiss**: use to close the flag
|
20
|
-
*
|
21
|
-
* ## Variations
|
22
|
-
*
|
23
|
-
* ### Warning
|
24
|
-
*
|
25
|
-
* Warning messages appear before we request the user to take action. This is usually in anticipation of a significant change. Have empathy for the user. Inform, but don't alarm. If the warning comes before an action, clearly communicate what will happen if the they proceed, and provide an alternative where possible.
|
26
|
-
*
|
27
|
-
* ### Error
|
28
|
-
*
|
29
|
-
* Error messages let the user know that something has gone wrong after they've tried to do something. Explain the problem and provide the user with a next step or an alternative. Keep the message simple and direct, avoid blame and accept if something is our fault.
|
30
|
-
*
|
31
|
-
* ### Success
|
32
|
-
*
|
33
|
-
* Success messages let the user know that they have completed an action. For these messages, it's best to reaffirm the outcome and get out of the user's way. If they have just created something, give them an option to view it.
|
34
|
-
*
|
35
|
-
* ### Info / Loading
|
36
|
-
*
|
37
|
-
* Info messages alert the user to additional information without requiring an action. Inform the user about something that might help or impact them.
|
38
|
-
*
|
39
|
-
* ## Interaction
|
40
|
-
*
|
41
|
-
* Flags can be dismissed by selecting the 'x' or will fade away after X seconds. The user can pause the auto-dismiss by hovering over the flag.
|
42
|
-
*
|
43
|
-
* ## Multiple flags
|
44
|
-
*
|
45
|
-
* When there are multiple flags, they will stack on top of one another with the most recent flag on top. When a user dismisses a flag, any older flags 'below' will come to the top. Careful consideration should be taken to take into account the ordering and priority of flags in the stack. Never use dismissible and non-dismissible flags in a stack as flags that automatically dismiss can do so and not be visible to the user.
|
46
|
-
*/
|
47
|
-
export declare const Flags: VFC<FlagsProps>;
|
48
|
-
export default Flags;
|
package/esm/Flag/Flags.js
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
|
-
var _excluded = ["content", "id"];
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
6
|
-
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; }
|
7
|
-
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) { _defineProperty(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; }
|
8
|
-
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
9
|
-
import { useCreatePortal } from "../Satellite";
|
10
|
-
import stl from "../styles/helpers/satellitePrefixer";
|
11
|
-
import { prefersReducedMotion } from "../utils/prefersReducedMotion";
|
12
|
-
import Flag from "./Flag";
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
-
var TRANSITION_TIMEOUT = 500;
|
15
|
-
|
16
|
-
/**
|
17
|
-
* Use flags for messages containing confirmations, alerts, and acknowledgments that require minimal user interaction. These event-driven messages appear at the bottom of the screen and overlay any content.
|
18
|
-
* For critical messaging about loss of data or functionality, please use banners.
|
19
|
-
*
|
20
|
-
* ## Structure
|
21
|
-
*
|
22
|
-
* - **Icon (or avatar) and title**: flag messages should always contain a concise title and an appropriate icon
|
23
|
-
* - **Message (optional)**: If the text overflows, truncate using an ellipsis
|
24
|
-
* - **Actions (optional)**: two links max that enable users to act on the flag's content
|
25
|
-
* - **Dismiss**: use to close the flag
|
26
|
-
*
|
27
|
-
* ## Variations
|
28
|
-
*
|
29
|
-
* ### Warning
|
30
|
-
*
|
31
|
-
* Warning messages appear before we request the user to take action. This is usually in anticipation of a significant change. Have empathy for the user. Inform, but don't alarm. If the warning comes before an action, clearly communicate what will happen if the they proceed, and provide an alternative where possible.
|
32
|
-
*
|
33
|
-
* ### Error
|
34
|
-
*
|
35
|
-
* Error messages let the user know that something has gone wrong after they've tried to do something. Explain the problem and provide the user with a next step or an alternative. Keep the message simple and direct, avoid blame and accept if something is our fault.
|
36
|
-
*
|
37
|
-
* ### Success
|
38
|
-
*
|
39
|
-
* Success messages let the user know that they have completed an action. For these messages, it's best to reaffirm the outcome and get out of the user's way. If they have just created something, give them an option to view it.
|
40
|
-
*
|
41
|
-
* ### Info / Loading
|
42
|
-
*
|
43
|
-
* Info messages alert the user to additional information without requiring an action. Inform the user about something that might help or impact them.
|
44
|
-
*
|
45
|
-
* ## Interaction
|
46
|
-
*
|
47
|
-
* Flags can be dismissed by selecting the 'x' or will fade away after X seconds. The user can pause the auto-dismiss by hovering over the flag.
|
48
|
-
*
|
49
|
-
* ## Multiple flags
|
50
|
-
*
|
51
|
-
* When there are multiple flags, they will stack on top of one another with the most recent flag on top. When a user dismisses a flag, any older flags 'below' will come to the top. Careful consideration should be taken to take into account the ordering and priority of flags in the stack. Never use dismissible and non-dismissible flags in a stack as flags that automatically dismiss can do so and not be visible to the user.
|
52
|
-
*/
|
53
|
-
export var Flags = function Flags(_ref) {
|
54
|
-
var _ref$notifications = _ref.notifications,
|
55
|
-
notifications = _ref$notifications === void 0 ? [] : _ref$notifications;
|
56
|
-
var createPortal = useCreatePortal();
|
57
|
-
return createPortal( /*#__PURE__*/_jsx(TransitionGroup, {
|
58
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["z-notification bottom-0 right-0 fixed flex flex-col items-end p-4"]))),
|
59
|
-
component: "ul",
|
60
|
-
children: notifications.map(function (_ref2) {
|
61
|
-
var content = _ref2.content,
|
62
|
-
id = _ref2.id,
|
63
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
64
|
-
return /*#__PURE__*/_jsx(CSSTransition, {
|
65
|
-
classNames: !prefersReducedMotion ? {
|
66
|
-
enter: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["flags_item-enter"]))),
|
67
|
-
enterActive: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["flags_item-enter-active"]))),
|
68
|
-
exit: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flags_item-exit"]))),
|
69
|
-
exitActive: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["flags_item-exit-active"])))
|
70
|
-
} : {},
|
71
|
-
timeout: !prefersReducedMotion ? TRANSITION_TIMEOUT : 0,
|
72
|
-
appear: true,
|
73
|
-
children: /*#__PURE__*/_jsx("li", {
|
74
|
-
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["mt-4"]))),
|
75
|
-
children: /*#__PURE__*/_jsx(Flag, _objectSpread(_objectSpread({}, rest), {}, {
|
76
|
-
children: content
|
77
|
-
}))
|
78
|
-
})
|
79
|
-
}, id);
|
80
|
-
})
|
81
|
-
}));
|
82
|
-
};
|
83
|
-
export default Flags;
|
package/esm/Flag/index.d.ts
DELETED
package/esm/Flag/index.js
DELETED
package/esm/Flag/types.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
2
|
-
import type { IconComponentType } from "../Icons";
|
3
|
-
import type { ColorVariant } from "../types";
|
4
|
-
export interface Notification {
|
5
|
-
/** Unique notification ID */
|
6
|
-
id: string;
|
7
|
-
title?: string;
|
8
|
-
/** Content goes here */
|
9
|
-
content: ReactNode;
|
10
|
-
/** Icon to accompany the notification */
|
11
|
-
icon?: IconComponentType;
|
12
|
-
/** @default false */
|
13
|
-
loading?: boolean;
|
14
|
-
/** @default "blue" */
|
15
|
-
variant?: ColorVariant;
|
16
|
-
/**
|
17
|
-
* Function triggered when the dismiss button is clicked.
|
18
|
-
* Dismiss button won't be rendered if absent.
|
19
|
-
* */
|
20
|
-
onDismiss?: () => void;
|
21
|
-
/** Defines if and how long before the notification should be dismissed (in ms) */
|
22
|
-
autoDismissAfter?: number;
|
23
|
-
locale?: {
|
24
|
-
dismissText?: string;
|
25
|
-
};
|
26
|
-
children?: ReactNode;
|
27
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { IconComponentType } from "Icons";
|
2
|
-
import type { FC } from "react";
|
3
|
-
import type { BaseItemProps } from "../../useMenuItemProps";
|
4
|
-
export declare type ButtonItemProps = BaseItemProps<HTMLButtonElement> & JSX.IntrinsicElements["button"] & {
|
5
|
-
/** Left aligned icon */
|
6
|
-
startIcon?: IconComponentType;
|
7
|
-
/**
|
8
|
-
* Variant of the item
|
9
|
-
* @default "default"
|
10
|
-
*/
|
11
|
-
variant?: "default" | "destructive";
|
12
|
-
};
|
13
|
-
export declare const ButtonItem: FC<ButtonItemProps>;
|
14
|
-
export default ButtonItem;
|
File without changes
|
File without changes
|