@bitrise/bitkit-v2 0.3.76 → 0.3.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/components/BitkitActionBar/BitkitActionBar.js +19 -0
  2. package/dist/components/BitkitCloseButton/BitkitCloseButton.js +15 -14
  3. package/dist/components/BitkitColorButton/BitkitColorButton.js +8 -0
  4. package/dist/components/BitkitDefinitionTooltip/BitkitDefinitionTooltip.d.ts +8 -0
  5. package/dist/components/BitkitDefinitionTooltip/BitkitDefinitionTooltip.js +20 -0
  6. package/dist/components/BitkitInteractiveTooltip/BitkitInteractiveTooltip.d.ts +17 -0
  7. package/dist/components/BitkitInteractiveTooltip/BitkitInteractiveTooltip.js +46 -0
  8. package/dist/components/BitkitTabs/BitkitTabs.js +41 -0
  9. package/dist/components/BitkitToggle/components/BitkitToggleReadOnly.d.ts +1 -1
  10. package/dist/components/BitkitTooltip/BitkitTooltip.d.ts +3 -1
  11. package/dist/components/BitkitTooltip/BitkitTooltip.js +12 -5
  12. package/dist/components/index.d.ts +6 -0
  13. package/dist/main.js +1092 -1080
  14. package/dist/theme/recipes/DefinitionTooltip.recipe.d.ts +11 -0
  15. package/dist/theme/recipes/DefinitionTooltip.recipe.js +25 -0
  16. package/dist/theme/recipes/Link.recipe.d.ts +1 -1
  17. package/dist/theme/recipes/Link.recipe.js +1 -1
  18. package/dist/theme/recipes/index.d.ts +11 -1
  19. package/dist/theme/recipes/index.js +18 -16
  20. package/dist/theme/slot-recipes/ActionBar.recipe.js +6 -3
  21. package/dist/theme/slot-recipes/EmptyState.recipe.d.ts +1 -1
  22. package/dist/theme/slot-recipes/Tabs.recipe.d.ts +1 -1
  23. package/dist/theme/slot-recipes/Tooltip.recipe.d.ts +23 -1
  24. package/dist/theme/slot-recipes/Tooltip.recipe.js +30 -6
  25. package/dist/theme/slot-recipes/index.d.ts +25 -3
  26. package/dist/theme/tokens/colors.d.ts +22 -0
  27. package/dist/theme/tokens/colors.js +11 -0
  28. package/dist/theme/tokens/index.d.ts +11 -0
  29. package/package.json +4 -4
@@ -0,0 +1,19 @@
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { ActionBar as r } from "@chakra-ui/react/action-bar";
3
+ import { Portal as a } from "@chakra-ui/react/portal";
4
+ import d from "../BitkitCloseButton/BitkitCloseButton.js";
5
+ const x = (n) => {
6
+ const { children: l, countValue: c, onClose: o, size: e, ...s } = n;
7
+ return /* @__PURE__ */ t(r.Root, { size: e, ...s, children: /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(r.Positioner, { children: /* @__PURE__ */ i(r.Content, { children: [
8
+ /* @__PURE__ */ i(r.SelectionTrigger, { tabIndex: -1, textStyle: e === "xs" ? "body/sm/regular" : "body/md/regular", children: [
9
+ c,
10
+ " selected"
11
+ ] }),
12
+ /* @__PURE__ */ t(r.Separator, {}),
13
+ l,
14
+ !!o && /* @__PURE__ */ t(d, { colorPalette: "neutral", onClick: o, size: e })
15
+ ] }) }) }) });
16
+ };
17
+ export {
18
+ x as default
19
+ };
@@ -1,23 +1,24 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useRecipe as l, chakra as a } from "@chakra-ui/react/styled-system";
2
+ import { useRecipe as l, chakra as m } from "@chakra-ui/react/styled-system";
3
3
  import { forwardRef as c } from "react";
4
4
  import n from "../../icons/16x16/IconCross16.js";
5
- import m from "../../icons/24x24/IconCross24.js";
6
- const p = c((e, s) => {
7
- const { size: t, ...r } = e, i = l({ key: "closeButton" });
8
- return /* @__PURE__ */ o(
9
- a.button,
5
+ import p from "../../icons/24x24/IconCross24.js";
6
+ import f from "../BitkitTooltip/BitkitTooltip.js";
7
+ const u = c((i, s) => {
8
+ const { "aria-label": t = "Close", size: r, ...e } = i, a = l({ key: "closeButton" });
9
+ return /* @__PURE__ */ o(f, { showArrow: !1, size: "sm", text: t, children: /* @__PURE__ */ o(
10
+ m.button,
10
11
  {
11
12
  ref: s,
12
- "aria-label": "Close",
13
- ...r,
14
- css: i({ size: t }),
15
- color: r.colorPalette === "neutral" ? "icon/primary" : void 0,
16
- children: t === "xs" ? /* @__PURE__ */ o(n, {}) : /* @__PURE__ */ o(m, {})
13
+ "aria-label": t,
14
+ ...e,
15
+ css: a({ size: r }),
16
+ color: e.colorPalette === "neutral" ? "icon/primary" : void 0,
17
+ children: r === "xs" ? /* @__PURE__ */ o(n, {}) : /* @__PURE__ */ o(p, {})
17
18
  }
18
- );
19
+ ) });
19
20
  });
20
- p.displayName = "BitkitCloseButton";
21
+ u.displayName = "BitkitCloseButton";
21
22
  export {
22
- p as default
23
+ u as default
23
24
  };
@@ -0,0 +1,8 @@
1
+ import { createRecipeContext as t } from "@chakra-ui/react/styled-system";
2
+ import o from "../../theme/recipes/ColorButton.recipe.js";
3
+ const { withContext: e } = t({ recipe: o }), n = e("button", {
4
+ defaultProps: { type: "button" }
5
+ });
6
+ export {
7
+ n as default
8
+ };
@@ -0,0 +1,8 @@
1
+ import { BitkitTooltipProps } from '../BitkitTooltip/BitkitTooltip';
2
+ export interface BitkitDefinitionTooltipProps extends Pick<BitkitTooltipProps, 'placement' | 'tooltipProps'> {
3
+ children: string;
4
+ method?: 'click' | 'hover';
5
+ text: string;
6
+ }
7
+ declare const BitkitDefinitionTooltip: (props: BitkitDefinitionTooltipProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default BitkitDefinitionTooltip;
@@ -0,0 +1,20 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useRecipe as a, chakra as m } from "@chakra-ui/react/styled-system";
3
+ import { useState as d } from "react";
4
+ import f from "../BitkitTooltip/BitkitTooltip.js";
5
+ const y = (r) => {
6
+ const { children: n, method: t = "click", text: p, tooltipProps: i, ...c } = r, s = a({ key: "definitionTooltip" }), [o, l] = d(!1);
7
+ return /* @__PURE__ */ e(f, { tooltipProps: t === "click" ? { ...i, open: o } : i, text: p, ...c, children: /* @__PURE__ */ e(
8
+ m.button,
9
+ {
10
+ "aria-expanded": o,
11
+ css: s({ method: t }),
12
+ onClick: t === "click" ? () => l(!o) : void 0,
13
+ type: "button",
14
+ children: n
15
+ }
16
+ ) });
17
+ };
18
+ export {
19
+ y as default
20
+ };
@@ -0,0 +1,17 @@
1
+ import { TooltipRootProps } from '@chakra-ui/react/tooltip';
2
+ import { ReactNode } from 'react';
3
+ import { BitkitColorButtonProps } from '../BitkitColorButton/BitkitColorButton';
4
+ export type BitkitInteractiveTooltipProps = {
5
+ button?: BitkitColorButtonProps;
6
+ children: ReactNode;
7
+ learnMoreTarget?: HTMLAnchorElement['target'];
8
+ learnMoreUrl: string;
9
+ placement?: NonNullable<TooltipRootProps['positioning']>['placement'];
10
+ text: string;
11
+ tooltipProps?: TooltipRootProps;
12
+ };
13
+ declare const BitkitInteractiveTooltip: {
14
+ ({ button, children, learnMoreTarget, learnMoreUrl, placement, text, tooltipProps, }: BitkitInteractiveTooltipProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export default BitkitInteractiveTooltip;
@@ -0,0 +1,46 @@
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { Box as c } from "@chakra-ui/react/box";
3
+ import { Link as m } from "@chakra-ui/react/link";
4
+ import { Tooltip as r } from "@chakra-ui/react/tooltip";
5
+ import f from "../BitkitColorButton/BitkitColorButton.js";
6
+ const d = ({
7
+ button: o,
8
+ children: n,
9
+ learnMoreTarget: e,
10
+ learnMoreUrl: l,
11
+ placement: s = "top",
12
+ text: p,
13
+ tooltipProps: a
14
+ }) => /* @__PURE__ */ t(
15
+ r.Root,
16
+ {
17
+ positioning: { placement: s, offset: { mainAxis: 8, crossAxis: 0 } },
18
+ ...a,
19
+ interactive: !0,
20
+ size: "lg",
21
+ children: [
22
+ /* @__PURE__ */ i(r.Trigger, { asChild: !0, children: n }),
23
+ /* @__PURE__ */ i(r.Positioner, { children: /* @__PURE__ */ t(r.Content, { children: [
24
+ /* @__PURE__ */ i(r.Arrow, { children: /* @__PURE__ */ i(r.ArrowTip, {}) }),
25
+ p,
26
+ /* @__PURE__ */ t(c, { marginBlockStart: "16", display: "flex", gap: "16", justifyContent: "space-between", alignItems: "center", children: [
27
+ /* @__PURE__ */ i(
28
+ m,
29
+ {
30
+ color: "sys/purple/highlight",
31
+ href: l,
32
+ target: e,
33
+ rel: e === "_blank" ? "noopener noreferrer" : void 0,
34
+ children: "Learn more"
35
+ }
36
+ ),
37
+ o && /* @__PURE__ */ i(f, { ...o })
38
+ ] })
39
+ ] }) })
40
+ ]
41
+ }
42
+ );
43
+ d.displayName = "BitkitInteractiveTooltip";
44
+ export {
45
+ d as default
46
+ };
@@ -0,0 +1,41 @@
1
+ import { jsx as o, jsxs as i, Fragment as m } from "react/jsx-runtime";
2
+ import { createContext as y } from "@chakra-ui/react";
3
+ import { Box as R } from "@chakra-ui/react/box";
4
+ import { Tabs as a } from "@chakra-ui/react/tabs";
5
+ import { Text as f } from "@chakra-ui/react/text";
6
+ import { forwardRef as p } from "react";
7
+ const [g, u] = y({
8
+ name: "RootPropsContext",
9
+ hookName: "useRootPropsContext",
10
+ providerName: "<RootProps />"
11
+ }), c = p((t, r) => /* @__PURE__ */ o(g, { value: t, children: /* @__PURE__ */ o(a.Root, { ref: r, ...t }) }));
12
+ c.displayName = "BitkitTabs.Root";
13
+ const x = p((t, r) => {
14
+ const { badge: T, children: s, icon: n, secondaryText: d, ...l } = t, { variant: b } = u();
15
+ return /* @__PURE__ */ o(a.Trigger, { ref: r, ...l, children: b === "line" ? /* @__PURE__ */ i(m, { children: [
16
+ n,
17
+ s,
18
+ T
19
+ ] }) : /* @__PURE__ */ i(m, { children: [
20
+ /* @__PURE__ */ i(R, { display: "flex", gap: "16", children: [
21
+ s,
22
+ n
23
+ ] }),
24
+ !!d && /* @__PURE__ */ o(f, { as: "span", textStyle: "body/md/regular", color: l.disabled ? "text/on-disabled" : "text/secondary", children: d })
25
+ ] }) });
26
+ });
27
+ x.displayName = "BitkitTabs.Trigger";
28
+ const e = {
29
+ ...a,
30
+ Root: c,
31
+ Trigger: x
32
+ };
33
+ e.Content.displayName = "BitkitTabs.Content";
34
+ e.List.displayName = "BitkitTabs.List";
35
+ e.ContentGroup.displayName = "BitkitTabs.ContentGroup";
36
+ e.Root.displayName = "BitkitTabs.Root";
37
+ export {
38
+ g as RootPropsProvider,
39
+ e as default,
40
+ u as useRootPropsContext
41
+ };
@@ -1,4 +1,4 @@
1
1
  import { BitkitToggleProps } from '../BitkitToggle.types';
2
2
  type Props = Pick<BitkitToggleProps, 'state' | 'children'>;
3
- declare const BitkitToggleReadOnly: ({ state, children }: Props) => string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
3
+ declare const BitkitToggleReadOnly: ({ state, children }: Props) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined;
4
4
  export default BitkitToggleReadOnly;
@@ -3,11 +3,13 @@ import { ReactNode } from 'react';
3
3
  export type BitkitTooltipProps = {
4
4
  children: ReactNode;
5
5
  placement?: NonNullable<TooltipRootProps['positioning']>['placement'];
6
+ showArrow?: boolean;
7
+ size?: TooltipRootProps['size'];
6
8
  text: string;
7
9
  tooltipProps?: TooltipRootProps;
8
10
  };
9
11
  declare const BitkitTooltip: {
10
- ({ children, placement, text, tooltipProps }: BitkitTooltipProps): import("react/jsx-runtime").JSX.Element;
12
+ ({ children, placement, showArrow, size, text, tooltipProps, }: BitkitTooltipProps): import("react/jsx-runtime").JSX.Element;
11
13
  displayName: string;
12
14
  };
13
15
  export default BitkitTooltip;
@@ -1,13 +1,20 @@
1
1
  import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
2
  import { Tooltip as i } from "@chakra-ui/react/tooltip";
3
- const l = ({ children: r, placement: s = "top", text: e, tooltipProps: n }) => /* @__PURE__ */ t(i.Root, { positioning: { placement: s, offset: { mainAxis: 8, crossAxis: 0 } }, ...n, children: [
3
+ const d = ({
4
+ children: r,
5
+ placement: e = "top",
6
+ showArrow: s = !0,
7
+ size: n = "md",
8
+ text: l,
9
+ tooltipProps: p
10
+ }) => /* @__PURE__ */ t(i.Root, { positioning: { placement: e, offset: { mainAxis: 8, crossAxis: 0 } }, size: n, ...p, children: [
4
11
  /* @__PURE__ */ o(i.Trigger, { asChild: !0, children: r }),
5
12
  /* @__PURE__ */ o(i.Positioner, { children: /* @__PURE__ */ t(i.Content, { children: [
6
- /* @__PURE__ */ o(i.Arrow, { children: /* @__PURE__ */ o(i.ArrowTip, {}) }),
7
- e
13
+ s && /* @__PURE__ */ o(i.Arrow, { children: /* @__PURE__ */ o(i.ArrowTip, {}) }),
14
+ l
8
15
  ] }) })
9
16
  ] });
10
- l.displayName = "BitkitTooltip";
17
+ d.displayName = "BitkitTooltip";
11
18
  export {
12
- l as default
19
+ d as default
13
20
  };
@@ -1,9 +1,15 @@
1
+ export { default as BitkitActionBar, type BitkitActionBarProps } from './BitkitActionBar/BitkitActionBar';
2
+ export { default as BitkitBadge, type BitkitBadgeProps } from './BitkitBadge/BitkitBadge';
1
3
  export { default as BitkitButton, type BitkitButtonProps } from './BitkitButton/BitkitButton';
2
4
  export { default as BitkitCloseButton, type BitkitCloseButtonProps } from './BitkitCloseButton/BitkitCloseButton';
5
+ export { default as BitkitColorButton, type BitkitColorButtonProps } from './BitkitColorButton/BitkitColorButton';
6
+ export { default as BitkitDefinitionTooltip, type BitkitDefinitionTooltipProps, } from './BitkitDefinitionTooltip/BitkitDefinitionTooltip';
3
7
  export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './BitkitEmptyState/BitkitEmptyState';
4
8
  export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
9
+ export { default as BitkitInteractiveTooltip, type BitkitInteractiveTooltipProps, } from './BitkitInteractiveTooltip/BitkitInteractiveTooltip';
5
10
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
6
11
  export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/BitkitSelect';
12
+ export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
7
13
  export { default as BitkitTextField, type BitkitTextFieldProps } from './BitkitTextField/BitkitTextField';
8
14
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
9
15
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';