@bitrise/bitkit-v2 0.3.178 → 0.3.179

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.
@@ -1,14 +1,8 @@
1
1
  import { AlertRootProps } from '@chakra-ui/react/alert';
2
- import { JSX } from 'react';
3
- export type AlertVariants = 'ai' | 'critical' | 'info' | 'progress' | 'success' | 'warning';
4
- export declare const BUTTON_COLORS_MAP: Record<AlertVariants, string>;
5
- export declare const ICONS_MAP: Record<AlertVariants, JSX.Element>;
6
- export type ActionProps = {
7
- href?: string;
8
- label: string;
9
- onClick?: () => void;
10
- target?: HTMLAnchorElement['target'];
11
- };
2
+ import { NotificationVariant } from '../../theme/common/AlertAndToast.common';
3
+ import { NotificationAction } from '../common/notificationMaps';
4
+ export type AlertVariants = NotificationVariant;
5
+ export type ActionProps = NotificationAction;
12
6
  export interface BitkitAlertProps extends AlertRootProps {
13
7
  action?: ActionProps;
14
8
  dismissible?: boolean;
@@ -1,66 +1,43 @@
1
- import e from "../../icons/IconCheck.js";
2
- import t from "../../icons/IconErrorCircleFilled.js";
3
- import n from "../../icons/IconInfoCircle.js";
4
- import r from "../../icons/IconSparkleFilled.js";
5
- import i from "../../icons/IconWarning.js";
6
- import a from "../BitkitCloseButton/BitkitCloseButton.js";
7
- import { rem as o } from "../../theme/themeUtils.js";
8
- import s from "../BitkitColorButton/BitkitColorButton.js";
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- import { Alert as u } from "@chakra-ui/react/alert";
11
- import { Spinner as d } from "@chakra-ui/react/spinner";
1
+ import e from "../BitkitCloseButton/BitkitCloseButton.js";
2
+ import { rem as t } from "../../theme/themeUtils.js";
3
+ import n from "../BitkitColorButton/BitkitColorButton.js";
4
+ import { BUTTON_COLORS_MAP as r, ICON_COMPONENTS_MAP as i } from "../common/notificationMaps.js";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { Alert as s } from "@chakra-ui/react/alert";
12
7
  //#region lib/components/BitkitAlert/BitkitAlert.tsx
13
- var f = {
14
- ai: "indigo",
15
- critical: "red",
16
- info: "blue",
17
- progress: "purple",
18
- success: "green",
19
- warning: "yellow"
20
- }, p = {
21
- ai: /* @__PURE__ */ c(r, {}),
22
- critical: /* @__PURE__ */ c(t, {}),
23
- info: /* @__PURE__ */ c(n, {}),
24
- progress: /* @__PURE__ */ c(d, {
25
- width: "20",
26
- height: "20",
27
- margin: "2"
28
- }),
29
- success: /* @__PURE__ */ c(e, {}),
30
- warning: /* @__PURE__ */ c(i, {})
31
- }, m = (e) => {
32
- let { action: t, dismissible: n, messageText: r, onClose: i, titleText: d, variant: m, ...h } = e;
33
- return /* @__PURE__ */ l(u.Root, {
8
+ var c = (c) => {
9
+ let { action: l, dismissible: u, messageText: d, onClose: f, titleText: p, variant: m, ...h } = c, g = i[m];
10
+ return /* @__PURE__ */ o(s.Root, {
34
11
  variant: m,
35
12
  ...h,
36
13
  children: [
37
- /* @__PURE__ */ c(u.Indicator, {
14
+ /* @__PURE__ */ a(s.Indicator, {
38
15
  asChild: m !== "progress",
39
- children: p[m]
16
+ children: /* @__PURE__ */ a(g, {})
40
17
  }),
41
- /* @__PURE__ */ l(u.Content, { children: [d && /* @__PURE__ */ c(u.Title, { children: d }), /* @__PURE__ */ c(u.Description, { children: r })] }),
42
- !!t && /* @__PURE__ */ c(s, {
43
- as: t.href ? "a" : "button",
44
- colorPalette: f[m],
45
- ...t.href && {
46
- href: t.href,
47
- target: t.target
18
+ /* @__PURE__ */ o(s.Content, { children: [p && /* @__PURE__ */ a(s.Title, { children: p }), /* @__PURE__ */ a(s.Description, { children: d })] }),
19
+ !!l && /* @__PURE__ */ a(n, {
20
+ as: l.href ? "a" : "button",
21
+ colorPalette: r[m],
22
+ ...l.href && {
23
+ href: l.href,
24
+ target: l.target
48
25
  },
49
- onClick: t.onClick,
26
+ onClick: l.onClick,
50
27
  marginInlineStart: "16",
51
28
  marginInlineEnd: "12",
52
29
  whiteSpace: "nowrap",
53
- children: t.label
30
+ children: l.label
54
31
  }),
55
- !!n && /* @__PURE__ */ c(a, {
32
+ !!u && /* @__PURE__ */ a(e, {
56
33
  alignSelf: "flex-start",
57
- marginBlockStart: o(7),
34
+ marginBlockStart: t(7),
58
35
  size: "sm",
59
- onClick: i,
60
- colorPalette: f[m]
36
+ onClick: f,
37
+ colorPalette: r[m]
61
38
  })
62
39
  ]
63
40
  });
64
41
  };
65
42
  //#endregion
66
- export { m as default };
43
+ export { c as default };
@@ -0,0 +1,14 @@
1
+ import { NotificationVariant } from '../../theme/common/AlertAndToast.common';
2
+ import { NotificationAction } from '../common/notificationMaps';
3
+ export type BitkitToastVariant = NotificationVariant;
4
+ export type BitkitToastProps = {
5
+ action?: NotificationAction;
6
+ dismissible?: boolean;
7
+ messageText: string;
8
+ timestamp?: string;
9
+ titleText?: string;
10
+ variant: BitkitToastVariant;
11
+ };
12
+ export declare const toaster: import('@zag-js/toast').Store<any>;
13
+ declare const createBitkitToast: (props: BitkitToastProps) => string;
14
+ export default createBitkitToast;
@@ -0,0 +1,21 @@
1
+ import { createToaster as e } from "@chakra-ui/react/toast";
2
+ //#region lib/components/BitkitToast/BitkitToast.tsx
3
+ var t = e({
4
+ max: 5,
5
+ placement: "top-end",
6
+ pauseOnPageIdle: !0
7
+ }), n = (e) => {
8
+ let { action: n, dismissible: r = !0, messageText: i, timestamp: a, titleText: o, variant: s } = e;
9
+ return t.create({
10
+ closable: r,
11
+ description: i,
12
+ meta: {
13
+ action: n,
14
+ timestamp: a
15
+ },
16
+ title: o,
17
+ type: s
18
+ });
19
+ };
20
+ //#endregion
21
+ export { n as default, t as toaster };
@@ -0,0 +1,2 @@
1
+ declare const BitkitToaster: () => import("react/jsx-runtime").JSX.Element;
2
+ export default BitkitToaster;
@@ -0,0 +1,56 @@
1
+ import e from "../BitkitCloseButton/BitkitCloseButton.js";
2
+ import t from "../BitkitColorButton/BitkitColorButton.js";
3
+ import { BUTTON_COLORS_MAP as n, ICON_COMPONENTS_MAP as r } from "../common/notificationMaps.js";
4
+ import { toaster as i } from "./BitkitToast.js";
5
+ import { Box as a } from "@chakra-ui/react/box";
6
+ import { useSlotRecipe as o } from "@chakra-ui/react/styled-system";
7
+ import { Text as s } from "@chakra-ui/react/text";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { Toast as u, Toaster as d } from "@chakra-ui/react/toast";
10
+ //#region lib/components/BitkitToast/BitkitToaster.tsx
11
+ var f = () => {
12
+ let f = o({ key: "toast" });
13
+ return /* @__PURE__ */ c(d, {
14
+ toaster: i,
15
+ children: (i) => {
16
+ let o = i.type, d = f({ variant: o }), p = r[o];
17
+ return /* @__PURE__ */ l(u.Root, {
18
+ variant: o,
19
+ children: [
20
+ /* @__PURE__ */ c(p, { css: d.icon }),
21
+ /* @__PURE__ */ l(a, {
22
+ css: d.content,
23
+ children: [
24
+ !!i.title && /* @__PURE__ */ c(u.Title, { children: i.title }),
25
+ /* @__PURE__ */ c(u.Description, { children: i.description }),
26
+ !!i.meta?.action && /* @__PURE__ */ c(t, {
27
+ as: i.meta.action.href ? "a" : "button",
28
+ colorPalette: n[o],
29
+ css: d.actionTrigger,
30
+ ...i.meta.action.href && {
31
+ href: i.meta.action.href,
32
+ target: i.meta.action.target
33
+ },
34
+ onClick: i.meta.action.onClick,
35
+ children: i.meta.action.label
36
+ }),
37
+ !!i.meta?.timestamp && /* @__PURE__ */ c(s, {
38
+ css: d.timestamp,
39
+ children: i.meta.timestamp
40
+ })
41
+ ]
42
+ }),
43
+ i.closable && /* @__PURE__ */ c(u.CloseTrigger, {
44
+ asChild: !0,
45
+ children: /* @__PURE__ */ c(e, {
46
+ colorPalette: n[o],
47
+ size: "sm"
48
+ })
49
+ })
50
+ ]
51
+ });
52
+ }
53
+ });
54
+ };
55
+ //#endregion
56
+ export { f as default };
@@ -0,0 +1,10 @@
1
+ import { ElementType } from 'react';
2
+ import { NotificationVariant } from '../../theme/common/AlertAndToast.common';
3
+ export type NotificationAction = {
4
+ href?: string;
5
+ label: string;
6
+ onClick?: () => void;
7
+ target?: HTMLAnchorElement['target'];
8
+ };
9
+ export declare const BUTTON_COLORS_MAP: Record<NotificationVariant, string>;
10
+ export declare const ICON_COMPONENTS_MAP: Record<NotificationVariant, ElementType>;
@@ -0,0 +1,24 @@
1
+ import e from "../../icons/IconCheck.js";
2
+ import t from "../../icons/IconErrorCircleFilled.js";
3
+ import n from "../../icons/IconInfoCircle.js";
4
+ import r from "../../icons/IconSparkleFilled.js";
5
+ import i from "../../icons/IconWarning.js";
6
+ import { Spinner as a } from "@chakra-ui/react/spinner";
7
+ //#region lib/components/common/notificationMaps.tsx
8
+ var o = {
9
+ ai: "indigo",
10
+ critical: "red",
11
+ info: "blue",
12
+ progress: "purple",
13
+ success: "green",
14
+ warning: "yellow"
15
+ }, s = {
16
+ ai: r,
17
+ critical: t,
18
+ info: n,
19
+ progress: a,
20
+ success: e,
21
+ warning: i
22
+ };
23
+ //#endregion
24
+ export { o as BUTTON_COLORS_MAP, s as ICON_COMPONENTS_MAP };
@@ -53,6 +53,7 @@ export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
53
53
  export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
54
54
  export { default as BitkitTagsInput, type BitkitTagsInputProps } from './BitkitTagsInput/BitkitTagsInput';
55
55
  export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
56
+ export { type BitkitToastProps, default as createBitkitToast } from './BitkitToast/BitkitToast';
56
57
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
57
58
  export { default as BitkitToggleButton, type BitkitToggleButtonProps } from './BitkitToggleButton/BitkitToggleButton';
58
59
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';
package/dist/main.js CHANGED
@@ -334,8 +334,9 @@ import la from "./components/BitkitTabs/BitkitTabs.js";
334
334
  import ua from "./components/BitkitTag/BitkitTag.js";
335
335
  import da from "./components/BitkitTagsInput/BitkitTagsInput.js";
336
336
  import fa from "./components/BitkitTextInput/BitkitTextInput.js";
337
- import pa from "./components/BitkitToggle/BitkitToggle.js";
338
- import ma from "./components/BitkitToggleButton/BitkitToggleButton.js";
339
- import ha from "./theme/index.js";
340
- import ga from "./providers/BitkitProvider.js";
341
- export { e as BitkitAccordion, pi as BitkitActionBar, hi as BitkitAlert, gi as BitkitAvatar, _i as BitkitBadge, vi as BitkitButton, bi as BitkitCalendar, xi as BitkitCard, Si as BitkitCheckbox, Ci as BitkitCheckboxGroup, fi as BitkitCloseButton, Ti as BitkitCodeSnippet, Di as BitkitCollapsible, mi as BitkitColorButton, ki as BitkitCombobox, Ai as BitkitControlButton, ji as BitkitDefinitionTooltip, Fi as BitkitDialog, Mi as BitkitDialogBody, Ni as BitkitDialogContent, Pi as BitkitDialogRoot, Ii as BitkitEmptyState, Li as BitkitExpandableCard, Ri as BitkitExplainerList, Oi as BitkitField, zi as BitkitFileInput, Bi as BitkitGroupHeading, Vi as BitkitIconButton, Hi as BitkitInlineLoading, Ui as BitkitInteractiveTooltip, Ei as BitkitLabel, di as BitkitLabelTooltip, Wi as BitkitLink, Gi as BitkitLinkButton, Ji as BitkitMarkdown, Yi as BitkitMarkdownCard, Xi as BitkitNativeSelect, Zi as BitkitNumberInput, Ki as BitkitOrderedList, Qi as BitkitOverflowTooltip, $i as BitkitPaginationLoadMore, ga as BitkitProvider, ea as BitkitRadio, ta as BitkitRadioGroup, na as BitkitRibbon, ra as BitkitSearchInput, ia as BitkitSectionHeading, aa as BitkitSegmentedControl, oa as BitkitSelect, yi as BitkitSelectMenu, sa as BitkitSelectableTag, ca as BitkitSplitButton, la as BitkitTabs, ua as BitkitTag, da as BitkitTagsInput, fa as BitkitTextInput, pa as BitkitToggle, ma as BitkitToggleButton, wi as BitkitTooltip, qi as BitkitUnorderedList, n as IconAbortCircle, r as IconAbortCircleFilled, i as IconAddons, a as IconAgent, o as IconAnchor, s as IconAndroid, c as IconApp, u as IconAppSettings, d as IconAppStore, f as IconAppStoreColor, l as IconApple, p as IconArchive, m as IconArchiveDelete, h as IconArchiveRestore, g as IconArrowBackAndDown, _ as IconArrowBackAndUp, v as IconArrowDown, y as IconArrowForwardAndDown, b as IconArrowForwardAndUp, x as IconArrowLeft, S as IconArrowNortheast, C as IconArrowNorthwest, w as IconArrowRight, D as IconArrowUp, T as IconArrowsHorizontal, E as IconArrowsVertical, O as IconAutomation, k as IconAws, A as IconAwsColor, j as IconBadge3RdParty, M as IconBadgeBitrise, N as IconBadgeUpgrade, P as IconBadgeVersionOk, F as IconBazel, I as IconBell, L as IconBitbot, R as IconBitbotError, z as IconBitbucket, B as IconBitbucketColor, V as IconBitbucketNeutral, H as IconBitbucketWhite, U as IconBlockCircle, W as IconBook, G as IconBoxArrowDown, K as IconBoxDot, q as IconBoxLinesOverflow, J as IconBoxLinesWrap, Y as IconBranch, X as IconBrowserstackColor, Z as IconBug, Q as IconBuild, $ as IconBuildCache, ee as IconBuildCacheFilled, te as IconBuildEnvSetup, ne as IconCalendar, re as IconChangePlan, ie as IconChat, ae as IconCheck, oe as IconCheckCircle, se as IconCheckCircleFilled, ce as IconChevronDown, le as IconChevronLeft, ue as IconChevronRight, de as IconChevronUp, fe as IconCi, pe as IconCiFilled, me as IconCircle, he as IconCircleDashed, ge as IconCircleHalfFilled, _e as IconClaude, ve as IconClaudeColor, ye as IconClock, be as IconCode, xe as IconCodePush, Se as IconCodeSigning, Ce as IconCoffee, we as IconCommit, Te as IconConfigure, Ee as IconConnectedAccounts, De as IconContainer, Oe as IconCopy, ke as IconCordova, Ae as IconCpu, je as IconCreditcard, Me as IconCredits, Ne as IconCross, Pe as IconCrossCircle, Fe as IconCrossCircleFilled, Ie as IconCrown, Le as IconCycle, Re as IconDashboard, ze as IconDashboardFilled, Be as IconDeployment, Ve as IconDetails, He as IconDoc, Ue as IconDollar, We as IconDot, Ge as IconDotnet, Ke as IconDotnetColor, qe as IconDotnetText, Je as IconDotnetTextColor, Ye as IconDoubleCircle, Xe as IconDownload, Ze as IconEc2Ami, Qe as IconEnterprise, $e as IconErrorCircle, et as IconErrorCircleFilled, tt as IconExpand, nt as IconExtraBuildCapacity, rt as IconEye, it as IconEyeSlash, at as IconFastlane, ot as IconFileDoc, st as IconFilePdf, ct as IconFilePlist, lt as IconFileZip, ut as IconFilter, dt as IconFlag, ft as IconFlutter, pt as IconFolder, mt as IconFullscreen, ht as IconFullscreenExit, gt as IconGauge, _t as IconGit, vt as IconGithub, yt as IconGitlab, bt as IconGitlabColor, xt as IconGitlabWhite, St as IconGlobe, Ct as IconGo, wt as IconGoogleColor, Tt as IconGooglePlay, Et as IconGooglePlayColor, Dt as IconGradle, Ot as IconGroup, kt as IconHashtag, At as IconHeadset, jt as IconHeart, Mt as IconHistory, Nt as IconHourglass, Pt as IconImage, Ft as IconInfoCircle, It as IconInfoCircleFilled, Lt as IconInsights, Rt as IconInsightsFilled, zt as IconInstall, Bt as IconInteraction, Vt as IconInvoice, Ht as IconIonic, Ut as IconJapanese, Wt as IconJava, Gt as IconJavaColor, Kt as IconJavaDuke, qt as IconJavaDukeColor, Jt as IconKey, Yt as IconKotlin, Xt as IconKotlinColor, Zt as IconKotlinWhite, Qt as IconLaptop, $t as IconLaunchdarkly, en as IconLegacyApp, tn as IconLightbulb, nn as IconLink, rn as IconLinux, an as IconLock, on as IconLockOpen, sn as IconLogin, cn as IconLogout, ln as IconMacos, un as IconMagicWand, dn as IconMagnifier, fn as IconMail, pn as IconMedal, mn as IconMemory, hn as IconMenuGrid, gn as IconMenuHamburger, _n as IconMessage, vn as IconMessageAlert, yn as IconMessageQuestion, bn as IconMicrophone, xn as IconMinus, Sn as IconMinusCircle, Cn as IconMinusCircleFilled, wn as IconMobile, Tn as IconMobileLandscape, En as IconMonitorChart, Dn as IconMoreHorizontal, On as IconMoreVertical, kn as IconNews, An as IconNextjs, jn as IconNodejs, Mn as IconOpenInNew, Nn as IconOther, Pn as IconOutsideContributor, Fn as IconOverview, In as IconPause, Ln as IconPencil, Rn as IconPeople, zn as IconPercent, Bn as IconPerson, Vn as IconPersonWithDesk, Hn as IconPlay, Un as IconPlus, Wn as IconPlusCircle, Gn as IconPlusCircleFilled, Kn as IconPower, qn as IconProject, Jn as IconProjectSettings, Yn as IconPull, Xn as IconPush, Zn as IconPuzzle, Qn as IconPython, $n as IconPythonColor, er as IconQuestionCircle, tr as IconQuestionCircleFilled, nr as IconReact, rr as IconRefresh, ir as IconRegex, ar as IconRelease, or as IconReleaseFilled, sr as IconRemoteAccess, cr as IconReplace, lr as IconResponsiveness, ur as IconReviewerApproved, dr as IconReviewerAssigned, fr as IconReviewerRejected, pr as IconRuby, mr as IconRubyColor, hr as IconSave, gr as IconSecurityShield, _r as IconSettings, vr as IconSettingsFilled, yr as IconShuffle, br as IconSiren, xr as IconSkipCircle, Sr as IconSkipCircleFilled, Cr as IconSlack, wr as IconSlackColor, Tr as IconSparkle, Er as IconSparkleFilled, Dr as IconSpinnerOnDisabled, Or as IconSpinnerPurple, kr as IconSpinnerPurpleDouble, Ar as IconSpinnerWhite, jr as IconStability, Mr as IconStack, Nr as IconStar, Pr as IconStep, Fr as IconStop, Ir as IconStopwatch, Lr as IconTag, Rr as IconTasks, zr as IconTeams, Br as IconTeamsColor, Vr as IconTemplateCode, Hr as IconTerminal, Ur as IconTestQuarantine, Wr as IconThemeDarkToggle, Gr as IconThumbDown, Kr as IconThumbUp, qr as IconTools, Jr as IconTrash, Yr as IconTrigger, Xr as IconUbuntu, Zr as IconUbuntuColor, Qr as IconUnity3D, $r as IconUpload, ei as IconValidateShield, ti as IconVideo, ni as IconWarning, ri as IconWarningYellow, ai as IconWebUi, ii as IconWebhooks, oi as IconWorkflow, si as IconWorkflowFlow, ui as IconXTwitter, ci as IconXamarin, li as IconXcode, t as bitkitIcon, ha as bitriseTheme };
337
+ import pa from "./components/BitkitToast/BitkitToast.js";
338
+ import ma from "./components/BitkitToggle/BitkitToggle.js";
339
+ import ha from "./components/BitkitToggleButton/BitkitToggleButton.js";
340
+ import ga from "./theme/index.js";
341
+ import _a from "./providers/BitkitProvider.js";
342
+ export { e as BitkitAccordion, pi as BitkitActionBar, hi as BitkitAlert, gi as BitkitAvatar, _i as BitkitBadge, vi as BitkitButton, bi as BitkitCalendar, xi as BitkitCard, Si as BitkitCheckbox, Ci as BitkitCheckboxGroup, fi as BitkitCloseButton, Ti as BitkitCodeSnippet, Di as BitkitCollapsible, mi as BitkitColorButton, ki as BitkitCombobox, Ai as BitkitControlButton, ji as BitkitDefinitionTooltip, Fi as BitkitDialog, Mi as BitkitDialogBody, Ni as BitkitDialogContent, Pi as BitkitDialogRoot, Ii as BitkitEmptyState, Li as BitkitExpandableCard, Ri as BitkitExplainerList, Oi as BitkitField, zi as BitkitFileInput, Bi as BitkitGroupHeading, Vi as BitkitIconButton, Hi as BitkitInlineLoading, Ui as BitkitInteractiveTooltip, Ei as BitkitLabel, di as BitkitLabelTooltip, Wi as BitkitLink, Gi as BitkitLinkButton, Ji as BitkitMarkdown, Yi as BitkitMarkdownCard, Xi as BitkitNativeSelect, Zi as BitkitNumberInput, Ki as BitkitOrderedList, Qi as BitkitOverflowTooltip, $i as BitkitPaginationLoadMore, _a as BitkitProvider, ea as BitkitRadio, ta as BitkitRadioGroup, na as BitkitRibbon, ra as BitkitSearchInput, ia as BitkitSectionHeading, aa as BitkitSegmentedControl, oa as BitkitSelect, yi as BitkitSelectMenu, sa as BitkitSelectableTag, ca as BitkitSplitButton, la as BitkitTabs, ua as BitkitTag, da as BitkitTagsInput, fa as BitkitTextInput, ma as BitkitToggle, ha as BitkitToggleButton, wi as BitkitTooltip, qi as BitkitUnorderedList, n as IconAbortCircle, r as IconAbortCircleFilled, i as IconAddons, a as IconAgent, o as IconAnchor, s as IconAndroid, c as IconApp, u as IconAppSettings, d as IconAppStore, f as IconAppStoreColor, l as IconApple, p as IconArchive, m as IconArchiveDelete, h as IconArchiveRestore, g as IconArrowBackAndDown, _ as IconArrowBackAndUp, v as IconArrowDown, y as IconArrowForwardAndDown, b as IconArrowForwardAndUp, x as IconArrowLeft, S as IconArrowNortheast, C as IconArrowNorthwest, w as IconArrowRight, D as IconArrowUp, T as IconArrowsHorizontal, E as IconArrowsVertical, O as IconAutomation, k as IconAws, A as IconAwsColor, j as IconBadge3RdParty, M as IconBadgeBitrise, N as IconBadgeUpgrade, P as IconBadgeVersionOk, F as IconBazel, I as IconBell, L as IconBitbot, R as IconBitbotError, z as IconBitbucket, B as IconBitbucketColor, V as IconBitbucketNeutral, H as IconBitbucketWhite, U as IconBlockCircle, W as IconBook, G as IconBoxArrowDown, K as IconBoxDot, q as IconBoxLinesOverflow, J as IconBoxLinesWrap, Y as IconBranch, X as IconBrowserstackColor, Z as IconBug, Q as IconBuild, $ as IconBuildCache, ee as IconBuildCacheFilled, te as IconBuildEnvSetup, ne as IconCalendar, re as IconChangePlan, ie as IconChat, ae as IconCheck, oe as IconCheckCircle, se as IconCheckCircleFilled, ce as IconChevronDown, le as IconChevronLeft, ue as IconChevronRight, de as IconChevronUp, fe as IconCi, pe as IconCiFilled, me as IconCircle, he as IconCircleDashed, ge as IconCircleHalfFilled, _e as IconClaude, ve as IconClaudeColor, ye as IconClock, be as IconCode, xe as IconCodePush, Se as IconCodeSigning, Ce as IconCoffee, we as IconCommit, Te as IconConfigure, Ee as IconConnectedAccounts, De as IconContainer, Oe as IconCopy, ke as IconCordova, Ae as IconCpu, je as IconCreditcard, Me as IconCredits, Ne as IconCross, Pe as IconCrossCircle, Fe as IconCrossCircleFilled, Ie as IconCrown, Le as IconCycle, Re as IconDashboard, ze as IconDashboardFilled, Be as IconDeployment, Ve as IconDetails, He as IconDoc, Ue as IconDollar, We as IconDot, Ge as IconDotnet, Ke as IconDotnetColor, qe as IconDotnetText, Je as IconDotnetTextColor, Ye as IconDoubleCircle, Xe as IconDownload, Ze as IconEc2Ami, Qe as IconEnterprise, $e as IconErrorCircle, et as IconErrorCircleFilled, tt as IconExpand, nt as IconExtraBuildCapacity, rt as IconEye, it as IconEyeSlash, at as IconFastlane, ot as IconFileDoc, st as IconFilePdf, ct as IconFilePlist, lt as IconFileZip, ut as IconFilter, dt as IconFlag, ft as IconFlutter, pt as IconFolder, mt as IconFullscreen, ht as IconFullscreenExit, gt as IconGauge, _t as IconGit, vt as IconGithub, yt as IconGitlab, bt as IconGitlabColor, xt as IconGitlabWhite, St as IconGlobe, Ct as IconGo, wt as IconGoogleColor, Tt as IconGooglePlay, Et as IconGooglePlayColor, Dt as IconGradle, Ot as IconGroup, kt as IconHashtag, At as IconHeadset, jt as IconHeart, Mt as IconHistory, Nt as IconHourglass, Pt as IconImage, Ft as IconInfoCircle, It as IconInfoCircleFilled, Lt as IconInsights, Rt as IconInsightsFilled, zt as IconInstall, Bt as IconInteraction, Vt as IconInvoice, Ht as IconIonic, Ut as IconJapanese, Wt as IconJava, Gt as IconJavaColor, Kt as IconJavaDuke, qt as IconJavaDukeColor, Jt as IconKey, Yt as IconKotlin, Xt as IconKotlinColor, Zt as IconKotlinWhite, Qt as IconLaptop, $t as IconLaunchdarkly, en as IconLegacyApp, tn as IconLightbulb, nn as IconLink, rn as IconLinux, an as IconLock, on as IconLockOpen, sn as IconLogin, cn as IconLogout, ln as IconMacos, un as IconMagicWand, dn as IconMagnifier, fn as IconMail, pn as IconMedal, mn as IconMemory, hn as IconMenuGrid, gn as IconMenuHamburger, _n as IconMessage, vn as IconMessageAlert, yn as IconMessageQuestion, bn as IconMicrophone, xn as IconMinus, Sn as IconMinusCircle, Cn as IconMinusCircleFilled, wn as IconMobile, Tn as IconMobileLandscape, En as IconMonitorChart, Dn as IconMoreHorizontal, On as IconMoreVertical, kn as IconNews, An as IconNextjs, jn as IconNodejs, Mn as IconOpenInNew, Nn as IconOther, Pn as IconOutsideContributor, Fn as IconOverview, In as IconPause, Ln as IconPencil, Rn as IconPeople, zn as IconPercent, Bn as IconPerson, Vn as IconPersonWithDesk, Hn as IconPlay, Un as IconPlus, Wn as IconPlusCircle, Gn as IconPlusCircleFilled, Kn as IconPower, qn as IconProject, Jn as IconProjectSettings, Yn as IconPull, Xn as IconPush, Zn as IconPuzzle, Qn as IconPython, $n as IconPythonColor, er as IconQuestionCircle, tr as IconQuestionCircleFilled, nr as IconReact, rr as IconRefresh, ir as IconRegex, ar as IconRelease, or as IconReleaseFilled, sr as IconRemoteAccess, cr as IconReplace, lr as IconResponsiveness, ur as IconReviewerApproved, dr as IconReviewerAssigned, fr as IconReviewerRejected, pr as IconRuby, mr as IconRubyColor, hr as IconSave, gr as IconSecurityShield, _r as IconSettings, vr as IconSettingsFilled, yr as IconShuffle, br as IconSiren, xr as IconSkipCircle, Sr as IconSkipCircleFilled, Cr as IconSlack, wr as IconSlackColor, Tr as IconSparkle, Er as IconSparkleFilled, Dr as IconSpinnerOnDisabled, Or as IconSpinnerPurple, kr as IconSpinnerPurpleDouble, Ar as IconSpinnerWhite, jr as IconStability, Mr as IconStack, Nr as IconStar, Pr as IconStep, Fr as IconStop, Ir as IconStopwatch, Lr as IconTag, Rr as IconTasks, zr as IconTeams, Br as IconTeamsColor, Vr as IconTemplateCode, Hr as IconTerminal, Ur as IconTestQuarantine, Wr as IconThemeDarkToggle, Gr as IconThumbDown, Kr as IconThumbUp, qr as IconTools, Jr as IconTrash, Yr as IconTrigger, Xr as IconUbuntu, Zr as IconUbuntuColor, Qr as IconUnity3D, $r as IconUpload, ei as IconValidateShield, ti as IconVideo, ni as IconWarning, ri as IconWarningYellow, ai as IconWebUi, ii as IconWebhooks, oi as IconWorkflow, si as IconWorkflowFlow, ui as IconXTwitter, ci as IconXamarin, li as IconXcode, t as bitkitIcon, ga as bitriseTheme, pa as createBitkitToast };
@@ -1,13 +1,18 @@
1
1
  "use client";
2
- import e from "../theme/index.js";
3
- import { ChakraProvider as t } from "@chakra-ui/react/styled-system";
4
- import { jsx as n } from "react/jsx-runtime";
2
+ import e from "../components/BitkitToast/BitkitToaster.js";
3
+ import t from "../theme/index.js";
4
+ import { ChakraProvider as n } from "@chakra-ui/react/styled-system";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
6
  import "@fontsource-variable/figtree/index.css";
6
7
  import "@fontsource-variable/source-code-pro/index.css";
7
8
  //#region lib/providers/BitkitProvider.tsx
8
- var r = (r) => /* @__PURE__ */ n(t, {
9
- ...r,
10
- value: e
11
- });
9
+ var a = (a) => {
10
+ let { children: o, ...s } = a;
11
+ return /* @__PURE__ */ i(n, {
12
+ ...s,
13
+ value: t,
14
+ children: [o, /* @__PURE__ */ r(e, {})]
15
+ });
16
+ };
12
17
  //#endregion
13
- export { r as default };
18
+ export { a as default };
@@ -0,0 +1,6 @@
1
+ import { SystemStyleObject } from '@chakra-ui/react/styled-system';
2
+ export declare const NOTIFICATION_VARIANTS: readonly ["ai", "critical", "info", "progress", "success", "warning"];
3
+ export type NotificationVariant = (typeof NOTIFICATION_VARIANTS)[number];
4
+ export declare const ROOT_MAP: Record<NotificationVariant, SystemStyleObject>;
5
+ export declare const ICONS_MAP: Record<NotificationVariant, string>;
6
+ export declare const TEXT_MAP: Record<NotificationVariant, string>;
@@ -0,0 +1,50 @@
1
+ //#region lib/theme/common/AlertAndToast.common.ts
2
+ var e = [
3
+ "ai",
4
+ "critical",
5
+ "info",
6
+ "progress",
7
+ "success",
8
+ "warning"
9
+ ], t = {
10
+ ai: {
11
+ border: "1px solid transparent",
12
+ background: "{colors.status.ai.bg} padding-box, {colors.status.ai.border} border-box"
13
+ },
14
+ critical: {
15
+ backgroundColor: "status/critical/bg",
16
+ borderColor: "status/critical/border"
17
+ },
18
+ info: {
19
+ backgroundColor: "status/info/bg",
20
+ borderColor: "status/info/border"
21
+ },
22
+ progress: {
23
+ backgroundColor: "status/progress/bg",
24
+ borderColor: "status/progress/border"
25
+ },
26
+ success: {
27
+ backgroundColor: "status/success/bg",
28
+ borderColor: "status/success/border"
29
+ },
30
+ warning: {
31
+ backgroundColor: "status/warning/bg",
32
+ borderColor: "status/warning/border"
33
+ }
34
+ }, n = {
35
+ ai: "status/ai/icon",
36
+ critical: "status/critical/icon",
37
+ info: "status/info/icon",
38
+ progress: "status/progress/icon",
39
+ success: "status/success/icon",
40
+ warning: "status/warning/icon"
41
+ }, r = {
42
+ ai: "status/ai/text",
43
+ critical: "status/critical/text",
44
+ info: "status/info/text",
45
+ progress: "status/progress/text",
46
+ success: "status/success/text",
47
+ warning: "status/warning/text"
48
+ };
49
+ //#endregion
50
+ export { n as ICONS_MAP, e as NOTIFICATION_VARIANTS, t as ROOT_MAP, r as TEXT_MAP };
@@ -1,10 +1,11 @@
1
1
  import { rem as e } from "../themeUtils.js";
2
- import { defineSlotRecipe as t } from "@chakra-ui/react/styled-system";
3
- import { alertAnatomy as n } from "@chakra-ui/react/anatomy";
2
+ import { ICONS_MAP as t, NOTIFICATION_VARIANTS as n, ROOT_MAP as r, TEXT_MAP as i } from "../common/AlertAndToast.common.js";
3
+ import { defineSlotRecipe as a } from "@chakra-ui/react/styled-system";
4
+ import { alertAnatomy as o } from "@chakra-ui/react/anatomy";
4
5
  //#region lib/theme/slot-recipes/Alert.recipe.ts
5
- var r = t({
6
+ var s = a({
6
7
  className: "alert",
7
- slots: n.keys(),
8
+ slots: o.keys(),
8
9
  base: {
9
10
  root: {
10
11
  display: "flex",
@@ -32,60 +33,17 @@ var r = t({
32
33
  },
33
34
  description: {
34
35
  textStyle: "comp/notification/message",
35
- "&:first-child": { marginBlockStart: "2" }
36
+ "&:first-of-type": { marginBlockStart: "2" }
36
37
  }
37
38
  },
38
- variants: { variant: {
39
- ai: {
40
- root: {
41
- border: "1px solid transparent",
42
- background: "{colors.status.ai.bg} padding-box, {colors.status.ai.border} border-box",
43
- color: "status/ai/text"
44
- },
45
- indicator: { color: "status/ai/icon" }
46
- },
47
- critical: {
48
- root: {
49
- backgroundColor: "status/critical/bg",
50
- borderColor: "status/critical/border",
51
- color: "status/critical/text"
52
- },
53
- indicator: { color: "status/critical/icon" }
54
- },
55
- info: {
56
- root: {
57
- backgroundColor: "status/info/bg",
58
- borderColor: "status/info/border",
59
- color: "status/info/text"
60
- },
61
- indicator: { color: "status/info/icon" }
62
- },
63
- progress: {
64
- root: {
65
- backgroundColor: "status/progress/bg",
66
- borderColor: "status/progress/border",
67
- color: "status/progress/text"
68
- },
69
- indicator: { color: "status/progress/icon" }
70
- },
71
- success: {
72
- root: {
73
- backgroundColor: "status/success/bg",
74
- borderColor: "status/success/border",
75
- color: "status/success/text"
76
- },
77
- indicator: { color: "status/success/icon" }
39
+ variants: { variant: Object.fromEntries(n.map((e) => [e, {
40
+ root: {
41
+ ...r[e],
42
+ color: i[e]
78
43
  },
79
- warning: {
80
- root: {
81
- backgroundColor: "status/warning/bg",
82
- borderColor: "status/warning/border",
83
- color: "status/warning/text"
84
- },
85
- indicator: { color: "status/warning/icon" }
86
- }
87
- } },
44
+ indicator: { color: t[e] }
45
+ }])) },
88
46
  defaultVariants: { variant: "info" }
89
47
  });
90
48
  //#endregion
91
- export { r as default };
49
+ export { s as default };
@@ -0,0 +1,71 @@
1
+ import { rem as e } from "../themeUtils.js";
2
+ import { ICONS_MAP as t, NOTIFICATION_VARIANTS as n, ROOT_MAP as r, TEXT_MAP as i } from "../common/AlertAndToast.common.js";
3
+ import { defineSlotRecipe as a } from "@chakra-ui/react/styled-system";
4
+ import { toastAnatomy as o } from "@chakra-ui/react/anatomy";
5
+ //#region lib/theme/slot-recipes/Toast.recipe.ts
6
+ var s = a({
7
+ className: "toast",
8
+ slots: [
9
+ ...o.keys(),
10
+ "content",
11
+ "icon",
12
+ "timestamp"
13
+ ],
14
+ base: {
15
+ actionTrigger: { marginBlockStart: "16" },
16
+ content: {
17
+ flex: 1,
18
+ minWidth: 0
19
+ },
20
+ description: { textStyle: "comp/notification/message" },
21
+ icon: {
22
+ alignSelf: "flex-start",
23
+ flexShrink: 0,
24
+ height: "24",
25
+ width: "24"
26
+ },
27
+ root: {
28
+ alignItems: "flex-start",
29
+ border: "1px solid",
30
+ borderRadius: "8",
31
+ boxShadow: "elevation/lg",
32
+ display: "flex",
33
+ gap: "8",
34
+ paddingBlock: "16",
35
+ paddingInline: "12",
36
+ position: "relative",
37
+ translate: "var(--x) var(--y)",
38
+ width: e(480),
39
+ willChange: "translate, opacity, scale",
40
+ transition: "translate 400ms, scale 400ms, opacity 400ms, height 400ms, box-shadow 200ms",
41
+ transitionTimingFunction: "cubic-bezier(0.21, 1.02, 0.73, 1)",
42
+ _closed: {
43
+ transition: "translate 400ms, scale 400ms, opacity 200ms",
44
+ transitionTimingFunction: "cubic-bezier(0.06, 0.71, 0.55, 1)"
45
+ }
46
+ },
47
+ timestamp: {
48
+ marginBlockStart: "16",
49
+ textStyle: "comp/notification/message"
50
+ },
51
+ title: {
52
+ marginBlockEnd: "2",
53
+ textStyle: "comp/notification/title"
54
+ },
55
+ closeTrigger: {
56
+ insetBlockStart: "12",
57
+ insetInlineEnd: "12",
58
+ position: "absolute"
59
+ }
60
+ },
61
+ variants: { variant: Object.fromEntries(n.map((e) => [e, {
62
+ icon: { color: t[e] },
63
+ root: {
64
+ ...r[e],
65
+ color: i[e]
66
+ }
67
+ }])) },
68
+ defaultVariants: { variant: "info" }
69
+ });
70
+ //#endregion
71
+ export { s as default };
@@ -37,9 +37,10 @@ import F from "./Table.recipe.js";
37
37
  import I from "./Tabs.recipe.js";
38
38
  import L from "./Tag.recipe.js";
39
39
  import R from "./TagsInput.recipe.js";
40
- import z from "./Tooltip.recipe.js";
40
+ import z from "./Toast.recipe.js";
41
+ import B from "./Tooltip.recipe.js";
41
42
  //#region lib/theme/slot-recipes/index.ts
42
- var B = {
43
+ var V = {
43
44
  accordion: t,
44
45
  actionBar: n,
45
46
  alert: r,
@@ -79,7 +80,8 @@ var B = {
79
80
  tabs: I,
80
81
  tag: L,
81
82
  tagsInput: R,
82
- tooltip: z
83
+ toast: z,
84
+ tooltip: B
83
85
  };
84
86
  //#endregion
85
- export { B as default };
87
+ export { V as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.178",
4
+ "version": "0.3.179",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",
@@ -86,7 +86,7 @@
86
86
  "@emotion/styled": "^11.14.1",
87
87
  "@fontsource-variable/figtree": "^5.2.10",
88
88
  "@fontsource-variable/source-code-pro": "^5.2.7",
89
- "react-markdown": "^10.0.0"
89
+ "react-markdown": "^10.1.0"
90
90
  },
91
91
  "publishConfig": {
92
92
  "access": "public"
@@ -1,65 +0,0 @@
1
- declare const alertSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "title" | "root" | "description" | "indicator", {
2
- variant: {
3
- ai: {
4
- root: {
5
- border: "1px solid transparent";
6
- background: "{colors.status.ai.bg} padding-box, {colors.status.ai.border} border-box";
7
- color: "status/ai/text";
8
- };
9
- indicator: {
10
- color: "status/ai/icon";
11
- };
12
- };
13
- critical: {
14
- root: {
15
- backgroundColor: "status/critical/bg";
16
- borderColor: "status/critical/border";
17
- color: "status/critical/text";
18
- };
19
- indicator: {
20
- color: "status/critical/icon";
21
- };
22
- };
23
- info: {
24
- root: {
25
- backgroundColor: "status/info/bg";
26
- borderColor: "status/info/border";
27
- color: "status/info/text";
28
- };
29
- indicator: {
30
- color: "status/info/icon";
31
- };
32
- };
33
- progress: {
34
- root: {
35
- backgroundColor: "status/progress/bg";
36
- borderColor: "status/progress/border";
37
- color: "status/progress/text";
38
- };
39
- indicator: {
40
- color: "status/progress/icon";
41
- };
42
- };
43
- success: {
44
- root: {
45
- backgroundColor: "status/success/bg";
46
- borderColor: "status/success/border";
47
- color: "status/success/text";
48
- };
49
- indicator: {
50
- color: "status/success/icon";
51
- };
52
- };
53
- warning: {
54
- root: {
55
- backgroundColor: "status/warning/bg";
56
- borderColor: "status/warning/border";
57
- color: "status/warning/text";
58
- };
59
- indicator: {
60
- color: "status/warning/icon";
61
- };
62
- };
63
- };
64
- }>;
65
- export default alertSlotRecipe;