@bitrise/bitkit-v2 0.3.129 → 0.3.130

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.
@@ -2,13 +2,13 @@ import { BadgeProps } from '@chakra-ui/react/badge';
2
2
  import { ReactNode } from 'react';
3
3
  import { COLOR_PALETTES } from '../../theme/tokens/colors';
4
4
  export type BitkitBadgeProps = {
5
- colorPalette?: keyof typeof COLOR_PALETTES;
6
5
  children?: string;
6
+ colorPalette?: keyof typeof COLOR_PALETTES | 'ai';
7
7
  icon?: ReactNode;
8
8
  } & Omit<BadgeProps, 'children'>;
9
9
  declare const BitkitBadge: import('react').ForwardRefExoticComponent<{
10
- colorPalette?: keyof typeof COLOR_PALETTES;
11
10
  children?: string;
11
+ colorPalette?: keyof typeof COLOR_PALETTES | "ai";
12
12
  icon?: ReactNode;
13
13
  } & Omit<BadgeProps, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
14
14
  export default BitkitBadge;
@@ -1,23 +1,15 @@
1
- import { jsxs as n } from "react/jsx-runtime";
2
- import { Badge as a } from "@chakra-ui/react/badge";
3
- import { forwardRef as o } from "react";
4
- const m = o((t, d) => {
5
- const { children: i, icon: r, ...e } = t;
6
- return /* @__PURE__ */ n(
7
- a,
8
- {
9
- ref: d,
10
- ...e,
11
- paddingInlineStart: i && !r ? "8" : "4",
12
- paddingInlineEnd: i ? "8" : "4",
13
- children: [
14
- r,
15
- i
16
- ]
17
- }
18
- );
1
+ import { jsxs as o } from "react/jsx-runtime";
2
+ import { Badge as l } from "@chakra-ui/react/badge";
3
+ import { forwardRef as f } from "react";
4
+ const x = f((s, d) => {
5
+ const { children: t, icon: r, size: i = "xs", ...a } = s;
6
+ let e, n;
7
+ return t && t.length > 1 && (e = i === "xs" ? "8" : "6", n = i === "xs" ? "8" : "6", r && (e = i === "xs" ? "4" : "2")), t && t.length === 1 && (e = i === "xs" ? "4" : "2", n = i === "xs" ? "4" : "2"), /* @__PURE__ */ o(l, { ref: d, ...a, size: i, paddingInlineStart: e, paddingInlineEnd: n, children: [
8
+ r,
9
+ t
10
+ ] });
19
11
  });
20
- m.displayName = "BitkitBadge";
12
+ x.displayName = "BitkitBadge";
21
13
  export {
22
- m as default
14
+ x as default
23
15
  };
@@ -1,9 +1,11 @@
1
1
  declare const badgeRecipe: import('@chakra-ui/react').RecipeDefinition<{
2
2
  size: {
3
3
  xxs: {
4
+ minWidth: "20";
4
5
  paddingBlock: "2";
5
6
  };
6
7
  xs: {
8
+ minWidth: "24";
7
9
  paddingBlock: "4";
8
10
  };
9
11
  };
@@ -1,5 +1,5 @@
1
- import { defineRecipe as e } from "@chakra-ui/react/styled-system";
2
- const t = e({
1
+ import { defineRecipe as t } from "@chakra-ui/react/styled-system";
2
+ const e = t({
3
3
  className: "badge",
4
4
  base: {
5
5
  colorPalette: "neutral",
@@ -7,18 +7,22 @@ const t = e({
7
7
  alignItems: "center",
8
8
  justifyContent: "center",
9
9
  gap: "4",
10
- paddingInline: "4",
11
10
  borderRadius: "4",
12
11
  textStyle: "comp/badge/sm",
13
12
  color: "colorPalette.strong",
14
- background: "colorPalette.subtle"
13
+ background: "colorPalette.subtle",
14
+ width: "fit-content",
15
+ height: "fit-content",
16
+ verticalAlign: "bottom"
15
17
  },
16
18
  variants: {
17
19
  size: {
18
20
  xxs: {
21
+ minWidth: "20",
19
22
  paddingBlock: "2"
20
23
  },
21
24
  xs: {
25
+ minWidth: "24",
22
26
  paddingBlock: "4"
23
27
  }
24
28
  },
@@ -34,6 +38,22 @@ const t = e({
34
38
  }
35
39
  },
36
40
  compoundVariants: [
41
+ {
42
+ colorPalette: "ai",
43
+ variant: "subtle",
44
+ css: {
45
+ background: "sys/ai-gradient/subtle",
46
+ color: "status/ai/text"
47
+ }
48
+ },
49
+ {
50
+ colorPalette: "ai",
51
+ variant: "bold",
52
+ css: {
53
+ background: "sys/ai-gradient/bold",
54
+ color: "text/on-color"
55
+ }
56
+ },
37
57
  {
38
58
  colorPalette: "yellow",
39
59
  variant: "bold",
@@ -49,5 +69,5 @@ const t = e({
49
69
  }
50
70
  });
51
71
  export {
52
- t as default
72
+ e as default
53
73
  };
@@ -2,9 +2,11 @@ declare const recipes: {
2
2
  badge: import('@chakra-ui/react').RecipeDefinition<{
3
3
  size: {
4
4
  xxs: {
5
+ minWidth: "20";
5
6
  paddingBlock: "2";
6
7
  };
7
8
  xs: {
9
+ minWidth: "24";
8
10
  paddingBlock: "4";
9
11
  };
10
12
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.129",
4
+ "version": "0.3.130",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",