@bitrise/bitkit-v2 0.3.77 → 0.3.79

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 (32) hide show
  1. package/dist/components/BitkitActionBar/BitkitActionBar.js +19 -0
  2. package/dist/components/BitkitColorButton/BitkitColorButton.js +8 -0
  3. package/dist/components/BitkitDefinitionTooltip/BitkitDefinitionTooltip.d.ts +8 -0
  4. package/dist/components/BitkitDefinitionTooltip/BitkitDefinitionTooltip.js +20 -0
  5. package/dist/components/BitkitInteractiveTooltip/BitkitInteractiveTooltip.d.ts +17 -0
  6. package/dist/components/BitkitInteractiveTooltip/BitkitInteractiveTooltip.js +46 -0
  7. package/dist/components/BitkitTabs/BitkitTabs.js +41 -0
  8. package/dist/components/{BitkitTextField/BitkitTextField.d.ts → BitkitTextInput/BitkitTextInput.d.ts} +3 -3
  9. package/dist/components/BitkitTextInput/BitkitTextInput.js +62 -0
  10. package/dist/components/BitkitToggle/components/BitkitToggleReadOnly.d.ts +1 -1
  11. package/dist/components/BitkitToggle/components/BitkitToggleReadOnly.js +3 -3
  12. package/dist/components/index.d.ts +7 -1
  13. package/dist/main.js +1092 -1080
  14. package/dist/theme/recipes/Badge.recipe.js +6 -3
  15. package/dist/theme/recipes/CloseButton.recipe.js +2 -2
  16. package/dist/theme/recipes/ColorButton.recipe.js +1 -1
  17. package/dist/theme/recipes/DefinitionTooltip.recipe.d.ts +11 -0
  18. package/dist/theme/recipes/DefinitionTooltip.recipe.js +25 -0
  19. package/dist/theme/recipes/Link.recipe.d.ts +1 -1
  20. package/dist/theme/recipes/Link.recipe.js +1 -1
  21. package/dist/theme/recipes/index.d.ts +11 -1
  22. package/dist/theme/recipes/index.js +18 -16
  23. package/dist/theme/slot-recipes/EmptyState.recipe.d.ts +1 -1
  24. package/dist/theme/slot-recipes/Tabs.recipe.d.ts +1 -1
  25. package/dist/theme/slot-recipes/Tooltip.recipe.d.ts +5 -2
  26. package/dist/theme/slot-recipes/Tooltip.recipe.js +8 -3
  27. package/dist/theme/slot-recipes/index.d.ts +7 -4
  28. package/dist/theme/tokens/colors.d.ts +22 -0
  29. package/dist/theme/tokens/colors.js +11 -0
  30. package/dist/theme/tokens/index.d.ts +11 -0
  31. package/package.json +4 -4
  32. package/dist/components/BitkitTextField/BitkitTextField.js +0 -62
@@ -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
+ };
@@ -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,7 +1,7 @@
1
1
  import { FieldRootProps } from '@chakra-ui/react/field';
2
2
  import { InputProps } from '@chakra-ui/react/input';
3
3
  import { BitkitFieldProps } from '../BitkitField/BitkitField';
4
- export interface BitkitTextFieldProps extends FieldRootProps {
4
+ export interface BitkitTextInputProps extends FieldRootProps {
5
5
  counter?: boolean;
6
6
  errorText?: BitkitFieldProps['errorText'];
7
7
  helperText?: BitkitFieldProps['helperText'];
@@ -15,5 +15,5 @@ export interface BitkitTextFieldProps extends FieldRootProps {
15
15
  tooltip?: BitkitFieldProps['tooltip'];
16
16
  warningText?: BitkitFieldProps['warningText'];
17
17
  }
18
- declare const BitkitTextField: import('react').ForwardRefExoticComponent<BitkitTextFieldProps & import('react').RefAttributes<HTMLDivElement>>;
19
- export default BitkitTextField;
18
+ declare const BitkitTextInput: import('react').ForwardRefExoticComponent<BitkitTextInputProps & import('react').RefAttributes<HTMLDivElement>>;
19
+ export default BitkitTextInput;
@@ -0,0 +1,62 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Input as T } from "@chakra-ui/react/input";
3
+ import { InputGroup as E } from "@chakra-ui/react/input-group";
4
+ import { forwardRef as b } from "react";
5
+ import k from "../../icons/16x16/IconErrorCircleFilled16.js";
6
+ import y from "../../icons/16x16/IconWarningYellow16.js";
7
+ import B from "../../icons/24x24/IconErrorCircleFilled24.js";
8
+ import F from "../../icons/24x24/IconWarningYellow24.js";
9
+ import { rem as c } from "../../theme/themeUtils.js";
10
+ import W from "../BitkitField/BitkitField.js";
11
+ const C = b((d, p) => {
12
+ const {
13
+ counter: s,
14
+ errorText: l,
15
+ helperText: g,
16
+ inputProps: n,
17
+ label: f,
18
+ maxLength: e,
19
+ optional: u,
20
+ placeholder: I,
21
+ size: o,
22
+ state: i,
23
+ tooltip: v,
24
+ warningText: a,
25
+ ...x
26
+ } = d, h = i === "warning" || !!a, m = i === "error" || !!l;
27
+ let t;
28
+ m ? t = o === "lg" ? /* @__PURE__ */ r(B, { color: "icon/negative" }) : /* @__PURE__ */ r(k, { color: "icon/negative" }) : h && (t = o === "lg" ? /* @__PURE__ */ r(F, { color: "icon/warning" }) : /* @__PURE__ */ r(y, { color: "icon/warning" }));
29
+ const w = s && e && n?.value !== void 0 ? `${n.value.toString().length}/${e}` : void 0;
30
+ return /* @__PURE__ */ r(
31
+ W,
32
+ {
33
+ counterText: w,
34
+ disabled: i === "disabled",
35
+ errorText: l,
36
+ helperText: g,
37
+ invalid: m,
38
+ label: f,
39
+ optional: u,
40
+ readOnly: i === "readOnly",
41
+ ref: p,
42
+ tooltip: v,
43
+ warningText: a,
44
+ ...x,
45
+ children: /* @__PURE__ */ r(
46
+ E,
47
+ {
48
+ endElement: t,
49
+ endElementProps: {
50
+ marginInlineEnd: o === "lg" ? c(15) : c(11)
51
+ },
52
+ width: "100%",
53
+ children: /* @__PURE__ */ r(T, { placeholder: I, size: o, maxLength: e, ...n })
54
+ }
55
+ )
56
+ }
57
+ );
58
+ });
59
+ C.displayName = "BitkitTextInput";
60
+ export {
61
+ C as default
62
+ };
@@ -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;
@@ -1,9 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { useSwitchContext as i } from "@chakra-ui/react/switch";
3
3
  import n from "../../BitkitBadge/BitkitBadge.js";
4
4
  const d = ({ state: e, children: o }) => {
5
- const { checked: r } = i();
6
- return e === "readOnly" && r ? /* @__PURE__ */ t(n, { colorScheme: "green", variant: "subtle", children: "ON" }) : e === "readOnly" && !r ? /* @__PURE__ */ t(n, { colorScheme: "neutral", variant: "subtle", children: "OFF" }) : o;
5
+ const { checked: t } = i();
6
+ return e === "readOnly" && t ? /* @__PURE__ */ r(n, { colorPalette: "green", variant: "subtle", children: "ON" }) : e === "readOnly" && !t ? /* @__PURE__ */ r(n, { colorPalette: "neutral", variant: "subtle", children: "OFF" }) : o;
7
7
  };
8
8
  export {
9
9
  d as default
@@ -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';
7
- export { default as BitkitTextField, type BitkitTextFieldProps } from './BitkitTextField/BitkitTextField';
12
+ export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
13
+ export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
8
14
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
9
15
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';