@bitrise/bitkit-v2 0.3.338 → 0.3.339

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,4 +1,4 @@
1
- import { CheckboxGroupProps } from '@chakra-ui/react/checkbox';
1
+ import { Checkbox, CheckboxGroupProps } from '@chakra-ui/react/checkbox';
2
2
  import { Fieldset } from '@chakra-ui/react/fieldset';
3
3
  import { ReactNode } from 'react';
4
4
  export interface BitkitCheckboxGroupProps extends Fieldset.RootProps {
@@ -13,6 +13,7 @@ export interface BitkitCheckboxGroupProps extends Fieldset.RootProps {
13
13
  helperText?: ReactNode;
14
14
  name?: CheckboxGroupProps['name'];
15
15
  onValueChange: CheckboxGroupProps['onValueChange'];
16
+ size?: Checkbox.RootProps['size'];
16
17
  value: CheckboxGroupProps['value'];
17
18
  }
18
19
  declare const BitkitCheckboxGroup: import('react').ForwardRefExoticComponent<BitkitCheckboxGroupProps & import('react').RefAttributes<HTMLFieldSetElement>>;
@@ -1,10 +1,10 @@
1
1
  import { forwardRef } from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { CheckboxGroup } from "@chakra-ui/react/checkbox";
3
+ import { Checkbox, 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, groupLabel, name, onValueChange, value, ...rest } = props;
7
+ const { checkboxGroupProps, children, errorText, helperText, groupLabel, name, onValueChange, size, value, ...rest } = props;
8
8
  const hasHeader = !!groupLabel || !!helperText;
9
9
  return /* @__PURE__ */ jsxs(Fieldset.Root, {
10
10
  ref,
@@ -24,7 +24,10 @@ var BitkitCheckboxGroup = forwardRef((props, ref) => {
24
24
  onValueChange,
25
25
  value,
26
26
  ...checkboxGroupProps,
27
- children
27
+ children: /* @__PURE__ */ jsx(Checkbox.PropsProvider, {
28
+ value: { size },
29
+ children
30
+ })
28
31
  })
29
32
  }),
30
33
  !!errorText && /* @__PURE__ */ jsx(Fieldset.ErrorText, { children: errorText })
@@ -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?: ReactNode;\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?: ReactNode;\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;EAA9D,UAAA;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;IAEA,UAAA,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 { Checkbox, 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?: ReactNode;\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?: ReactNode;\n name?: CheckboxGroupProps['name'];\n onValueChange: CheckboxGroupProps['onValueChange'];\n size?: Checkbox.RootProps['size'];\n value: CheckboxGroupProps['value'];\n}\n\nconst BitkitCheckboxGroup = forwardRef<HTMLFieldSetElement, BitkitCheckboxGroupProps>((props, ref) => {\n const { checkboxGroupProps, children, errorText, helperText, groupLabel, name, onValueChange, size, 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 <Checkbox.PropsProvider value={{ size }}>{children}</Checkbox.PropsProvider>\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":";;;;;AAoBA,IAAM,sBAAsB,YAA2D,OAAO,QAAQ;CACpG,MAAM,EAAE,oBAAoB,UAAU,WAAW,YAAY,YAAY,MAAM,eAAe,MAAM,OAAO,GAAG,SAC5G;CACF,MAAM,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC;CACpC,OACE,qBAAC,SAAS,MAAV;EAAoB;EAAK,GAAI;EAAM,SAAS,KAAK,WAAW,CAAC,CAAC;EAA9D,UAAA;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;IAEA,UAAA,oBAAC,eAAD;KAAqB;KAAqB;KAAsB;KAAO,GAAI;KACzE,UAAA,oBAAC,SAAS,eAAV;MAAwB,OAAO,EAAE,KAAK;MAAI;KAAiC,CAAA;IAC9D,CAAA;GACC,CAAA;GACjB,CAAC,CAAC,aAAa,oBAAC,SAAS,WAAV,EAAA,UAAqB,UAA8B,CAAA;EACtD;;AAEnB,CAAC;AAED,oBAAoB,cAAc"}
@@ -17,6 +17,7 @@ var checkboxSlotRecipe = defineSlotRecipe({
17
17
  backgroundColor: "background/primary",
18
18
  border: "1px solid",
19
19
  borderColor: "border/regular",
20
+ boxShadow: "inset/field",
20
21
  focusVisibleRing: "outside",
21
22
  "& > svg": {
22
23
  position: "absolute",
@@ -26,6 +27,7 @@ var checkboxSlotRecipe = defineSlotRecipe({
26
27
  _checked: {
27
28
  backgroundColor: "input/checkbox/selection",
28
29
  borderColor: "input/checkbox/selection !important",
30
+ boxShadow: "none",
29
31
  "& > svg": {
30
32
  top: 0,
31
33
  color: "icon/on-color",
@@ -41,6 +43,7 @@ var checkboxSlotRecipe = defineSlotRecipe({
41
43
  _indeterminate: {
42
44
  backgroundColor: "input/checkbox/selection",
43
45
  borderColor: "input/checkbox/selection !important",
46
+ boxShadow: "none",
44
47
  "& > svg": {
45
48
  top: "-1px",
46
49
  color: "icon/on-color",
@@ -55,18 +58,19 @@ var checkboxSlotRecipe = defineSlotRecipe({
55
58
  _disabled: {
56
59
  backgroundColor: "background/disabled",
57
60
  borderColor: "border/disabled",
61
+ boxShadow: "none",
58
62
  cursor: "not-allowed"
59
63
  },
60
64
  _readOnly: {
61
65
  backgroundColor: "background/disabled",
62
- borderColor: "border/regular !important"
66
+ borderColor: "border/regular !important",
67
+ boxShadow: "none"
63
68
  }
64
69
  },
65
70
  label: {
66
71
  userSelect: "none",
67
72
  color: "input/text/inputValue",
68
- _disabled: { color: "text/disabled" },
69
- _readOnly: { color: "text/disabled" }
73
+ _disabled: { color: "text/disabled" }
70
74
  }
71
75
  },
72
76
  variants: { size: {
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Checkbox.recipe.ts"],"sourcesContent":["import { checkboxAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst checkboxSlotRecipe = defineSlotRecipe({\n className: 'checkbox',\n slots: checkboxAnatomy.keys(),\n base: {\n root: {\n display: 'inline-flex',\n alignItems: 'flex-start',\n gap: '8',\n width: 'fit-content',\n },\n control: {\n position: 'relative',\n borderRadius: '4',\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/regular',\n focusVisibleRing: 'outside',\n '& > svg': {\n position: 'absolute',\n left: '-1px',\n visibility: 'hidden',\n },\n _checked: {\n backgroundColor: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection !important',\n '& > svg': {\n top: 0,\n color: 'icon/on-color',\n visibility: 'visible',\n },\n _disabled: {\n backgroundColor: 'input/checkbox/selection-disabled',\n borderColor: 'input/checkbox/selection-disabled !important',\n },\n _readOnly: {\n '& > svg': {\n color: 'icon/on-disabled',\n },\n },\n },\n _hover: {\n borderColor: 'border/hover',\n },\n _indeterminate: {\n backgroundColor: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection !important',\n '& > svg': {\n top: '-1px',\n color: 'icon/on-color',\n visibility: 'visible',\n },\n _disabled: {\n backgroundColor: 'input/checkbox/selection-disabled',\n borderColor: 'input/checkbox/selection-disabled !important',\n },\n _readOnly: {\n '& > svg': {\n color: 'icon/on-disabled',\n },\n },\n },\n _disabled: {\n backgroundColor: 'background/disabled',\n borderColor: 'border/disabled',\n cursor: 'not-allowed',\n },\n _readOnly: {\n backgroundColor: 'background/disabled',\n borderColor: 'border/regular !important',\n },\n },\n label: {\n userSelect: 'none',\n color: 'input/text/inputValue',\n _disabled: {\n color: 'text/disabled',\n },\n _readOnly: {\n color: 'text/disabled',\n },\n },\n },\n variants: {\n size: {\n md: {\n control: {\n width: '20',\n height: '20',\n '& > svg': {\n width: '20',\n height: '20',\n },\n },\n label: {\n textStyle: 'body/md/regular',\n },\n },\n lg: {\n control: {\n width: '24',\n height: '24',\n '& > svg': {\n width: '24',\n height: '24',\n },\n },\n label: {\n textStyle: 'body/lg/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default checkboxSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,gBAAgB,KAAK;CAC5B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,KAAK;GACL,OAAO;EACT;EACA,SAAS;GACP,UAAU;GACV,cAAc;GACd,iBAAiB;GACjB,QAAQ;GACR,aAAa;GACb,kBAAkB;GAClB,WAAW;IACT,UAAU;IACV,MAAM;IACN,YAAY;GACd;GACA,UAAU;IACR,iBAAiB;IACjB,aAAa;IACb,WAAW;KACT,KAAK;KACL,OAAO;KACP,YAAY;IACd;IACA,WAAW;KACT,iBAAiB;KACjB,aAAa;IACf;IACA,WAAW,EACT,WAAW,EACT,OAAO,mBACT,EACF;GACF;GACA,QAAQ,EACN,aAAa,eACf;GACA,gBAAgB;IACd,iBAAiB;IACjB,aAAa;IACb,WAAW;KACT,KAAK;KACL,OAAO;KACP,YAAY;IACd;IACA,WAAW;KACT,iBAAiB;KACjB,aAAa;IACf;IACA,WAAW,EACT,WAAW,EACT,OAAO,mBACT,EACF;GACF;GACA,WAAW;IACT,iBAAiB;IACjB,aAAa;IACb,QAAQ;GACV;GACA,WAAW;IACT,iBAAiB;IACjB,aAAa;GACf;EACF;EACA,OAAO;GACL,YAAY;GACZ,OAAO;GACP,WAAW,EACT,OAAO,gBACT;GACA,WAAW,EACT,OAAO,gBACT;EACF;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,SAAS;IACP,OAAO;IACP,QAAQ;IACR,WAAW;KACT,OAAO;KACP,QAAQ;IACV;GACF;GACA,OAAO,EACL,WAAW,kBACb;EACF;EACA,IAAI;GACF,SAAS;IACP,OAAO;IACP,QAAQ;IACR,WAAW;KACT,OAAO;KACP,QAAQ;IACV;GACF;GACA,OAAO,EACL,WAAW,kBACb;EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"Checkbox.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Checkbox.recipe.ts"],"sourcesContent":["import { checkboxAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst checkboxSlotRecipe = defineSlotRecipe({\n className: 'checkbox',\n slots: checkboxAnatomy.keys(),\n base: {\n root: {\n display: 'inline-flex',\n alignItems: 'flex-start',\n gap: '8',\n width: 'fit-content',\n },\n control: {\n position: 'relative',\n borderRadius: '4',\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/regular',\n boxShadow: 'inset/field',\n focusVisibleRing: 'outside',\n '& > svg': {\n position: 'absolute',\n left: '-1px',\n visibility: 'hidden',\n },\n _checked: {\n backgroundColor: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection !important',\n boxShadow: 'none',\n '& > svg': {\n top: 0,\n color: 'icon/on-color',\n visibility: 'visible',\n },\n _disabled: {\n backgroundColor: 'input/checkbox/selection-disabled',\n borderColor: 'input/checkbox/selection-disabled !important',\n },\n _readOnly: {\n '& > svg': {\n color: 'icon/on-disabled',\n },\n },\n },\n _hover: {\n borderColor: 'border/hover',\n },\n _indeterminate: {\n backgroundColor: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection !important',\n boxShadow: 'none',\n '& > svg': {\n top: '-1px',\n color: 'icon/on-color',\n visibility: 'visible',\n },\n _disabled: {\n backgroundColor: 'input/checkbox/selection-disabled',\n borderColor: 'input/checkbox/selection-disabled !important',\n },\n _readOnly: {\n '& > svg': {\n color: 'icon/on-disabled',\n },\n },\n },\n _disabled: {\n backgroundColor: 'background/disabled',\n borderColor: 'border/disabled',\n boxShadow: 'none',\n cursor: 'not-allowed',\n },\n _readOnly: {\n backgroundColor: 'background/disabled',\n borderColor: 'border/regular !important',\n boxShadow: 'none',\n },\n },\n label: {\n userSelect: 'none',\n color: 'input/text/inputValue',\n _disabled: {\n color: 'text/disabled',\n },\n },\n },\n variants: {\n size: {\n md: {\n control: {\n width: '20',\n height: '20',\n '& > svg': {\n width: '20',\n height: '20',\n },\n },\n label: {\n textStyle: 'body/md/regular',\n },\n },\n lg: {\n control: {\n width: '24',\n height: '24',\n '& > svg': {\n width: '24',\n height: '24',\n },\n },\n label: {\n textStyle: 'body/lg/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default checkboxSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,gBAAgB,KAAK;CAC5B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,KAAK;GACL,OAAO;EACT;EACA,SAAS;GACP,UAAU;GACV,cAAc;GACd,iBAAiB;GACjB,QAAQ;GACR,aAAa;GACb,WAAW;GACX,kBAAkB;GAClB,WAAW;IACT,UAAU;IACV,MAAM;IACN,YAAY;GACd;GACA,UAAU;IACR,iBAAiB;IACjB,aAAa;IACb,WAAW;IACX,WAAW;KACT,KAAK;KACL,OAAO;KACP,YAAY;IACd;IACA,WAAW;KACT,iBAAiB;KACjB,aAAa;IACf;IACA,WAAW,EACT,WAAW,EACT,OAAO,mBACT,EACF;GACF;GACA,QAAQ,EACN,aAAa,eACf;GACA,gBAAgB;IACd,iBAAiB;IACjB,aAAa;IACb,WAAW;IACX,WAAW;KACT,KAAK;KACL,OAAO;KACP,YAAY;IACd;IACA,WAAW;KACT,iBAAiB;KACjB,aAAa;IACf;IACA,WAAW,EACT,WAAW,EACT,OAAO,mBACT,EACF;GACF;GACA,WAAW;IACT,iBAAiB;IACjB,aAAa;IACb,WAAW;IACX,QAAQ;GACV;GACA,WAAW;IACT,iBAAiB;IACjB,aAAa;IACb,WAAW;GACb;EACF;EACA,OAAO;GACL,YAAY;GACZ,OAAO;GACP,WAAW,EACT,OAAO,gBACT;EACF;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,SAAS;IACP,OAAO;IACP,QAAQ;IACR,WAAW;KACT,OAAO;KACP,QAAQ;IACV;GACF;GACA,OAAO,EACL,WAAW,kBACb;EACF;EACA,IAAI;GACF,SAAS;IACP,OAAO;IACP,QAAQ;IACR,WAAW;KACT,OAAO;KACP,QAAQ;IACV;GACF;GACA,OAAO,EACL,WAAW,kBACb;EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,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.338",
4
+ "version": "0.3.339",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",