@bitrise/bitkit-v2 0.3.489 → 0.3.490

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.
@@ -6,5 +6,5 @@ export interface BitkitTagProps extends TagRootProps {
6
6
  onRemove?: () => void;
7
7
  state?: 'disabled' | 'skeleton';
8
8
  }
9
- declare const BitkitTag: (props: BitkitTagProps) => import('react').JSX.Element;
9
+ declare const BitkitTag: import('react').ForwardRefExoticComponent<BitkitTagProps & import('react').RefAttributes<HTMLSpanElement>>;
10
10
  export default BitkitTag;
@@ -1,13 +1,15 @@
1
1
  import BitkitCloseButton from "../BitkitCloseButton/BitkitCloseButton.js";
2
+ import { forwardRef } from "react";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { Skeleton } from "@chakra-ui/react/skeleton";
4
5
  import { Tag } from "@chakra-ui/react/tag";
5
6
  //#region lib/components/BitkitTag/BitkitTag.tsx
6
- var BitkitTag = (props) => {
7
+ var BitkitTag = forwardRef((props, ref) => {
7
8
  const { labelText, icon: Icon, onRemove, state, ...rest } = props;
8
9
  const isSkeleton = state === "skeleton";
9
10
  const isDisabled = !!rest.disabled || state === "disabled";
10
11
  return /* @__PURE__ */ jsxs(Tag.Root, {
12
+ ref,
11
13
  ...rest,
12
14
  disabled: isDisabled,
13
15
  children: [
@@ -35,7 +37,8 @@ var BitkitTag = (props) => {
35
37
  })
36
38
  ]
37
39
  });
38
- };
40
+ });
41
+ BitkitTag.displayName = "BitkitTag";
39
42
  //#endregion
40
43
  export { BitkitTag as default };
41
44
 
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitTag.js","names":[],"sources":["../../../lib/components/BitkitTag/BitkitTag.tsx"],"sourcesContent":["import { Skeleton } from '@chakra-ui/react/skeleton';\nimport { Tag, type TagRootProps } from '@chakra-ui/react/tag';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\n\nexport interface BitkitTagProps extends TagRootProps {\n icon?: BitkitIconComponent;\n labelText: string;\n onRemove?: () => void;\n state?: 'disabled' | 'skeleton';\n}\n\nconst BitkitTag = (props: BitkitTagProps) => {\n const { labelText, icon: Icon, onRemove, state, ...rest } = props;\n const isSkeleton = state === 'skeleton';\n const isDisabled = !!rest.disabled || state === 'disabled';\n return (\n <Tag.Root {...rest} disabled={isDisabled}>\n {!!Icon && (\n <Tag.StartElement asChild>\n <Icon size=\"16\" />\n </Tag.StartElement>\n )}\n {/* minWidth=\"0\" lets this flex child shrink past its text so the label's ellipsis can kick in. */}\n <Skeleton\n loading={isSkeleton}\n height={isSkeleton ? '8' : undefined}\n overflow=\"hidden\"\n borderRadius=\"0\"\n minWidth=\"0\"\n >\n <Tag.Label>{labelText}</Tag.Label>\n </Skeleton>\n {!!onRemove && (\n <Tag.EndElement asChild>\n <BitkitCloseButton\n disabled={isDisabled || isSkeleton}\n size=\"xs\"\n aria-label=\"Remove\"\n colorVariant={rest.colorVariant}\n onClick={onRemove}\n />\n </Tag.EndElement>\n )}\n </Tag.Root>\n );\n};\n\nexport default BitkitTag;\n"],"mappings":";;;;;AAaA,IAAM,aAAa,UAA0B;CAC3C,MAAM,EAAE,WAAW,MAAM,MAAM,UAAU,OAAO,GAAG,SAAS;CAC5D,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,CAAC,CAAC,KAAK,YAAY,UAAU;CAChD,OACE,qBAAC,IAAI,MAAL;EAAU,GAAI;EAAM,UAAU;EAA9B,UAAA;GACG,CAAC,CAAC,QACD,oBAAC,IAAI,cAAL;IAAkB,SAAA;IAChB,UAAA,oBAAC,MAAD,EAAM,MAAK,KAAM,CAAA;GACD,CAAA;GAGpB,oBAAC,UAAD;IACE,SAAS;IACT,QAAQ,aAAa,MAAM,KAAA;IAC3B,UAAS;IACT,cAAa;IACb,UAAS;IAET,UAAA,oBAAC,IAAI,OAAL,EAAA,UAAY,UAAqB,CAAA;GACzB,CAAA;GACT,CAAC,CAAC,YACD,oBAAC,IAAI,YAAL;IAAgB,SAAA;IACd,UAAA,oBAAC,mBAAD;KACE,UAAU,cAAc;KACxB,MAAK;KACL,cAAW;KACX,cAAc,KAAK;KACnB,SAAS;IACV,CAAA;GACa,CAAA;EAEV;;AAEd"}
1
+ {"version":3,"file":"BitkitTag.js","names":[],"sources":["../../../lib/components/BitkitTag/BitkitTag.tsx"],"sourcesContent":["import { Skeleton } from '@chakra-ui/react/skeleton';\nimport { Tag, type TagRootProps } from '@chakra-ui/react/tag';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\n\nexport interface BitkitTagProps extends TagRootProps {\n icon?: BitkitIconComponent;\n labelText: string;\n onRemove?: () => void;\n state?: 'disabled' | 'skeleton';\n}\n\nconst BitkitTag = forwardRef<HTMLSpanElement, BitkitTagProps>((props, ref) => {\n const { labelText, icon: Icon, onRemove, state, ...rest } = props;\n const isSkeleton = state === 'skeleton';\n const isDisabled = !!rest.disabled || state === 'disabled';\n return (\n <Tag.Root ref={ref} {...rest} disabled={isDisabled}>\n {!!Icon && (\n <Tag.StartElement asChild>\n <Icon size=\"16\" />\n </Tag.StartElement>\n )}\n {/* minWidth=\"0\" lets this flex child shrink past its text so the label's ellipsis can kick in. */}\n <Skeleton\n loading={isSkeleton}\n height={isSkeleton ? '8' : undefined}\n overflow=\"hidden\"\n borderRadius=\"0\"\n minWidth=\"0\"\n >\n <Tag.Label>{labelText}</Tag.Label>\n </Skeleton>\n {!!onRemove && (\n <Tag.EndElement asChild>\n <BitkitCloseButton\n disabled={isDisabled || isSkeleton}\n size=\"xs\"\n aria-label=\"Remove\"\n colorVariant={rest.colorVariant}\n onClick={onRemove}\n />\n </Tag.EndElement>\n )}\n </Tag.Root>\n );\n});\n\nBitkitTag.displayName = 'BitkitTag';\n\nexport default BitkitTag;\n"],"mappings":";;;;;;AAcA,IAAM,YAAY,YAA6C,OAAO,QAAQ;CAC5E,MAAM,EAAE,WAAW,MAAM,MAAM,UAAU,OAAO,GAAG,SAAS;CAC5D,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,CAAC,CAAC,KAAK,YAAY,UAAU;CAChD,OACE,qBAAC,IAAI,MAAL;EAAe;EAAK,GAAI;EAAM,UAAU;EAAxC,UAAA;GACG,CAAC,CAAC,QACD,oBAAC,IAAI,cAAL;IAAkB,SAAA;IAChB,UAAA,oBAAC,MAAD,EAAM,MAAK,KAAM,CAAA;GACD,CAAA;GAGpB,oBAAC,UAAD;IACE,SAAS;IACT,QAAQ,aAAa,MAAM,KAAA;IAC3B,UAAS;IACT,cAAa;IACb,UAAS;IAET,UAAA,oBAAC,IAAI,OAAL,EAAA,UAAY,UAAqB,CAAA;GACzB,CAAA;GACT,CAAC,CAAC,YACD,oBAAC,IAAI,YAAL;IAAgB,SAAA;IACd,UAAA,oBAAC,mBAAD;KACE,UAAU,cAAc;KACxB,MAAK;KACL,cAAW;KACX,cAAc,KAAK;KACnB,SAAS;IACV,CAAA;GACa,CAAA;EAEV;;AAEd,CAAC;AAED,UAAU,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.489",
4
+ "version": "0.3.490",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",