@bitrise/bitkit-v2 0.3.84 → 0.3.88

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.
@@ -0,0 +1,18 @@
1
+ import { AlertRootProps } from '@chakra-ui/react/alert';
2
+ export type NotificationVariants = 'ai' | 'critical' | 'info' | 'progress' | 'success' | 'warning';
3
+ export type ActionProps = {
4
+ label: string;
5
+ href?: string;
6
+ target?: string;
7
+ onClick?: () => void;
8
+ };
9
+ export interface BitkitNotificationProps extends AlertRootProps {
10
+ actionable?: ActionProps;
11
+ dismissable?: boolean;
12
+ messageText: string;
13
+ onClose?: () => void;
14
+ titleText?: string;
15
+ variant: NotificationVariants;
16
+ }
17
+ declare const BitkitNotification: (props: BitkitNotificationProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default BitkitNotification;
@@ -0,0 +1,51 @@
1
+ import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
+ import { Alert as e } from "@chakra-ui/react/alert";
3
+ import { Box as d } from "@chakra-ui/react/box";
4
+ import { Spinner as h } from "@chakra-ui/react/spinner";
5
+ import { useSlotRecipe as u } from "@chakra-ui/react/styled-system";
6
+ import C from "../../icons/24x24/IconCheck24.js";
7
+ import g from "../../icons/24x24/IconErrorCircleFilled24.js";
8
+ import k from "../../icons/24x24/IconInfoCircle24.js";
9
+ import B from "../../icons/24x24/IconSparkleFilled24.js";
10
+ import I from "../../icons/24x24/IconWarning24.js";
11
+ import x from "../BitkitCloseButton/BitkitCloseButton.js";
12
+ import b from "../BitkitColorButton/BitkitColorButton.js";
13
+ const s = {
14
+ ai: "turquoise",
15
+ critical: "red",
16
+ info: "blue",
17
+ progress: "purple",
18
+ success: "green",
19
+ warning: "yellow"
20
+ }, S = {
21
+ ai: /* @__PURE__ */ o(B, {}),
22
+ critical: /* @__PURE__ */ o(g, {}),
23
+ info: /* @__PURE__ */ o(k, {}),
24
+ progress: /* @__PURE__ */ o(h, {}),
25
+ success: /* @__PURE__ */ o(C, {}),
26
+ warning: /* @__PURE__ */ o(I, {})
27
+ }, v = (a) => {
28
+ const { actionable: r, dismissible: n, messageText: m, onClose: p, titleText: c, variant: t, ...f } = a, i = u({ key: "alert" })({ variant: t, dismissible: n });
29
+ return /* @__PURE__ */ o(e.Root, { variant: t, ...f, children: /* @__PURE__ */ l(e.Content, { children: [
30
+ /* @__PURE__ */ o(e.Indicator, { css: i.indicator, children: S[t] }),
31
+ /* @__PURE__ */ l(d, { css: i.contentBox, children: [
32
+ c && /* @__PURE__ */ o(e.Title, { children: c }),
33
+ /* @__PURE__ */ o(e.Description, { children: m })
34
+ ] }),
35
+ !!r && /* @__PURE__ */ o(
36
+ b,
37
+ {
38
+ as: r.href ? "a" : "button",
39
+ colorPalette: s[t],
40
+ css: i.actionable,
41
+ ...r.href && { href: r.href, target: r.target },
42
+ onClick: r.onClick,
43
+ children: r.label
44
+ }
45
+ ),
46
+ !!n && /* @__PURE__ */ o(x, { size: "sm", onClick: p, colorPalette: s[t] })
47
+ ] }) });
48
+ };
49
+ export {
50
+ v as default
51
+ };
@@ -11,6 +11,7 @@ export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './Bitki
11
11
  export { default as BitkitExpandableCard, type BitkitExpandableCardProps, } from './BitkitExpandableCard/BitkitExpandableCard';
12
12
  export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
13
13
  export { default as BitkitInteractiveTooltip, type BitkitInteractiveTooltipProps, } from './BitkitInteractiveTooltip/BitkitInteractiveTooltip';
14
+ export { default as BitkitNotification, type BitkitNotificationProps } from './BitkitNotification/BitkitNotification';
14
15
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
15
16
  export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/BitkitSelect';
16
17
  export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';