@bitrise/bitkit-v2 0.3.108 → 0.3.109

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,28 +1,28 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { Field as t } from "@chakra-ui/react/field";
3
- import { Text as d } from "@chakra-ui/react/text";
4
- import { forwardRef as f } from "react";
2
+ import { Field as r } from "@chakra-ui/react/field";
3
+ import { Text as p } from "@chakra-ui/react/text";
4
+ import { forwardRef as T } from "react";
5
5
  import u from "../../icons/16x16/IconInfoCircle16.js";
6
- import T from "../BitkitTooltip/BitkitTooltip.js";
7
- const y = f((x, m) => {
8
- const { counterText: o, children: h, errorText: r, helperText: l, label: n, optional: p, tooltip: a, warningText: i, ...s } = x;
9
- return /* @__PURE__ */ c(t.Root, { required: !p, ref: m, ...s, children: [
10
- n || o ? /* @__PURE__ */ c(t.Label, { children: [
6
+ import b from "../BitkitTooltip/BitkitTooltip.js";
7
+ const y = T((m, x) => {
8
+ const { counterText: o, children: s, disabled: f, errorText: t, helperText: l, label: n, optional: a, tooltip: d, warningText: i, ...h } = m;
9
+ return /* @__PURE__ */ c(r.Root, { disabled: f, required: !a, ref: x, ...h, children: [
10
+ n || o ? /* @__PURE__ */ c(r.Label, { children: [
11
11
  n,
12
12
  " ",
13
- p && /* @__PURE__ */ e(
14
- t.RequiredIndicator,
13
+ a && /* @__PURE__ */ e(
14
+ r.RequiredIndicator,
15
15
  {
16
- fallback: /* @__PURE__ */ e(d, { as: "span", color: "input/text/helper", textStyle: "body/md/regular", children: "(optional)" })
16
+ fallback: /* @__PURE__ */ e(p, { as: "span", textStyle: "body/md/regular", children: "(optional)" })
17
17
  }
18
18
  ),
19
- !!a && /* @__PURE__ */ e(T, { text: a ?? "", children: /* @__PURE__ */ e(u, { color: "icon/tertiary" }) }),
20
- o && /* @__PURE__ */ e(d, { as: "span", color: "input/text/helper", marginInlineStart: "auto", textStyle: "comp/input/helperText", children: o })
19
+ !!d && /* @__PURE__ */ e(b, { text: d ?? "", children: /* @__PURE__ */ e(u, { color: "icon/tertiary" }) }),
20
+ o && /* @__PURE__ */ e(p, { as: "span", marginInlineStart: "auto", textStyle: "comp/input/helperText", children: o })
21
21
  ] }) : null,
22
- h,
23
- !!l && !r && !i && /* @__PURE__ */ e(t.HelperText, { children: l }),
24
- !!i && !r && /* @__PURE__ */ e(t.HelperText, { color: "text/body", children: i }),
25
- !!r && /* @__PURE__ */ e(t.ErrorText, { children: r })
22
+ s,
23
+ !!l && !t && !i && /* @__PURE__ */ e(r.HelperText, { children: l }),
24
+ !!i && !t && /* @__PURE__ */ e(r.HelperText, { color: "text/body", children: i }),
25
+ !!t && /* @__PURE__ */ e(r.ErrorText, { children: t })
26
26
  ] });
27
27
  });
28
28
  y.displayName = "BitkitField";
@@ -1,86 +1,86 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { Box as b } from "@chakra-ui/react/box";
3
- import { createListCollection as F } from "@chakra-ui/react/collection";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { createListCollection as k } from "@chakra-ui/react/collection";
4
3
  import { Portal as O } from "@chakra-ui/react/portal";
5
- import { Select as e } from "@chakra-ui/react/select";
6
- import { forwardRef as j } from "react";
7
- import D from "../../icons/16x16/IconChevronDown16.js";
8
- import E from "../../icons/16x16/IconErrorCircleFilled16.js";
9
- import L from "../../icons/16x16/IconWarningYellow16.js";
10
- import R from "../../icons/24x24/IconChevronDown24.js";
11
- import W from "../../icons/24x24/IconErrorCircleFilled24.js";
12
- import Y from "../../icons/24x24/IconWarningYellow24.js";
13
- import z from "../BitkitField/BitkitField.js";
14
- import G from "../BitkitSelectMenu/BitkitSelectMenu.js";
15
- const H = j((d, s) => {
4
+ import { Select as r } from "@chakra-ui/react/select";
5
+ import { forwardRef as b } from "react";
6
+ import F from "../../icons/16x16/IconErrorCircleFilled16.js";
7
+ import j from "../../icons/16x16/IconWarningYellow16.js";
8
+ import E from "../../icons/24x24/IconErrorCircleFilled24.js";
9
+ import L from "../../icons/24x24/IconWarningYellow24.js";
10
+ import R from "../../utilities/AssetSelectChevron.js";
11
+ import W from "../BitkitField/BitkitField.js";
12
+ import Y from "../BitkitSelectMenu/BitkitSelectMenu.js";
13
+ const z = b((d, h) => {
16
14
  const {
17
- contentProps: h,
18
- defaultValue: l,
15
+ contentProps: s,
16
+ defaultValue: n,
19
17
  errorText: a,
20
- hasSearch: m,
21
- helperText: p,
18
+ hasSearch: p,
19
+ helperText: m,
22
20
  isLoading: g,
23
21
  items: f,
24
22
  label: u,
25
- onSearchChange: v,
26
- onValueChange: I,
23
+ onSearchChange: S,
24
+ onValueChange: v,
27
25
  optional: C,
28
- placeholder: S,
29
- selectProps: w,
30
- size: o = "md",
31
- state: t,
32
- tooltip: x,
33
- triggerProps: B,
26
+ placeholder: I,
27
+ selectProps: x,
28
+ size: t = "md",
29
+ state: o,
30
+ tooltip: w,
31
+ triggerProps: y,
34
32
  value: c,
35
- warningText: P,
36
- ...T
37
- } = d, V = t === "error" || !!a, k = F({
33
+ warningText: B,
34
+ ...P
35
+ } = d, T = o === "error" || !!a, V = k({
38
36
  items: f,
39
37
  groupBy: (i) => i.group || ""
40
38
  });
41
- return /* @__PURE__ */ r(
42
- z,
39
+ return /* @__PURE__ */ e(
40
+ W,
43
41
  {
44
- disabled: t === "disabled",
42
+ disabled: o === "disabled",
45
43
  errorText: a,
46
- helperText: p,
47
- invalid: V,
44
+ helperText: m,
45
+ invalid: T,
48
46
  label: u,
49
47
  optional: C,
50
- readOnly: t === "readOnly",
51
- ref: s,
52
- tooltip: x,
53
- warningText: P,
54
- ...T,
55
- children: /* @__PURE__ */ n(
56
- e.Root,
48
+ readOnly: o === "readOnly",
49
+ ref: h,
50
+ tooltip: w,
51
+ warningText: B,
52
+ ...P,
53
+ children: /* @__PURE__ */ l(
54
+ r.Root,
57
55
  {
58
- collection: k,
59
- size: o,
60
- ...w,
61
- defaultValue: l ? [l] : void 0,
62
- onValueChange: (i) => I?.(i.value[0]),
56
+ collection: V,
57
+ size: t,
58
+ ...x,
59
+ defaultValue: n ? [n] : void 0,
60
+ onValueChange: (i) => v?.(i.value[0]),
63
61
  value: c ? [c] : void 0,
64
62
  children: [
65
- /* @__PURE__ */ r(e.HiddenSelect, {}),
66
- /* @__PURE__ */ n(e.Control, { children: [
67
- /* @__PURE__ */ r(e.Trigger, { ...B, children: /* @__PURE__ */ r(e.ValueText, { placeholder: S || "Select option" }) }),
68
- /* @__PURE__ */ n(e.IndicatorGroup, { children: [
69
- t === "error" && /* @__PURE__ */ r(e.Indicator, { children: o === "lg" ? /* @__PURE__ */ r(W, { color: "icon/negative" }) : /* @__PURE__ */ r(E, { color: "icon/negative", height: "16", width: "16" }) }),
70
- t === "warning" && /* @__PURE__ */ r(e.Indicator, { children: o === "lg" ? /* @__PURE__ */ r(Y, {}) : /* @__PURE__ */ r(L, { height: "16", width: "16" }) }),
71
- /* @__PURE__ */ r(e.Indicator, { children: /* @__PURE__ */ r(e.Context, { children: (i) => {
72
- const y = i.open;
73
- return /* @__PURE__ */ r(b, { transform: y ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease", children: o === "lg" ? /* @__PURE__ */ r(R, {}) : /* @__PURE__ */ r(D, {}) });
74
- } }) })
63
+ /* @__PURE__ */ e(r.HiddenSelect, {}),
64
+ /* @__PURE__ */ l(r.Control, { children: [
65
+ /* @__PURE__ */ e(r.Trigger, { ...y, children: /* @__PURE__ */ e(
66
+ r.ValueText,
67
+ {
68
+ placeholder: I || o === "readOnly" ? "(not selected)" : "Select an option"
69
+ }
70
+ ) }),
71
+ /* @__PURE__ */ l(r.IndicatorGroup, { children: [
72
+ o === "error" && /* @__PURE__ */ e(r.Indicator, { children: t === "lg" ? /* @__PURE__ */ e(E, { color: "icon/negative" }) : /* @__PURE__ */ e(F, { color: "icon/negative", height: "16", width: "16" }) }),
73
+ o === "warning" && /* @__PURE__ */ e(r.Indicator, { children: t === "lg" ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(j, { height: "16", width: "16" }) }),
74
+ /* @__PURE__ */ e(r.Indicator, { children: /* @__PURE__ */ e(r.Context, { children: (i) => /* @__PURE__ */ e(R, { isOpen: i.open }) }) })
75
75
  ] })
76
76
  ] }),
77
- /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(e.Positioner, { children: /* @__PURE__ */ r(
78
- G,
77
+ /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(r.Positioner, { children: /* @__PURE__ */ e(
78
+ Y,
79
79
  {
80
- contentProps: h,
80
+ contentProps: s,
81
81
  isLoading: g,
82
- ...m ? { hasSearch: !0, onSearchChange: v } : { hasSearch: !1 },
83
- size: o
82
+ ...p ? { hasSearch: !0, onSearchChange: S } : { hasSearch: !1 },
83
+ size: t
84
84
  }
85
85
  ) }) })
86
86
  ]
@@ -89,7 +89,7 @@ const H = j((d, s) => {
89
89
  }
90
90
  );
91
91
  });
92
- H.displayName = "BitkitSelect";
92
+ z.displayName = "BitkitSelect";
93
93
  export {
94
- H as default
94
+ z as default
95
95
  };
@@ -1,57 +1,44 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { Box as l } from "@chakra-ui/react/box";
2
+ import { Box as a } from "@chakra-ui/react/box";
3
3
  import { Input as g } from "@chakra-ui/react/input";
4
- import { InputGroup as S } from "@chakra-ui/react/input-group";
5
- import { useSelectContext as x, Select as n } from "@chakra-ui/react/select";
4
+ import { InputGroup as x } from "@chakra-ui/react/input-group";
5
+ import { useSelectContext as S, Select as i } from "@chakra-ui/react/select";
6
6
  import { Separator as y } from "@chakra-ui/react/separator";
7
+ import { Spinner as C } from "@chakra-ui/react/spinner";
7
8
  import { useSlotRecipe as k } from "@chakra-ui/react/styled-system";
8
9
  import { Text as s } from "@chakra-ui/react/text";
9
- import { forwardRef as C } from "react";
10
- import G from "../../icons/24x24/IconMagnifier24.js";
11
- import b from "../../icons/16x16/IconMagnifier16.js";
12
- import L from "../../icons/24x24/IconSpinnerPurple24.js";
13
- import M from "../../icons/16x16/IconSpinnerPurple16.js";
14
- import j from "../../icons/24x24/IconCheck24.js";
15
- import v from "../../icons/16x16/IconCheck16.js";
16
- const B = C((m, a) => {
17
- const { contentProps: p = {}, hasSearch: f = !1, isLoading: d = !1, onSearchChange: h, size: i } = m, { collection: u } = x(), r = k({ key: "select" })({ size: i });
18
- return /* @__PURE__ */ o(n.Content, { css: r.content, ref: a, ...p, children: [
10
+ import { forwardRef as G } from "react";
11
+ import b from "../../icons/24x24/IconMagnifier24.js";
12
+ import v from "../../icons/16x16/IconMagnifier16.js";
13
+ import L from "../../icons/24x24/IconCheck24.js";
14
+ import M from "../../icons/16x16/IconCheck16.js";
15
+ const j = G((m, l) => {
16
+ const { contentProps: p = {}, hasSearch: f = !1, isLoading: d = !1, onSearchChange: h, size: c } = m, { collection: u } = S(), r = k({ key: "select" })({ size: c });
17
+ return /* @__PURE__ */ o(i.Content, { css: r.content, ref: l, ...p, children: [
19
18
  f && /* @__PURE__ */ e(
20
- S,
19
+ x,
21
20
  {
22
- startElement: i === "lg" ? /* @__PURE__ */ e(G, { color: "icon/tertiary" }) : /* @__PURE__ */ e(b, { color: "icon/tertiary" }),
21
+ startElement: c === "lg" ? /* @__PURE__ */ e(b, { color: "icon/tertiary" }) : /* @__PURE__ */ e(v, { color: "icon/tertiary" }),
23
22
  css: r.searchInputGroup,
24
23
  children: /* @__PURE__ */ e(g, { placeholder: "Search...", css: r.searchInput, onChange: (t) => h?.(t.target.value) })
25
24
  }
26
25
  ),
27
- /* @__PURE__ */ e(l, { overflowY: "auto", children: d ? /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", gap: "12", justifyContent: "left", css: r.item, children: [
28
- /* @__PURE__ */ e(
29
- l,
30
- {
31
- style: {
32
- animation: "spin 1s linear infinite",
33
- "@keyframes spin": {
34
- "0%": { transform: "rotate(0deg)" },
35
- "100%": { transform: "rotate(360deg)" }
36
- }
37
- },
38
- children: i === "lg" ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(M, {})
39
- }
40
- ),
26
+ /* @__PURE__ */ e(a, { overflowY: "auto", children: d ? /* @__PURE__ */ o(a, { display: "flex", alignItems: "center", gap: "12", justifyContent: "left", css: r.item, children: [
27
+ /* @__PURE__ */ e(C, { variant: "purple" }),
41
28
  /* @__PURE__ */ e(s, { color: "text/secondary", textStyle: "body/md/regular", children: "Loading..." })
42
- ] }) : u.group().map(([t, I]) => /* @__PURE__ */ o(n.ItemGroup, { children: [
43
- t && /* @__PURE__ */ o(n.ItemGroupLabel, { css: r.itemGroupLabel, children: [
29
+ ] }) : u.group().map(([t, I]) => /* @__PURE__ */ o(i.ItemGroup, { children: [
30
+ t && /* @__PURE__ */ o(i.ItemGroupLabel, { css: r.itemGroupLabel, children: [
44
31
  /* @__PURE__ */ e(s, { color: "text/tertiary", flexShrink: "0", textStyle: "heading/h6", children: t }),
45
32
  /* @__PURE__ */ e(y, { flex: "1" })
46
33
  ] }),
47
- I.map((c) => /* @__PURE__ */ o(n.Item, { css: r.item, item: c, ref: a, children: [
48
- c.label,
49
- /* @__PURE__ */ e(n.ItemIndicator, { children: i === "lg" ? /* @__PURE__ */ e(j, { css: r.itemIndicator }) : /* @__PURE__ */ e(v, { css: r.itemIndicator }) })
50
- ] }, c.value))
34
+ I.map((n) => /* @__PURE__ */ o(i.Item, { css: r.item, item: n, ref: l, children: [
35
+ n.label,
36
+ /* @__PURE__ */ e(i.ItemIndicator, { children: c === "lg" ? /* @__PURE__ */ e(L, { css: r.itemIndicator }) : /* @__PURE__ */ e(M, { css: r.itemIndicator }) })
37
+ ] }, n.value))
51
38
  ] }, t)) })
52
39
  ] });
53
40
  });
54
- B.displayName = "BitkitSelectMenu";
41
+ j.displayName = "BitkitSelectMenu";
55
42
  export {
56
- B as default
43
+ j as default
57
44
  };
@@ -15,7 +15,7 @@ const l = o({
15
15
  gap: e(8),
16
16
  justifyContent: "space-between",
17
17
  px: e(16),
18
- py: e(8),
18
+ py: e(11),
19
19
  borderRadius: e(4),
20
20
  userSelect: "none",
21
21
  textAlign: "start",
@@ -38,7 +38,7 @@ const l = o({
38
38
  indicatorGroup: {
39
39
  display: "flex",
40
40
  alignItems: "center",
41
- gap: "1",
41
+ gap: e(8),
42
42
  pos: "absolute",
43
43
  insetEnd: "0",
44
44
  top: "0",
@@ -87,6 +87,7 @@ const l = o({
87
87
  py: e(12),
88
88
  textAlign: "start",
89
89
  textStyle: "body/lg/regular",
90
+ lineHeight: e(24),
90
91
  _highlighted: {
91
92
  bg: "neutral.95"
92
93
  },
@@ -128,10 +129,6 @@ const l = o({
128
129
  borderColor: "border/minimal",
129
130
  appearance: "none",
130
131
  paddingLeft: e(16)
131
- },
132
- valueText: {
133
- height: e(32),
134
- lineHeight: e(32)
135
132
  }
136
133
  },
137
134
  variants: {
@@ -160,7 +157,7 @@ const l = o({
160
157
  },
161
158
  trigger: {
162
159
  textStyle: "body/md/regular",
163
- py: e(4)
160
+ py: e(9)
164
161
  }
165
162
  },
166
163
  lg: {}
@@ -0,0 +1,5 @@
1
+ export type AssetSelectChevronProps = {
2
+ isOpen: boolean;
3
+ };
4
+ declare const AssetSelectChevron: ({ isOpen }: AssetSelectChevronProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default AssetSelectChevron;
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Box as e } from "@chakra-ui/react/box";
3
+ import o from "../icons/24x24/IconSelectChevron24.js";
4
+ const m = ({ isOpen: t }) => /* @__PURE__ */ r(e, { transform: t ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease", children: /* @__PURE__ */ r(o, {}) });
5
+ export {
6
+ m as default
7
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.108",
4
+ "version": "0.3.109",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",