@bitrise/bitkit-v2 0.3.213 → 0.3.214

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,15 +1,16 @@
1
1
  import { BoxProps } from '@chakra-ui/react/box';
2
+ import { ReactNode } from 'react';
2
3
  import { NotificationVariant } from '../../theme/common/AlertAndToast.common';
3
4
  import { NotificationAction } from '../common/notificationMaps';
4
5
  export type BitkitNoteCardProps = Omit<BoxProps, 'children' | 'title'> & {
5
6
  action?: NotificationAction;
6
- message: string;
7
+ message: ReactNode;
7
8
  status?: NotificationVariant;
8
9
  title?: string;
9
10
  };
10
11
  declare const BitkitNoteCard: import('react').ForwardRefExoticComponent<Omit<BoxProps, "title" | "children"> & {
11
12
  action?: NotificationAction;
12
- message: string;
13
+ message: ReactNode;
13
14
  status?: NotificationVariant;
14
15
  title?: string;
15
16
  } & import('react').RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitNoteCard.js","names":[],"sources":["../../../lib/components/BitkitNoteCard/BitkitNoteCard.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { type ElementType, forwardRef } from 'react';\n\nimport { type NotificationVariant } from '../../theme/common/AlertAndToast.common';\nimport BitkitButton from '../BitkitButton/BitkitButton';\nimport { ICON_COMPONENTS_MAP, type NotificationAction } from '../common/notificationMaps';\n\n// ----- Props -----\n\nexport type BitkitNoteCardProps = Omit<BoxProps, 'children' | 'title'> & {\n action?: NotificationAction;\n message: string;\n status?: NotificationVariant;\n title?: string;\n};\n\n// ----- Component -----\n\nconst BitkitNoteCard = forwardRef<HTMLDivElement, BitkitNoteCardProps>((props, ref) => {\n const { action, message, status = 'info', title, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'noteCard' });\n const styles = recipe({ status });\n\n const IconComponent: ElementType = ICON_COMPONENTS_MAP[status];\n const isProgress = status === 'progress';\n\n return (\n <Box ref={ref} css={styles.root} {...rest}>\n <Box css={styles.iconBar}>\n <Box css={styles.iconWrapper}>{isProgress ? <IconComponent size=\"lg\" /> : <IconComponent size=\"24\" />}</Box>\n </Box>\n <Box css={styles.content}>\n <Box css={styles.messageBlock}>\n {title && <Text css={styles.title}>{title}</Text>}\n <Text css={title ? styles.message : styles.messageSolo}>{message}</Text>\n </Box>\n {action && (\n <BitkitButton\n css={styles.actionArea}\n size=\"sm\"\n variant=\"tertiary\"\n {...(action.href && {\n as: 'a' as const,\n href: action.href,\n rel: action.target === '_blank' ? 'noopener noreferrer' : undefined,\n target: action.target,\n })}\n onClick={action.onClick}\n >\n {action.label}\n </BitkitButton>\n )}\n </Box>\n </Box>\n );\n});\n\nBitkitNoteCard.displayName = 'BitkitNoteCard';\n\nexport default BitkitNoteCard;\n"],"mappings":";;;;;;;;AAoBA,IAAM,iBAAiB,YAAiD,OAAO,QAAQ;CACrF,MAAM,EAAE,QAAQ,SAAS,SAAS,QAAQ,OAAO,GAAG,SAAS;CAG7D,MAAM,SADS,cAAc,EAAE,KAAK,YAAY,CACjC,CAAO,EAAE,QAAQ,CAAC;CAEjC,MAAM,gBAA6B,oBAAoB;CACvD,MAAM,aAAa,WAAW;AAE9B,QACE,qBAAC,KAAD;EAAU;EAAK,KAAK,OAAO;EAAM,GAAI;YAArC,CACE,oBAAC,KAAD;GAAK,KAAK,OAAO;aACf,oBAAC,KAAD;IAAK,KAAK,OAAO;cAAc,aAAa,oBAAC,eAAD,EAAe,MAAK,MAAO,CAAA,GAAG,oBAAC,eAAD,EAAe,MAAK,MAAO,CAAA;IAAO,CAAA;GACxG,CAAA,EACN,qBAAC,KAAD;GAAK,KAAK,OAAO;aAAjB,CACE,qBAAC,KAAD;IAAK,KAAK,OAAO;cAAjB,CACG,SAAS,oBAAC,MAAD;KAAM,KAAK,OAAO;eAAQ;KAAa,CAAA,EACjD,oBAAC,MAAD;KAAM,KAAK,QAAQ,OAAO,UAAU,OAAO;eAAc;KAAe,CAAA,CACpE;OACL,UACC,oBAAC,cAAD;IACE,KAAK,OAAO;IACZ,MAAK;IACL,SAAQ;IACR,GAAK,OAAO,QAAQ;KAClB,IAAI;KACJ,MAAM,OAAO;KACb,KAAK,OAAO,WAAW,WAAW,wBAAwB,KAAA;KAC1D,QAAQ,OAAO;KAChB;IACD,SAAS,OAAO;cAEf,OAAO;IACK,CAAA,CAEb;KACF;;EAER;AAEF,eAAe,cAAc"}
1
+ {"version":3,"file":"BitkitNoteCard.js","names":[],"sources":["../../../lib/components/BitkitNoteCard/BitkitNoteCard.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { type ElementType, forwardRef, type ReactNode } from 'react';\n\nimport { type NotificationVariant } from '../../theme/common/AlertAndToast.common';\nimport BitkitButton from '../BitkitButton/BitkitButton';\nimport { ICON_COMPONENTS_MAP, type NotificationAction } from '../common/notificationMaps';\n\n// ----- Props -----\n\nexport type BitkitNoteCardProps = Omit<BoxProps, 'children' | 'title'> & {\n action?: NotificationAction;\n message: ReactNode;\n status?: NotificationVariant;\n title?: string;\n};\n\n// ----- Component -----\n\nconst BitkitNoteCard = forwardRef<HTMLDivElement, BitkitNoteCardProps>((props, ref) => {\n const { action, message, status = 'info', title, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'noteCard' });\n const styles = recipe({ status });\n\n const IconComponent: ElementType = ICON_COMPONENTS_MAP[status];\n const isProgress = status === 'progress';\n\n return (\n <Box ref={ref} css={styles.root} {...rest}>\n <Box css={styles.iconBar}>\n <Box css={styles.iconWrapper}>{isProgress ? <IconComponent size=\"lg\" /> : <IconComponent size=\"24\" />}</Box>\n </Box>\n <Box css={styles.content}>\n <Box css={styles.messageBlock}>\n {title && <Text css={styles.title}>{title}</Text>}\n <Text css={title ? styles.message : styles.messageSolo}>{message}</Text>\n </Box>\n {action && (\n <BitkitButton\n css={styles.actionArea}\n size=\"sm\"\n variant=\"tertiary\"\n {...(action.href && {\n as: 'a' as const,\n href: action.href,\n rel: action.target === '_blank' ? 'noopener noreferrer' : undefined,\n target: action.target,\n })}\n onClick={action.onClick}\n >\n {action.label}\n </BitkitButton>\n )}\n </Box>\n </Box>\n );\n});\n\nBitkitNoteCard.displayName = 'BitkitNoteCard';\n\nexport default BitkitNoteCard;\n"],"mappings":";;;;;;;;AAoBA,IAAM,iBAAiB,YAAiD,OAAO,QAAQ;CACrF,MAAM,EAAE,QAAQ,SAAS,SAAS,QAAQ,OAAO,GAAG,SAAS;CAG7D,MAAM,SADS,cAAc,EAAE,KAAK,YAAY,CACjC,CAAO,EAAE,QAAQ,CAAC;CAEjC,MAAM,gBAA6B,oBAAoB;CACvD,MAAM,aAAa,WAAW;AAE9B,QACE,qBAAC,KAAD;EAAU;EAAK,KAAK,OAAO;EAAM,GAAI;YAArC,CACE,oBAAC,KAAD;GAAK,KAAK,OAAO;aACf,oBAAC,KAAD;IAAK,KAAK,OAAO;cAAc,aAAa,oBAAC,eAAD,EAAe,MAAK,MAAO,CAAA,GAAG,oBAAC,eAAD,EAAe,MAAK,MAAO,CAAA;IAAO,CAAA;GACxG,CAAA,EACN,qBAAC,KAAD;GAAK,KAAK,OAAO;aAAjB,CACE,qBAAC,KAAD;IAAK,KAAK,OAAO;cAAjB,CACG,SAAS,oBAAC,MAAD;KAAM,KAAK,OAAO;eAAQ;KAAa,CAAA,EACjD,oBAAC,MAAD;KAAM,KAAK,QAAQ,OAAO,UAAU,OAAO;eAAc;KAAe,CAAA,CACpE;OACL,UACC,oBAAC,cAAD;IACE,KAAK,OAAO;IACZ,MAAK;IACL,SAAQ;IACR,GAAK,OAAO,QAAQ;KAClB,IAAI;KACJ,MAAM,OAAO;KACb,KAAK,OAAO,WAAW,WAAW,wBAAwB,KAAA;KAC1D,QAAQ,OAAO;KAChB;IACD,SAAS,OAAO;cAEf,OAAO;IACK,CAAA,CAEb;KACF;;EAER;AAEF,eAAe,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.213",
4
+ "version": "0.3.214",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",