@bitrise/bitkit-v2 0.3.79 → 0.3.81

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,8 @@
1
+ import { Checkbox } from '@chakra-ui/react/checkbox';
2
+ export type BitkitCheckboxProps = {
3
+ helperText?: string;
4
+ label: string;
5
+ state?: 'disabled' | 'readOnly' | 'skeleton';
6
+ } & Omit<Checkbox.RootProps, 'disabled' | 'label' | 'readOnly'>;
7
+ declare const BitkitCheckbox: (props: BitkitCheckboxProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default BitkitCheckbox;
@@ -0,0 +1,20 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { Checkbox as o } from "@chakra-ui/react/checkbox";
3
+ import { Skeleton as i } from "@chakra-ui/react/skeleton";
4
+ import { Text as m } from "@chakra-ui/react/text";
5
+ import s from "../../icons/24x24/IconCheck24.js";
6
+ import a from "../../icons/24x24/IconMinus24.js";
7
+ const u = (d) => {
8
+ const { helperText: r, label: c, state: t, ...l } = d;
9
+ return /* @__PURE__ */ n(o.Root, { disabled: t === "disabled", readOnly: t === "readOnly", ...l, children: [
10
+ /* @__PURE__ */ e(o.HiddenInput, {}),
11
+ /* @__PURE__ */ e(i, { loading: t === "skeleton", children: /* @__PURE__ */ e(o.Control, { children: l.checked === "indeterminate" ? /* @__PURE__ */ e(a, {}) : /* @__PURE__ */ e(s, {}) }) }),
12
+ /* @__PURE__ */ e(i, { loading: t === "skeleton", children: /* @__PURE__ */ n(o.Label, { as: "div", children: [
13
+ c,
14
+ !!r && /* @__PURE__ */ e(m, { color: "text/helper", textStyle: "comp/input/helperText", children: r })
15
+ ] }) })
16
+ ] });
17
+ };
18
+ export {
19
+ u as default
20
+ };
@@ -0,0 +1,14 @@
1
+ import { CheckboxGroupProps } from '@chakra-ui/react/checkbox';
2
+ import { Fieldset } from '@chakra-ui/react/fieldset';
3
+ import { ReactNode } from 'react';
4
+ export interface BitkitCheckboxGroupProps extends Fieldset.RootProps {
5
+ checkboxGroupProps?: CheckboxGroupProps;
6
+ children: ReactNode;
7
+ helperText?: string;
8
+ label: string;
9
+ name?: CheckboxGroupProps['name'];
10
+ onValueChange: CheckboxGroupProps['onValueChange'];
11
+ value: CheckboxGroupProps['value'];
12
+ }
13
+ declare const BitkitCheckboxGroup: (props: BitkitCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default BitkitCheckboxGroup;
@@ -0,0 +1,14 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { CheckboxGroup as d } from "@chakra-ui/react/checkbox";
3
+ import { Fieldset as r } from "@chakra-ui/react/fieldset";
4
+ const f = (t) => {
5
+ const { checkboxGroupProps: l, children: n, helperText: o, label: i, name: c, onValueChange: a, value: p, ...h } = t;
6
+ return /* @__PURE__ */ s(r.Root, { ...h, children: [
7
+ /* @__PURE__ */ e(r.Legend, { children: i }),
8
+ !!o && /* @__PURE__ */ e(r.HelperText, { children: o }),
9
+ /* @__PURE__ */ e(r.Content, { display: "flex", flexDirection: "column", gap: "12", marginBlockStart: "12", asChild: !0, children: /* @__PURE__ */ e(d, { name: c, onValueChange: a, value: p, ...l, children: n }) })
10
+ ] });
11
+ };
12
+ export {
13
+ f as default
14
+ };
@@ -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
  };
@@ -1,6 +1,8 @@
1
1
  export { default as BitkitActionBar, type BitkitActionBarProps } from './BitkitActionBar/BitkitActionBar';
2
2
  export { default as BitkitBadge, type BitkitBadgeProps } from './BitkitBadge/BitkitBadge';
3
3
  export { default as BitkitButton, type BitkitButtonProps } from './BitkitButton/BitkitButton';
4
+ export { default as BitkitCheckbox, type BitkitCheckboxProps } from './BitkitCheckbox/BitkitCheckbox';
5
+ export { default as BitkitCheckboxGroup, type BitkitCheckboxGroupProps, } from './BitkitCheckboxGroup/BitkitCheckboxGroup';
4
6
  export { default as BitkitCloseButton, type BitkitCloseButtonProps } from './BitkitCloseButton/BitkitCloseButton';
5
7
  export { default as BitkitColorButton, type BitkitColorButtonProps } from './BitkitColorButton/BitkitColorButton';
6
8
  export { default as BitkitDefinitionTooltip, type BitkitDefinitionTooltipProps, } from './BitkitDefinitionTooltip/BitkitDefinitionTooltip';
@@ -10,6 +12,7 @@ export { default as BitkitInteractiveTooltip, type BitkitInteractiveTooltipProps
10
12
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
11
13
  export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/BitkitSelect';
12
14
  export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
15
+ export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
13
16
  export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
14
17
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
15
18
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';