@bitrise/bitkit-v2 0.3.79 → 0.3.80

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,24 +1,24 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
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 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(
5
+ import d from "../../icons/24x24/IconCross24.js";
6
+ import p from "../BitkitTooltip/BitkitTooltip.js";
7
+ const f = c((i, s) => {
8
+ const { "aria-label": r = "Close", size: e, ...o } = i, a = l({ key: "closeButton" });
9
+ return /* @__PURE__ */ t(p, { disabled: o.disabled, showArrow: !1, size: "sm", text: r, children: /* @__PURE__ */ t(
10
10
  m.button,
11
11
  {
12
12
  ref: s,
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, {})
13
+ "aria-label": r,
14
+ ...o,
15
+ css: a({ size: e }),
16
+ color: o.colorPalette === "neutral" && !o.disabled ? "icon/primary" : void 0,
17
+ children: e === "xs" ? /* @__PURE__ */ t(n, {}) : /* @__PURE__ */ t(d, {})
18
18
  }
19
19
  ) });
20
20
  });
21
- u.displayName = "BitkitCloseButton";
21
+ f.displayName = "BitkitCloseButton";
22
22
  export {
23
- u as default
23
+ f as default
24
24
  };
@@ -0,0 +1,10 @@
1
+ import { TagRootProps } from '@chakra-ui/react/tag';
2
+ import { ReactNode } from 'react';
3
+ export interface BitkitTagProps extends TagRootProps {
4
+ icon?: ReactNode;
5
+ labelText: string;
6
+ onRemove?: () => void;
7
+ state?: 'disabled' | 'skeleton';
8
+ }
9
+ declare const BitkitTag: (props: BitkitTagProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default BitkitTag;
@@ -0,0 +1,24 @@
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { Skeleton as m } from "@chakra-ui/react/skeleton";
3
+ import { Tag as t } from "@chakra-ui/react/tag";
4
+ import h from "../BitkitCloseButton/BitkitCloseButton.js";
5
+ const g = (a) => {
6
+ const { labelText: n, icon: l, onRemove: r, state: d, ...o } = a, i = d === "skeleton", s = !!o.disabled || d === "disabled";
7
+ return /* @__PURE__ */ c(t.Root, { ...o, disabled: s, children: [
8
+ !!l && /* @__PURE__ */ e(t.StartElement, { asChild: !0, children: l }),
9
+ /* @__PURE__ */ e(m, { loading: i, height: i ? "8" : void 0, overflow: "hidden", borderRadius: "0", children: /* @__PURE__ */ e(t.Label, { children: n }) }),
10
+ !!r && /* @__PURE__ */ e(t.EndElement, { asChild: !0, children: /* @__PURE__ */ e(
11
+ h,
12
+ {
13
+ disabled: s || i,
14
+ size: "xs",
15
+ "aria-label": "Remove tag",
16
+ colorPalette: o.colorPalette,
17
+ onClick: r
18
+ }
19
+ ) })
20
+ ] });
21
+ };
22
+ export {
23
+ g as default
24
+ };
@@ -2,6 +2,7 @@ import { TooltipRootProps } from '@chakra-ui/react/tooltip';
2
2
  import { ReactNode } from 'react';
3
3
  export type BitkitTooltipProps = {
4
4
  children: ReactNode;
5
+ disabled?: TooltipRootProps['disabled'];
5
6
  placement?: NonNullable<TooltipRootProps['positioning']>['placement'];
6
7
  showArrow?: boolean;
7
8
  size?: TooltipRootProps['size'];
@@ -9,7 +10,7 @@ export type BitkitTooltipProps = {
9
10
  tooltipProps?: TooltipRootProps;
10
11
  };
11
12
  declare const BitkitTooltip: {
12
- ({ children, placement, showArrow, size, text, tooltipProps, }: BitkitTooltipProps): import("react/jsx-runtime").JSX.Element;
13
+ ({ children, disabled, placement, showArrow, size, text, tooltipProps, }: BitkitTooltipProps): import("react/jsx-runtime").JSX.Element;
13
14
  displayName: string;
14
15
  };
15
16
  export default BitkitTooltip;
@@ -1,20 +1,30 @@
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 d = ({
3
+ const m = ({
4
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: [
11
- /* @__PURE__ */ o(i.Trigger, { asChild: !0, children: r }),
12
- /* @__PURE__ */ o(i.Positioner, { children: /* @__PURE__ */ t(i.Content, { children: [
13
- s && /* @__PURE__ */ o(i.Arrow, { children: /* @__PURE__ */ o(i.ArrowTip, {}) }),
14
- l
15
- ] }) })
16
- ] });
17
- d.displayName = "BitkitTooltip";
5
+ disabled: e,
6
+ placement: s = "top",
7
+ showArrow: n = !0,
8
+ size: l = "md",
9
+ text: p,
10
+ tooltipProps: d
11
+ }) => /* @__PURE__ */ t(
12
+ i.Root,
13
+ {
14
+ disabled: e,
15
+ positioning: { placement: s, offset: { mainAxis: 8, crossAxis: 0 } },
16
+ size: l,
17
+ ...d,
18
+ children: [
19
+ /* @__PURE__ */ o(i.Trigger, { asChild: !0, children: r }),
20
+ /* @__PURE__ */ o(i.Positioner, { children: /* @__PURE__ */ t(i.Content, { children: [
21
+ n && /* @__PURE__ */ o(i.Arrow, { children: /* @__PURE__ */ o(i.ArrowTip, {}) }),
22
+ p
23
+ ] }) })
24
+ ]
25
+ }
26
+ );
27
+ m.displayName = "BitkitTooltip";
18
28
  export {
19
- d as default
29
+ m as default
20
30
  };
@@ -10,6 +10,7 @@ export { default as BitkitInteractiveTooltip, type BitkitInteractiveTooltipProps
10
10
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
11
11
  export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/BitkitSelect';
12
12
  export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
13
+ export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
13
14
  export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
14
15
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
15
16
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';