@bitrise/bitkit-v2 0.3.221 → 0.3.223

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.
package/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ If you're contributing to the library itself, see `CLAUDE.md` instead — this f
6
6
 
7
7
  ## Before you start (instructions for the AI assistant)
8
8
 
9
- **Strongly prefer working with the `bitkit-storybook-mcp` MCP server available.** Bitkit code generated with the MCP is much more accurate (live prop tables, real variants, real tokens, real examples) and faster (one structured query vs. crawling node_modules) than code generated without it.
9
+ **AI assistants: using the `bitkit-storybook-mcp` MCP server is mandatory before generating Bitkit code.** Memory, naming intuition, and TypeScript types are all secondary sources — hallucinated props are the #1 failure mode of AI-generated Bitkit code. Code generated with the MCP is much more accurate (live prop tables, real variants, real tokens, real examples) and faster (one structured query vs. crawling node_modules) than code generated without it.
10
10
 
11
11
  If `bitkit-storybook-mcp` isn't in your tools, **mention it once at the start of your turn** and offer the user the option to add it:
12
12
 
@@ -25,7 +25,7 @@ If `bitkit-storybook-mcp` isn't in your tools, **mention it once at the start of
25
25
  >
26
26
  > Want me to wait, or continue without it?
27
27
 
28
- Then **proceed based on the user's response** (or assume "continue" for trivial tasks). When working without the MCP, be extra cautious: rely on TypeScript types from `@bitrise/bitkit-v2`, follow the rules in this file strictly, and flag any answer where you're guessing rather than reading a typed signature.
28
+ Then **wait for the user's response** do not auto-continue, even for tasks that seem trivial. If the user explicitly opts to continue without the MCP, be extra cautious: rely on TypeScript types from `@bitrise/bitkit-v2`, follow the rules in this file strictly, and flag any answer where you're guessing rather than reading a typed signature.
29
29
 
30
30
  Don't repeat the warning every turn — once is enough per session.
31
31
 
@@ -45,7 +45,7 @@ import { BitkitProvider, BitkitButton } from '@bitrise/bitkit-v2';
45
45
 
46
46
  ## Discovering components
47
47
 
48
- - **Hosted Storybook MCP** (recommended for AI assistants): add to your project's `.mcp.json`:
48
+ - **Hosted Storybook MCP** (required for AI assistants — see "Before you start"): add to your project's `.mcp.json`:
49
49
  ```json
50
50
  {
51
51
  "mcpServers": {
@@ -5,8 +5,12 @@ export interface BitkitCheckboxGroupProps extends Fieldset.RootProps {
5
5
  checkboxGroupProps?: CheckboxGroupProps;
6
6
  children: ReactNode;
7
7
  errorText?: string;
8
+ /**
9
+ * Visible legend rendered above the group. Optional — if you omit it, pass `aria-label` or
10
+ * `aria-labelledby` instead so the fieldset still has an accessible name.
11
+ */
12
+ groupLabel?: string;
8
13
  helperText?: string;
9
- label: string;
10
14
  name?: CheckboxGroupProps['name'];
11
15
  onValueChange: CheckboxGroupProps['onValueChange'];
12
16
  value: CheckboxGroupProps['value'];
@@ -4,19 +4,20 @@ import { CheckboxGroup } from "@chakra-ui/react/checkbox";
4
4
  import { Fieldset } from "@chakra-ui/react/fieldset";
5
5
  //#region lib/components/BitkitCheckboxGroup/BitkitCheckboxGroup.tsx
6
6
  var BitkitCheckboxGroup = forwardRef((props, ref) => {
7
- const { checkboxGroupProps, children, errorText, helperText, label, name, onValueChange, value, ...rest } = props;
7
+ const { checkboxGroupProps, children, errorText, helperText, groupLabel, name, onValueChange, value, ...rest } = props;
8
+ const hasHeader = !!groupLabel || !!helperText;
8
9
  return /* @__PURE__ */ jsxs(Fieldset.Root, {
9
10
  ref,
10
11
  ...rest,
11
12
  invalid: rest.invalid || !!errorText,
12
13
  children: [
13
- /* @__PURE__ */ jsx(Fieldset.Legend, { children: label }),
14
+ groupLabel && /* @__PURE__ */ jsx(Fieldset.Legend, { children: groupLabel }),
14
15
  !!helperText && /* @__PURE__ */ jsx(Fieldset.HelperText, { children: helperText }),
15
16
  /* @__PURE__ */ jsx(Fieldset.Content, {
16
17
  display: "flex",
17
18
  flexDirection: "column",
18
19
  gap: "12",
19
- marginBlockStart: "12",
20
+ marginBlockStart: hasHeader ? "12" : void 0,
20
21
  asChild: true,
21
22
  children: /* @__PURE__ */ jsx(CheckboxGroup, {
22
23
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitCheckboxGroup.js","names":[],"sources":["../../../lib/components/BitkitCheckboxGroup/BitkitCheckboxGroup.tsx"],"sourcesContent":["import { CheckboxGroup, type CheckboxGroupProps } from '@chakra-ui/react/checkbox';\nimport { Fieldset } from '@chakra-ui/react/fieldset';\nimport { forwardRef, type ReactNode } from 'react';\n\nexport interface BitkitCheckboxGroupProps extends Fieldset.RootProps {\n checkboxGroupProps?: CheckboxGroupProps;\n children: ReactNode;\n errorText?: string;\n helperText?: string;\n label: string;\n name?: CheckboxGroupProps['name'];\n onValueChange: CheckboxGroupProps['onValueChange'];\n value: CheckboxGroupProps['value'];\n}\n\nconst BitkitCheckboxGroup = forwardRef<HTMLFieldSetElement, BitkitCheckboxGroupProps>((props, ref) => {\n const { checkboxGroupProps, children, errorText, helperText, label, name, onValueChange, value, ...rest } = props;\n return (\n <Fieldset.Root ref={ref} {...rest} invalid={rest.invalid || !!errorText}>\n <Fieldset.Legend>{label}</Fieldset.Legend>\n {!!helperText && <Fieldset.HelperText>{helperText}</Fieldset.HelperText>}\n <Fieldset.Content display=\"flex\" flexDirection=\"column\" gap=\"12\" marginBlockStart=\"12\" asChild>\n <CheckboxGroup name={name} onValueChange={onValueChange} value={value} {...checkboxGroupProps}>\n {children}\n </CheckboxGroup>\n </Fieldset.Content>\n {!!errorText && <Fieldset.ErrorText>{errorText}</Fieldset.ErrorText>}\n </Fieldset.Root>\n );\n});\n\nBitkitCheckboxGroup.displayName = 'BitkitCheckboxGroup';\n\nexport default BitkitCheckboxGroup;\n"],"mappings":";;;;;AAeA,IAAM,sBAAsB,YAA2D,OAAO,QAAQ;CACpG,MAAM,EAAE,oBAAoB,UAAU,WAAW,YAAY,OAAO,MAAM,eAAe,OAAO,GAAG,SAAS;CAC5G,OACE,qBAAC,SAAS,MAAV;EAAoB;EAAK,GAAI;EAAM,SAAS,KAAK,WAAW,CAAC,CAAC;YAA9D;GACE,oBAAC,SAAS,QAAV,EAAA,UAAkB,MAAuB,CAAA;GACxC,CAAC,CAAC,cAAc,oBAAC,SAAS,YAAV,EAAA,UAAsB,WAAgC,CAAA;GACvE,oBAAC,SAAS,SAAV;IAAkB,SAAQ;IAAO,eAAc;IAAS,KAAI;IAAK,kBAAiB;IAAK,SAAA;cACrF,oBAAC,eAAD;KAAqB;KAAqB;KAAsB;KAAO,GAAI;KACxE;IACY,CAAA;GACC,CAAA;GACjB,CAAC,CAAC,aAAa,oBAAC,SAAS,WAAV,EAAA,UAAqB,UAA8B,CAAA;EACtD;;AAEnB,CAAC;AAED,oBAAoB,cAAc"}
1
+ {"version":3,"file":"BitkitCheckboxGroup.js","names":[],"sources":["../../../lib/components/BitkitCheckboxGroup/BitkitCheckboxGroup.tsx"],"sourcesContent":["import { CheckboxGroup, type CheckboxGroupProps } from '@chakra-ui/react/checkbox';\nimport { Fieldset } from '@chakra-ui/react/fieldset';\nimport { forwardRef, type ReactNode } from 'react';\n\nexport interface BitkitCheckboxGroupProps extends Fieldset.RootProps {\n checkboxGroupProps?: CheckboxGroupProps;\n children: ReactNode;\n errorText?: string;\n /**\n * Visible legend rendered above the group. Optional — if you omit it, pass `aria-label` or\n * `aria-labelledby` instead so the fieldset still has an accessible name.\n */\n groupLabel?: string;\n helperText?: string;\n name?: CheckboxGroupProps['name'];\n onValueChange: CheckboxGroupProps['onValueChange'];\n value: CheckboxGroupProps['value'];\n}\n\nconst BitkitCheckboxGroup = forwardRef<HTMLFieldSetElement, BitkitCheckboxGroupProps>((props, ref) => {\n const { checkboxGroupProps, children, errorText, helperText, groupLabel, name, onValueChange, value, ...rest } =\n props;\n const hasHeader = !!groupLabel || !!helperText;\n return (\n <Fieldset.Root ref={ref} {...rest} invalid={rest.invalid || !!errorText}>\n {groupLabel && <Fieldset.Legend>{groupLabel}</Fieldset.Legend>}\n {!!helperText && <Fieldset.HelperText>{helperText}</Fieldset.HelperText>}\n <Fieldset.Content\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"12\"\n marginBlockStart={hasHeader ? '12' : undefined}\n asChild\n >\n <CheckboxGroup name={name} onValueChange={onValueChange} value={value} {...checkboxGroupProps}>\n {children}\n </CheckboxGroup>\n </Fieldset.Content>\n {!!errorText && <Fieldset.ErrorText>{errorText}</Fieldset.ErrorText>}\n </Fieldset.Root>\n );\n});\n\nBitkitCheckboxGroup.displayName = 'BitkitCheckboxGroup';\n\nexport default BitkitCheckboxGroup;\n"],"mappings":";;;;;AAmBA,IAAM,sBAAsB,YAA2D,OAAO,QAAQ;CACpG,MAAM,EAAE,oBAAoB,UAAU,WAAW,YAAY,YAAY,MAAM,eAAe,OAAO,GAAG,SACtG;CACF,MAAM,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC;CACpC,OACE,qBAAC,SAAS,MAAV;EAAoB;EAAK,GAAI;EAAM,SAAS,KAAK,WAAW,CAAC,CAAC;YAA9D;GACG,cAAc,oBAAC,SAAS,QAAV,EAAA,UAAkB,WAA4B,CAAA;GAC5D,CAAC,CAAC,cAAc,oBAAC,SAAS,YAAV,EAAA,UAAsB,WAAgC,CAAA;GACvE,oBAAC,SAAS,SAAV;IACE,SAAQ;IACR,eAAc;IACd,KAAI;IACJ,kBAAkB,YAAY,OAAO,KAAA;IACrC,SAAA;cAEA,oBAAC,eAAD;KAAqB;KAAqB;KAAsB;KAAO,GAAI;KACxE;IACY,CAAA;GACC,CAAA;GACjB,CAAC,CAAC,aAAa,oBAAC,SAAS,WAAV,EAAA,UAAqB,UAA8B,CAAA;EACtD;;AAEnB,CAAC;AAED,oBAAoB,cAAc"}
@@ -4,8 +4,12 @@ import { ReactNode } from 'react';
4
4
  export interface BitkitRadioGroupProps extends Fieldset.RootProps {
5
5
  children: ReactNode;
6
6
  errorText?: string;
7
+ /**
8
+ * Visible legend rendered above the group. Optional — if you omit it, pass `aria-label` or
9
+ * `aria-labelledby` instead so the fieldset still has an accessible name.
10
+ */
11
+ groupLabel?: string;
7
12
  helperText?: string;
8
- label: string;
9
13
  layout?: RadioGroupRootProps['orientation'];
10
14
  name?: RadioGroupRootProps['name'];
11
15
  onValueChange: RadioGroupRootProps['onValueChange'];
@@ -4,16 +4,17 @@ import { Fieldset } from "@chakra-ui/react/fieldset";
4
4
  import { RadioGroup } from "@chakra-ui/react/radio-group";
5
5
  //#region lib/components/BitkitRadioGroup/BitkitRadioGroup.tsx
6
6
  var BitkitRadioGroup = forwardRef((props, ref) => {
7
- const { children, errorText, helperText, label, layout, name, onValueChange, radioGroupRootProps, size, value, ...rest } = props;
7
+ const { children, errorText, helperText, groupLabel, layout, name, onValueChange, radioGroupRootProps, size, value, ...rest } = props;
8
+ const hasHeader = !!groupLabel || !!helperText;
8
9
  return /* @__PURE__ */ jsxs(Fieldset.Root, {
9
10
  ref,
10
11
  ...rest,
11
12
  invalid: rest.invalid || !!errorText,
12
13
  children: [
13
- /* @__PURE__ */ jsx(Fieldset.Legend, { children: label }),
14
+ groupLabel && /* @__PURE__ */ jsx(Fieldset.Legend, { children: groupLabel }),
14
15
  !!helperText && /* @__PURE__ */ jsx(Fieldset.HelperText, { children: helperText }),
15
16
  /* @__PURE__ */ jsx(Fieldset.Content, {
16
- marginBlockStart: "12",
17
+ marginBlockStart: hasHeader ? "12" : void 0,
17
18
  asChild: true,
18
19
  children: /* @__PURE__ */ jsx(RadioGroup.Root, {
19
20
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitRadioGroup.js","names":[],"sources":["../../../lib/components/BitkitRadioGroup/BitkitRadioGroup.tsx"],"sourcesContent":["import { Fieldset } from '@chakra-ui/react/fieldset';\nimport { RadioGroup, type RadioGroupRootProps } from '@chakra-ui/react/radio-group';\nimport { forwardRef, type ReactNode } from 'react';\n\nexport interface BitkitRadioGroupProps extends Fieldset.RootProps {\n children: ReactNode;\n errorText?: string;\n helperText?: string;\n label: string;\n layout?: RadioGroupRootProps['orientation'];\n name?: RadioGroupRootProps['name'];\n onValueChange: RadioGroupRootProps['onValueChange'];\n radioGroupRootProps?: RadioGroupRootProps;\n size?: RadioGroupRootProps['size'];\n value: RadioGroupRootProps['value'];\n}\n\nconst BitkitRadioGroup = forwardRef<HTMLFieldSetElement, BitkitRadioGroupProps>((props, ref) => {\n const {\n children,\n errorText,\n helperText,\n label,\n layout,\n name,\n onValueChange,\n radioGroupRootProps,\n size,\n value,\n ...rest\n } = props;\n return (\n <Fieldset.Root ref={ref} {...rest} invalid={rest.invalid || !!errorText}>\n <Fieldset.Legend>{label}</Fieldset.Legend>\n {!!helperText && <Fieldset.HelperText>{helperText}</Fieldset.HelperText>}\n <Fieldset.Content marginBlockStart=\"12\" asChild>\n <RadioGroup.Root\n name={name}\n size={size}\n orientation={layout}\n onValueChange={onValueChange}\n value={value}\n {...radioGroupRootProps}\n >\n {children}\n </RadioGroup.Root>\n </Fieldset.Content>\n {!!errorText && <Fieldset.ErrorText>{errorText}</Fieldset.ErrorText>}\n </Fieldset.Root>\n );\n});\n\nBitkitRadioGroup.displayName = 'BitkitRadioGroup';\n\nexport default BitkitRadioGroup;\n"],"mappings":";;;;;AAiBA,IAAM,mBAAmB,YAAwD,OAAO,QAAQ;CAC9F,MAAM,EACJ,UACA,WACA,YACA,OACA,QACA,MACA,eACA,qBACA,MACA,OACA,GAAG,SACD;CACJ,OACE,qBAAC,SAAS,MAAV;EAAoB;EAAK,GAAI;EAAM,SAAS,KAAK,WAAW,CAAC,CAAC;YAA9D;GACE,oBAAC,SAAS,QAAV,EAAA,UAAkB,MAAuB,CAAA;GACxC,CAAC,CAAC,cAAc,oBAAC,SAAS,YAAV,EAAA,UAAsB,WAAgC,CAAA;GACvE,oBAAC,SAAS,SAAV;IAAkB,kBAAiB;IAAK,SAAA;cACtC,oBAAC,WAAW,MAAZ;KACQ;KACA;KACN,aAAa;KACE;KACR;KACP,GAAI;KAEH;IACc,CAAA;GACD,CAAA;GACjB,CAAC,CAAC,aAAa,oBAAC,SAAS,WAAV,EAAA,UAAqB,UAA8B,CAAA;EACtD;;AAEnB,CAAC;AAED,iBAAiB,cAAc"}
1
+ {"version":3,"file":"BitkitRadioGroup.js","names":[],"sources":["../../../lib/components/BitkitRadioGroup/BitkitRadioGroup.tsx"],"sourcesContent":["import { Fieldset } from '@chakra-ui/react/fieldset';\nimport { RadioGroup, type RadioGroupRootProps } from '@chakra-ui/react/radio-group';\nimport { forwardRef, type ReactNode } from 'react';\n\nexport interface BitkitRadioGroupProps extends Fieldset.RootProps {\n children: ReactNode;\n errorText?: string;\n /**\n * Visible legend rendered above the group. Optional — if you omit it, pass `aria-label` or\n * `aria-labelledby` instead so the fieldset still has an accessible name.\n */\n groupLabel?: string;\n helperText?: string;\n layout?: RadioGroupRootProps['orientation'];\n name?: RadioGroupRootProps['name'];\n onValueChange: RadioGroupRootProps['onValueChange'];\n radioGroupRootProps?: RadioGroupRootProps;\n size?: RadioGroupRootProps['size'];\n value: RadioGroupRootProps['value'];\n}\n\nconst BitkitRadioGroup = forwardRef<HTMLFieldSetElement, BitkitRadioGroupProps>((props, ref) => {\n const {\n children,\n errorText,\n helperText,\n groupLabel,\n layout,\n name,\n onValueChange,\n radioGroupRootProps,\n size,\n value,\n ...rest\n } = props;\n const hasHeader = !!groupLabel || !!helperText;\n return (\n <Fieldset.Root ref={ref} {...rest} invalid={rest.invalid || !!errorText}>\n {groupLabel && <Fieldset.Legend>{groupLabel}</Fieldset.Legend>}\n {!!helperText && <Fieldset.HelperText>{helperText}</Fieldset.HelperText>}\n <Fieldset.Content marginBlockStart={hasHeader ? '12' : undefined} asChild>\n <RadioGroup.Root\n name={name}\n size={size}\n orientation={layout}\n onValueChange={onValueChange}\n value={value}\n {...radioGroupRootProps}\n >\n {children}\n </RadioGroup.Root>\n </Fieldset.Content>\n {!!errorText && <Fieldset.ErrorText>{errorText}</Fieldset.ErrorText>}\n </Fieldset.Root>\n );\n});\n\nBitkitRadioGroup.displayName = 'BitkitRadioGroup';\n\nexport default BitkitRadioGroup;\n"],"mappings":";;;;;AAqBA,IAAM,mBAAmB,YAAwD,OAAO,QAAQ;CAC9F,MAAM,EACJ,UACA,WACA,YACA,YACA,QACA,MACA,eACA,qBACA,MACA,OACA,GAAG,SACD;CACJ,MAAM,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC;CACpC,OACE,qBAAC,SAAS,MAAV;EAAoB;EAAK,GAAI;EAAM,SAAS,KAAK,WAAW,CAAC,CAAC;YAA9D;GACG,cAAc,oBAAC,SAAS,QAAV,EAAA,UAAkB,WAA4B,CAAA;GAC5D,CAAC,CAAC,cAAc,oBAAC,SAAS,YAAV,EAAA,UAAsB,WAAgC,CAAA;GACvE,oBAAC,SAAS,SAAV;IAAkB,kBAAkB,YAAY,OAAO,KAAA;IAAW,SAAA;cAChE,oBAAC,WAAW,MAAZ;KACQ;KACA;KACN,aAAa;KACE;KACR;KACP,GAAI;KAEH;IACc,CAAA;GACD,CAAA;GACjB,CAAC,CAAC,aAAa,oBAAC,SAAS,WAAV,EAAA,UAAqB,UAA8B,CAAA;EACtD;;AAEnB,CAAC;AAED,iBAAiB,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.221",
4
+ "version": "0.3.223",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",