@bitrise/bitkit-v2 0.3.78 → 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.
@@ -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,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
@@ -10,6 +10,6 @@ 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 BitkitTextField, type BitkitTextFieldProps } from './BitkitTextField/BitkitTextField';
13
+ export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
14
14
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
15
15
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';
package/dist/main.js CHANGED
@@ -12,7 +12,7 @@ import { default as A } from "./components/BitkitInteractiveTooltip/BitkitIntera
12
12
  import { default as b } from "./components/BitkitNumberInput/BitkitNumberInput.js";
13
13
  import { default as S } from "./components/BitkitSelect/BitkitSelect.js";
14
14
  import { default as P } from "./components/BitkitTabs/BitkitTabs.js";
15
- import { default as y } from "./components/BitkitTextField/BitkitTextField.js";
15
+ import { default as y } from "./components/BitkitTextInput/BitkitTextInput.js";
16
16
  import { default as T } from "./components/BitkitToggle/BitkitToggle.js";
17
17
  import { default as L } from "./components/BitkitTooltip/BitkitTooltip.js";
18
18
  import { default as W } from "./icons/16x16/IconAbortCircle16.js";
@@ -560,7 +560,7 @@ export {
560
560
  r as BitkitProvider,
561
561
  S as BitkitSelect,
562
562
  P as BitkitTabs,
563
- y as BitkitTextField,
563
+ y as BitkitTextInput,
564
564
  T as BitkitToggle,
565
565
  L as BitkitTooltip,
566
566
  W as IconAbortCircle16,
@@ -1,13 +1,16 @@
1
1
  import { defineRecipe as e } from "@chakra-ui/react/styled-system";
2
- const a = e({
2
+ const t = e({
3
3
  className: "badge",
4
4
  base: {
5
+ colorPalette: "neutral",
5
6
  display: "inline-flex",
6
7
  alignItems: "center",
7
8
  gap: "4",
8
9
  padding: "4",
9
10
  borderRadius: "4",
10
- textStyle: "comp/badge/sm"
11
+ textStyle: "comp/badge/sm",
12
+ color: "colorPalette.strong",
13
+ background: "colorPalette.subtle"
11
14
  },
12
15
  variants: {
13
16
  variant: {
@@ -33,5 +36,5 @@ const a = e({
33
36
  ]
34
37
  });
35
38
  export {
36
- a as default
39
+ t as default
37
40
  };
@@ -2,6 +2,7 @@ import { defineRecipe as e } from "@chakra-ui/react/styled-system";
2
2
  const r = e({
3
3
  className: "close-button",
4
4
  base: {
5
+ colorPalette: "neutral",
5
6
  display: "inline-flex",
6
7
  alignItems: "center",
7
8
  justifyContent: "center",
@@ -33,8 +34,7 @@ const r = e({
33
34
  }
34
35
  },
35
36
  defaultVariants: {
36
- size: "xs",
37
- colorPalette: "neutral"
37
+ size: "xs"
38
38
  }
39
39
  });
40
40
  export {
@@ -2,6 +2,7 @@ import { defineRecipe as e } from "@chakra-ui/react/styled-system";
2
2
  const o = e({
3
3
  className: "color-button",
4
4
  base: {
5
+ colorPalette: "neutral",
5
6
  display: "inline-flex",
6
7
  alignItems: "center",
7
8
  justifyContent: "center",
@@ -24,7 +25,6 @@ const o = e({
24
25
  }
25
26
  },
26
27
  defaultVariants: {
27
- colorPalette: "neutral",
28
28
  size: "sm"
29
29
  }
30
30
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.78",
4
+ "version": "0.3.79",
5
5
  "description": "Bitrise Design System Components built with Chakra UI v3",
6
6
  "keywords": [
7
7
  "react",
@@ -1,62 +0,0 @@
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 F } from "react";
5
- import b from "../../icons/16x16/IconErrorCircleFilled16.js";
6
- import k from "../../icons/16x16/IconWarningYellow16.js";
7
- import y from "../../icons/24x24/IconErrorCircleFilled24.js";
8
- import B from "../../icons/24x24/IconWarningYellow24.js";
9
- import { rem as m } from "../../theme/themeUtils.js";
10
- import W from "../BitkitField/BitkitField.js";
11
- const C = F((c, p) => {
12
- const {
13
- counter: s,
14
- errorText: l,
15
- helperText: g,
16
- inputProps: e,
17
- label: f,
18
- maxLength: n,
19
- optional: u,
20
- placeholder: v,
21
- size: o,
22
- state: i,
23
- tooltip: x,
24
- warningText: a,
25
- ...I
26
- } = c, h = i === "warning" || !!a, d = i === "error" || !!l;
27
- let t;
28
- d ? t = o === "lg" ? /* @__PURE__ */ r(y, { color: "icon/negative" }) : /* @__PURE__ */ r(b, { color: "icon/negative" }) : h && (t = o === "lg" ? /* @__PURE__ */ r(B, { color: "icon/warning" }) : /* @__PURE__ */ r(k, { color: "icon/warning" }));
29
- const w = s && n && e?.value !== void 0 ? `${e.value.toString().length}/${n}` : void 0;
30
- return /* @__PURE__ */ r(
31
- W,
32
- {
33
- counterText: w,
34
- disabled: i === "disabled",
35
- errorText: l,
36
- helperText: g,
37
- invalid: d,
38
- label: f,
39
- optional: u,
40
- readOnly: i === "readOnly",
41
- ref: p,
42
- tooltip: x,
43
- warningText: a,
44
- ...I,
45
- children: /* @__PURE__ */ r(
46
- E,
47
- {
48
- endElement: t,
49
- endElementProps: {
50
- marginInlineEnd: o === "lg" ? m(15) : m(11)
51
- },
52
- width: "100%",
53
- children: /* @__PURE__ */ r(T, { placeholder: v, size: o, maxLength: n, ...e })
54
- }
55
- )
56
- }
57
- );
58
- });
59
- C.displayName = "BitkitTextField";
60
- export {
61
- C as default
62
- };