@bitrise/bitkit-v2 0.3.237 → 0.3.239
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/dist/components/BitkitActionBar/BitkitActionBar.d.ts +1 -1
- package/dist/components/BitkitActionMenu/BitkitActionMenu.d.ts +2 -2
- package/dist/components/BitkitAlert/BitkitAlert.d.ts +1 -1
- package/dist/components/BitkitBreadcrumb/BitkitBreadcrumb.d.ts +1 -1
- package/dist/components/BitkitBreadcrumb/components/OverflowMenu.d.ts +1 -1
- package/dist/components/BitkitBreadcrumb/components/OverflowMenuTrigger.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarFooter.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarMonth.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarMonthSelect.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarNextTrigger.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarSelect.d.ts +1 -1
- package/dist/components/BitkitCalendar/components/CalendarYearSelect.d.ts +1 -1
- package/dist/components/BitkitCombobox/BitkitCombobox.d.ts +1 -1
- package/dist/components/BitkitDefinitionTooltip/BitkitDefinitionTooltip.d.ts +1 -1
- package/dist/components/BitkitDialog/BitkitDialog.d.ts +5 -5
- package/dist/components/BitkitDialog/BitkitDialogBody.d.ts +1 -1
- package/dist/components/BitkitDialog/BitkitDialogContent.d.ts +2 -2
- package/dist/components/BitkitDialog/BitkitDialogHeader.d.ts +1 -1
- package/dist/components/BitkitDialog/BitkitDialogRoot.d.ts +1 -1
- package/dist/components/BitkitDialog/BitkitDialogStep.d.ts +1 -1
- package/dist/components/BitkitEmptyState/BitkitEmptyState.d.ts +1 -1
- package/dist/components/BitkitExpandableCard/BitkitExpandableCard.d.ts +1 -1
- package/dist/components/BitkitExpandableCard/BitkitExpandableCard.js +1 -1
- package/dist/components/BitkitFileInput/BitkitFileInput.js +30 -27
- package/dist/components/BitkitFileInput/BitkitFileInput.js.map +1 -1
- package/dist/components/BitkitLabelTooltip/BitkitLabelTooltip.d.ts +1 -1
- package/dist/components/BitkitMarkdownCard/BitkitMarkdownCard.js +1 -1
- package/dist/components/BitkitMultiselect/BitkitMultiselect.d.ts +1 -1
- package/dist/components/BitkitOverflowTooltip/BitkitOverflowTooltip.d.ts +1 -1
- package/dist/components/BitkitSelect/BitkitSelect.d.ts +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenuAction.d.ts +1 -1
- package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +1 -1
- package/dist/components/BitkitSplitButton/BitkitSplitButton.d.ts +1 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.d.ts +1 -1
- package/dist/components/BitkitSwitch/components/BitkitSwitchHelperText.d.ts +1 -1
- package/dist/components/BitkitSwitch/components/BitkitSwitchLabel.d.ts +1 -1
- package/dist/components/BitkitSwitch/components/BitkitSwitchReadOnly.d.ts +1 -1
- package/dist/components/BitkitSwitch/components/BitkitSwitchValueText.d.ts +1 -1
- package/dist/components/BitkitTabs/BitkitTabs.d.ts +4 -0
- package/dist/components/BitkitTabs/BitkitTabs.js +92 -14
- package/dist/components/BitkitTabs/BitkitTabs.js.map +1 -1
- package/dist/components/BitkitTag/BitkitTag.d.ts +1 -1
- package/dist/components/BitkitToast/BitkitToaster.d.ts +1 -1
- package/dist/components/BitkitTooltip/BitkitTooltip.d.ts +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/docs/ColorsBase.d.ts +1 -1
- package/dist/docs/ColorsComponent.d.ts +1 -1
- package/dist/docs/ColorsSystem.d.ts +1 -1
- package/dist/docs/Icons.d.ts +1 -1
- package/dist/docs/Radii.d.ts +1 -1
- package/dist/docs/Shadows.d.ts +1 -1
- package/dist/docs/SpacingAndSizes.d.ts +1 -1
- package/dist/docs/TextStyles.d.ts +1 -1
- package/dist/docs/Typography.d.ts +1 -1
- package/dist/docs/shared.d.ts +3 -3
- package/dist/hooks/useResponsive.d.ts +1 -1
- package/dist/main.js +1 -2
- package/dist/providers/BitkitProvider.d.ts +1 -1
- package/dist/vite.config.d.ts +2 -0
- package/package.json +11 -11
- package/dist/components/BitkitCard/BitkitCard.d.ts +0 -3
- package/dist/components/BitkitCard/BitkitCard.js +0 -18
- package/dist/components/BitkitCard/BitkitCard.js.map +0 -1
|
@@ -5,5 +5,5 @@ export interface BitkitActionBarProps extends ActionBarRootProps {
|
|
|
5
5
|
countValue: number;
|
|
6
6
|
onClose?: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare const BitkitActionBar: (props: BitkitActionBarProps) => import("react
|
|
8
|
+
declare const BitkitActionBar: (props: BitkitActionBarProps) => import("react").JSX.Element;
|
|
9
9
|
export default BitkitActionBar;
|
|
@@ -28,11 +28,11 @@ export interface BitkitMenuGroupProps extends MenuItemGroupProps {
|
|
|
28
28
|
}
|
|
29
29
|
declare const BitkitActionMenu: {
|
|
30
30
|
Root: {
|
|
31
|
-
({ trigger, children, ...props }: BitkitMenuRootProps): import("react
|
|
31
|
+
({ trigger, children, ...props }: BitkitMenuRootProps): import("react").JSX.Element;
|
|
32
32
|
displayName: string;
|
|
33
33
|
};
|
|
34
34
|
Separator: {
|
|
35
|
-
(): import("react
|
|
35
|
+
(): import("react").JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
37
|
};
|
|
38
38
|
Item: import('react').ForwardRefExoticComponent<BitkitMenuItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -12,5 +12,5 @@ export interface BitkitAlertProps extends AlertRootProps {
|
|
|
12
12
|
titleText?: ReactNode;
|
|
13
13
|
variant: AlertVariants;
|
|
14
14
|
}
|
|
15
|
-
declare const BitkitAlert: (props: BitkitAlertProps) => import("react
|
|
15
|
+
declare const BitkitAlert: (props: BitkitAlertProps) => import("react").JSX.Element;
|
|
16
16
|
export default BitkitAlert;
|
|
@@ -13,7 +13,7 @@ declare const BitkitBreadcrumb: import('react').ForwardRefExoticComponent<Omit<B
|
|
|
13
13
|
CurrentItem: import('react').ForwardRefExoticComponent<CurrentItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
14
14
|
Item: import('react').ForwardRefExoticComponent<ItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
15
15
|
OverflowMenu: {
|
|
16
|
-
({ children }: OverflowMenuProps): import("react
|
|
16
|
+
({ children }: OverflowMenuProps): import("react").JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
OverflowMenuItem: import('react').ForwardRefExoticComponent<ItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
@@ -3,7 +3,7 @@ export type OverflowMenuProps = {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
5
5
|
declare const OverflowMenu: {
|
|
6
|
-
({ children }: OverflowMenuProps): import("react
|
|
6
|
+
({ children }: OverflowMenuProps): import("react").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
export default OverflowMenu;
|
|
@@ -3,7 +3,7 @@ type OverflowMenuTriggerProps = {
|
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
};
|
|
5
5
|
declare const OverflowMenuTrigger: {
|
|
6
|
-
({ children }: OverflowMenuTriggerProps): import("react
|
|
6
|
+
({ children }: OverflowMenuTriggerProps): import("react").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
export default OverflowMenuTrigger;
|
|
@@ -2,5 +2,5 @@ type CalendarFooterProps = {
|
|
|
2
2
|
selectionMode?: 'day' | 'range';
|
|
3
3
|
showSelectedDate?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const CalendarFooter: ({ selectionMode, showSelectedDate }: CalendarFooterProps) => import("react
|
|
5
|
+
declare const CalendarFooter: ({ selectionMode, showSelectedDate }: CalendarFooterProps) => import("react").JSX.Element | null;
|
|
6
6
|
export default CalendarFooter;
|
|
@@ -5,5 +5,5 @@ type CalendarMonthSelectProps = {
|
|
|
5
5
|
min?: CalendarDate;
|
|
6
6
|
max?: CalendarDate;
|
|
7
7
|
};
|
|
8
|
-
declare const CalendarMonthSelect: ({ offset, layout, min, max }: CalendarMonthSelectProps) => import("react
|
|
8
|
+
declare const CalendarMonthSelect: ({ offset, layout, min, max }: CalendarMonthSelectProps) => import("react").JSX.Element;
|
|
9
9
|
export default CalendarMonthSelect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const CalendarNextTrigger: () => import("react
|
|
1
|
+
declare const CalendarNextTrigger: () => import("react").JSX.Element;
|
|
2
2
|
export default CalendarNextTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const CalendarPrevTrigger: () => import("react
|
|
1
|
+
declare const CalendarPrevTrigger: () => import("react").JSX.Element;
|
|
2
2
|
export default CalendarPrevTrigger;
|
|
@@ -12,7 +12,7 @@ export interface BitkitSelectProps {
|
|
|
12
12
|
value?: string[];
|
|
13
13
|
}
|
|
14
14
|
declare const CalendarSelect: {
|
|
15
|
-
(props: BitkitSelectProps): import("react
|
|
15
|
+
(props: BitkitSelectProps): import("react").JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export default CalendarSelect;
|
|
@@ -8,5 +8,5 @@ type CalendarYearSelectProps = {
|
|
|
8
8
|
to: number;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
declare const CalendarYearSelect: ({ monthOffset, max, min, yearsRange }: CalendarYearSelectProps) => import("react
|
|
11
|
+
declare const CalendarYearSelect: ({ monthOffset, max, min, yearsRange }: CalendarYearSelectProps) => import("react").JSX.Element;
|
|
12
12
|
export default CalendarYearSelect;
|
|
@@ -27,7 +27,7 @@ declare const _default: import('react').ForwardRefExoticComponent<Omit<BitkitFie
|
|
|
27
27
|
value?: string;
|
|
28
28
|
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
29
29
|
Action: {
|
|
30
|
-
(props: import('..').BitkitSelectMenuActionProps): import("react
|
|
30
|
+
(props: import('..').BitkitSelectMenuActionProps): import("react").JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -12,7 +12,7 @@ export interface BitkitDefinitionTooltipProps {
|
|
|
12
12
|
truncate?: boolean;
|
|
13
13
|
}
|
|
14
14
|
declare const BitkitDefinitionTooltip: {
|
|
15
|
-
({ button, children, learnMoreTarget, learnMoreUrl, method, placement, text, textSize, truncate, }: BitkitDefinitionTooltipProps): import("react
|
|
15
|
+
({ button, children, learnMoreTarget, learnMoreUrl, method, placement, text, textSize, truncate, }: BitkitDefinitionTooltipProps): import("react").JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export default BitkitDefinitionTooltip;
|
|
@@ -21,21 +21,21 @@ export interface BitkitDialogProps {
|
|
|
21
21
|
variant?: 'overflowContent';
|
|
22
22
|
}
|
|
23
23
|
declare const _default: {
|
|
24
|
-
({ children, closable, headerLabel, maxHeight, onExitComplete, onOpenChange, open, preventScroll, scrollBehavior: scrollBehaviorProp, showScrollGradient, size, step, title, trigger, variant, }: BitkitDialogProps): import("react
|
|
24
|
+
({ children, closable, headerLabel, maxHeight, onExitComplete, onOpenChange, open, preventScroll, scrollBehavior: scrollBehaviorProp, showScrollGradient, size, step, title, trigger, variant, }: BitkitDialogProps): import("react").JSX.Element;
|
|
25
25
|
displayName: string;
|
|
26
26
|
} & {
|
|
27
27
|
ActionTrigger: import('react').ForwardRefExoticComponent<Dialog.ActionTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
28
|
-
Body: ({ children, ...rest }: import('./BitkitDialogBody').BitkitDialogBodyProps) => import("react
|
|
28
|
+
Body: ({ children, ...rest }: import('./BitkitDialogBody').BitkitDialogBodyProps) => import("react").JSX.Element;
|
|
29
29
|
Buttons: import('react').ForwardRefExoticComponent<import('@chakra-ui/react').BoxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
-
Content: ({ maxHeight, ...inner }: import('./BitkitDialogContent').BitkitDialogContentProps) => import("react
|
|
30
|
+
Content: ({ maxHeight, ...inner }: import('./BitkitDialogContent').BitkitDialogContentProps) => import("react").JSX.Element;
|
|
31
31
|
Footer: import('react').ForwardRefExoticComponent<Dialog.FooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
32
|
FormContent: import('react').ForwardRefExoticComponent<import('./BitkitDialogFormContent').BitkitDialogFormContentProps & import('react').RefAttributes<HTMLFormElement>>;
|
|
33
33
|
Header: {
|
|
34
|
-
({ children }: BitkitDialogHeaderProps): import("react
|
|
34
|
+
({ children }: BitkitDialogHeaderProps): import("react").JSX.Element;
|
|
35
35
|
displayName: string;
|
|
36
36
|
};
|
|
37
37
|
Step: {
|
|
38
|
-
(props: import('./BitkitDialogStep').BitkitDialogStepProps): import("react
|
|
38
|
+
(props: import('./BitkitDialogStep').BitkitDialogStepProps): import("react").JSX.Element | null;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
@@ -5,5 +5,5 @@ interface DialogBodyContext {
|
|
|
5
5
|
}
|
|
6
6
|
export type BitkitDialogBodyProps = Dialog.BodyProps;
|
|
7
7
|
export declare const DialogBodyContext: import('react').Context<DialogBodyContext>;
|
|
8
|
-
declare const BitkitDialogBody: ({ children, ...rest }: BitkitDialogBodyProps) => import("react
|
|
8
|
+
declare const BitkitDialogBody: ({ children, ...rest }: BitkitDialogBodyProps) => import("react").JSX.Element;
|
|
9
9
|
export default BitkitDialogBody;
|
|
@@ -10,7 +10,7 @@ interface DialogContentInnerProps {
|
|
|
10
10
|
title: ReactNode;
|
|
11
11
|
variant?: 'overflowContent';
|
|
12
12
|
}
|
|
13
|
-
export declare const DialogContentInner: ({ children, closable, headerLabel, scrollBehavior: scrollBehaviorProp, showScrollGradient, step, stepHeader, title, variant, }: DialogContentInnerProps) => import("react
|
|
13
|
+
export declare const DialogContentInner: ({ children, closable, headerLabel, scrollBehavior: scrollBehaviorProp, showScrollGradient, step, stepHeader, title, variant, }: DialogContentInnerProps) => import("react").JSX.Element;
|
|
14
14
|
export interface BitkitDialogContentProps {
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
closable?: boolean;
|
|
@@ -23,5 +23,5 @@ export interface BitkitDialogContentProps {
|
|
|
23
23
|
title: ReactNode;
|
|
24
24
|
variant?: 'overflowContent';
|
|
25
25
|
}
|
|
26
|
-
declare const BitkitDialogContent: ({ maxHeight, ...inner }: BitkitDialogContentProps) => import("react
|
|
26
|
+
declare const BitkitDialogContent: ({ maxHeight, ...inner }: BitkitDialogContentProps) => import("react").JSX.Element;
|
|
27
27
|
export default BitkitDialogContent;
|
|
@@ -3,7 +3,7 @@ export interface BitkitDialogHeaderProps {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
5
|
declare const BitkitDialogHeader: {
|
|
6
|
-
({ children }: BitkitDialogHeaderProps): import("react
|
|
6
|
+
({ children }: BitkitDialogHeaderProps): import("react").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
export default BitkitDialogHeader;
|
|
@@ -2,5 +2,5 @@ import { Dialog } from '@chakra-ui/react/dialog';
|
|
|
2
2
|
export type BitkitDialogRootProps = Dialog.RootProps & {
|
|
3
3
|
variant?: 'overflowContent';
|
|
4
4
|
};
|
|
5
|
-
declare const BitkitDialogRoot: ({ closeOnInteractOutside, preventScroll, ...props }: BitkitDialogRootProps) => import("react
|
|
5
|
+
declare const BitkitDialogRoot: ({ closeOnInteractOutside, preventScroll, ...props }: BitkitDialogRootProps) => import("react").JSX.Element;
|
|
6
6
|
export default BitkitDialogRoot;
|
|
@@ -5,7 +5,7 @@ export interface BitkitDialogStepProps {
|
|
|
5
5
|
title: string;
|
|
6
6
|
}
|
|
7
7
|
declare const BitkitDialogStep: {
|
|
8
|
-
(props: BitkitDialogStepProps): import("react
|
|
8
|
+
(props: BitkitDialogStepProps): import("react").JSX.Element | null;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export default BitkitDialogStep;
|
|
@@ -7,5 +7,5 @@ export interface BitkitEmptyStateProps extends EmptyStateRootProps {
|
|
|
7
7
|
icon: BitkitIconComponent;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const BitkitEmptyState: (props: BitkitEmptyStateProps) => import("react
|
|
10
|
+
declare const BitkitEmptyState: (props: BitkitEmptyStateProps) => import("react").JSX.Element;
|
|
11
11
|
export default BitkitEmptyState;
|
|
@@ -22,7 +22,7 @@ export type BitkitExpandableCardProps = Omit<CollapsibleRootProps, 'defaultOpen'
|
|
|
22
22
|
title: ReactNode;
|
|
23
23
|
} & (UncontrolledProps | ControlledProps);
|
|
24
24
|
declare const BitkitExpandableCard: {
|
|
25
|
-
(props: BitkitExpandableCardProps): import("react
|
|
25
|
+
(props: BitkitExpandableCardProps): import("react").JSX.Element;
|
|
26
26
|
displayName: string;
|
|
27
27
|
};
|
|
28
28
|
export default BitkitExpandableCard;
|
|
@@ -4,8 +4,8 @@ import { useSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
|
4
4
|
import { Text } from "@chakra-ui/react/text";
|
|
5
5
|
import { cloneElement, isValidElement } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Card } from "@chakra-ui/react/card";
|
|
8
7
|
import { Collapsible } from "@chakra-ui/react/collapsible";
|
|
8
|
+
import { Card } from "@chakra-ui/react/card";
|
|
9
9
|
//#region lib/components/BitkitExpandableCard/BitkitExpandableCard.tsx
|
|
10
10
|
var BitkitExpandableCard = (props) => {
|
|
11
11
|
const { children, defaultExpanded, expanded, footer, icon, onChange, secdText, size = "lg", suffix, title, ...rest } = props;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import IconMinusCircle from "../../icons/IconMinusCircle.js";
|
|
2
2
|
import IconUpload from "../../icons/IconUpload.js";
|
|
3
3
|
import BitkitButton from "../BitkitButton/BitkitButton.js";
|
|
4
|
-
import BitkitCard from "../BitkitCard/BitkitCard.js";
|
|
5
4
|
import BitkitField from "../BitkitField/BitkitField.js";
|
|
6
5
|
import ImageCropper_default, { useImageCropperContext } from "../../atoms/ImageCropper/ImageCropper.js";
|
|
7
6
|
import { Text } from "@chakra-ui/react/text";
|
|
8
7
|
import { forwardRef, useEffect, useMemo } from "react";
|
|
9
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Card } from "@chakra-ui/react/card";
|
|
10
10
|
import { FileUpload, useFileUploadContext } from "@chakra-ui/react/file-upload";
|
|
11
11
|
import { VStack } from "@chakra-ui/react/stack";
|
|
12
12
|
import { splitProps } from "@zag-js/file-upload";
|
|
@@ -62,35 +62,38 @@ var ImagePreview = (props) => {
|
|
|
62
62
|
var NonImagePreview = () => {
|
|
63
63
|
const fileUpload = useFileUploadContext();
|
|
64
64
|
const acceptedFile = fileUpload.acceptedFiles[0];
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
return /* @__PURE__ */ jsx(Card.Root, {
|
|
66
|
+
asChild: true,
|
|
67
67
|
elevation: false,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
gap: "4",
|
|
74
|
-
alignItems: "flex-start",
|
|
68
|
+
children: /* @__PURE__ */ jsxs(Card.Body, {
|
|
69
|
+
display: "flex",
|
|
70
|
+
paddingBlock: "20",
|
|
71
|
+
paddingInline: "24",
|
|
72
|
+
alignItems: "center",
|
|
75
73
|
flex: "1",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
children: [/* @__PURE__ */ jsxs(VStack, {
|
|
75
|
+
gap: "4",
|
|
76
|
+
alignItems: "flex-start",
|
|
77
|
+
flex: "1",
|
|
78
|
+
minWidth: "0",
|
|
79
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
80
|
+
textStyle: "comp/input/label",
|
|
81
|
+
children: "Selected file"
|
|
82
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
83
|
+
whiteSpace: "nowrap",
|
|
84
|
+
textOverflow: "ellipsis",
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
maxWidth: "100%",
|
|
87
|
+
children: acceptedFile.name
|
|
88
|
+
})]
|
|
89
|
+
}), /* @__PURE__ */ jsx(BitkitButton, {
|
|
90
|
+
icon: IconMinusCircle,
|
|
91
|
+
variant: "secondary",
|
|
92
|
+
size: "md",
|
|
93
|
+
onClick: fileUpload.clearFiles,
|
|
94
|
+
children: "Remove"
|
|
86
95
|
})]
|
|
87
|
-
})
|
|
88
|
-
icon: IconMinusCircle,
|
|
89
|
-
variant: "secondary",
|
|
90
|
-
size: "md",
|
|
91
|
-
onClick: fileUpload.clearFiles,
|
|
92
|
-
children: "Remove"
|
|
93
|
-
})]
|
|
96
|
+
})
|
|
94
97
|
});
|
|
95
98
|
};
|
|
96
99
|
var BitkitFileInputContent = (props) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitFileInput.js","names":[],"sources":["../../../lib/components/BitkitFileInput/BitkitFileInput.tsx"],"sourcesContent":["import {\n FileUpload,\n type FileUploadFileAcceptDetails,\n type FileUploadRootProps,\n useFileUploadContext,\n} from '@chakra-ui/react/file-upload';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { Text } from '@chakra-ui/react/text';\nimport { splitProps as splitFileUploadProps } from '@zag-js/file-upload';\nimport { forwardRef, useEffect, useMemo } from 'react';\n\nimport ImageCropper, { useImageCropperContext } from '../../atoms/ImageCropper/ImageCropper';\nimport { IconMinusCircle, IconUpload } from '../../icons';\nimport BitkitButton from '../BitkitButton/BitkitButton';\nimport
|
|
1
|
+
{"version":3,"file":"BitkitFileInput.js","names":[],"sources":["../../../lib/components/BitkitFileInput/BitkitFileInput.tsx"],"sourcesContent":["import { Card } from '@chakra-ui/react/card';\nimport {\n FileUpload,\n type FileUploadFileAcceptDetails,\n type FileUploadRootProps,\n useFileUploadContext,\n} from '@chakra-ui/react/file-upload';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { Text } from '@chakra-ui/react/text';\nimport { splitProps as splitFileUploadProps } from '@zag-js/file-upload';\nimport { forwardRef, useEffect, useMemo } from 'react';\n\nimport ImageCropper, { useImageCropperContext } from '../../atoms/ImageCropper/ImageCropper';\nimport { IconMinusCircle, IconUpload } from '../../icons';\nimport BitkitButton from '../BitkitButton/BitkitButton';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\ntype BitkitFileInputProps = Omit<BitkitFieldProps, 'children' | 'state'> &\n Omit<FileUploadRootProps, 'disabled' | 'invalid'> & {\n aspectRatio?: number;\n onCropChange?: (file: File) => void;\n onFileAccepted?: (file: File) => void;\n state?: 'error' | 'disabled';\n };\n\nconst Dropzone = () => {\n const { disabled } = useFileUploadContext();\n const dropzoneLabel = disabled ? 'Cannot upload file' : 'Drag and drop file here or click to select';\n\n return (\n <FileUpload.Dropzone>\n <FileUpload.DropzoneContent>\n <IconUpload />\n <Text as=\"span\">{dropzoneLabel}</Text>\n </FileUpload.DropzoneContent>\n </FileUpload.Dropzone>\n );\n};\n\nconst ImagePreviewContent = (props: Pick<BitkitFileInputProps, 'onCropChange'>) => {\n const { onCropChange } = props;\n\n const { acceptedFiles } = useFileUploadContext();\n const { dragging, getCroppedImage } = useImageCropperContext();\n\n const acceptedFile = acceptedFiles[0];\n const objectUrl = useMemo(() => (acceptedFile ? URL.createObjectURL(acceptedFile) : undefined), [acceptedFile]);\n\n useEffect(() => {\n return () => {\n if (objectUrl) {\n URL.revokeObjectURL(objectUrl);\n }\n };\n }, [objectUrl]);\n\n useEffect(() => {\n if (!onCropChange || dragging) {\n return;\n }\n\n if (!acceptedFile) {\n return;\n }\n\n let cancelled = false;\n getCroppedImage().then((result) => {\n if (!cancelled && result instanceof Blob) {\n onCropChange(new File([result], acceptedFile.name, { type: result.type }));\n }\n });\n\n return () => {\n cancelled = true;\n };\n }, [getCroppedImage, acceptedFile, onCropChange, dragging]);\n\n return (\n <ImageCropper.Viewport>\n <ImageCropper.Image src={objectUrl} />\n <ImageCropper.Selection>\n {ImageCropper.handles.map((position) => (\n <ImageCropper.Handle key={position} position={position}>\n <div />\n </ImageCropper.Handle>\n ))}\n </ImageCropper.Selection>\n </ImageCropper.Viewport>\n );\n};\n\nconst ImagePreview = (props: Pick<BitkitFileInputProps, 'aspectRatio' | 'onCropChange'>) => {\n const { aspectRatio, onCropChange } = props;\n\n return (\n <ImageCropper.Root aspectRatio={aspectRatio} height=\"100%\">\n <ImagePreviewContent onCropChange={onCropChange} />\n </ImageCropper.Root>\n );\n};\n\nconst NonImagePreview = () => {\n const fileUpload = useFileUploadContext();\n const acceptedFile = fileUpload.acceptedFiles[0];\n\n return (\n <Card.Root asChild elevation={false}>\n <Card.Body display=\"flex\" paddingBlock=\"20\" paddingInline=\"24\" alignItems=\"center\" flex=\"1\">\n <VStack gap=\"4\" alignItems=\"flex-start\" flex=\"1\" minWidth=\"0\">\n <Text textStyle=\"comp/input/label\">Selected file</Text>\n <Text whiteSpace=\"nowrap\" textOverflow=\"ellipsis\" overflow=\"hidden\" maxWidth=\"100%\">\n {acceptedFile.name}\n </Text>\n </VStack>\n <BitkitButton icon={IconMinusCircle} variant=\"secondary\" size=\"md\" onClick={fileUpload.clearFiles}>\n Remove\n </BitkitButton>\n </Card.Body>\n </Card.Root>\n );\n};\n\nconst BitkitFileInputContent = (props: Pick<BitkitFileInputProps, 'variant' | 'aspectRatio' | 'onCropChange'>) => {\n const { variant, aspectRatio, onCropChange } = props;\n const acceptedFile = useFileUploadContext().acceptedFiles[0];\n\n return (\n <>\n {!acceptedFile && <Dropzone />}\n {acceptedFile && variant === 'image' && <ImagePreview aspectRatio={aspectRatio} onCropChange={onCropChange} />}\n {acceptedFile && variant !== 'image' && <NonImagePreview />}\n </>\n );\n};\n\nconst BitkitFileInput = forwardRef<HTMLDivElement, BitkitFileInputProps>((props, ref) => {\n const { aspectRatio, onCropChange, onFileAccept, onFileAccepted, state, variant, ...rest } = props;\n const [fileUploadProps, fieldProps] = splitFileUploadProps(rest as never);\n\n const handleFileAccept = (details: FileUploadFileAcceptDetails) => {\n onFileAccept?.(details);\n onFileAccepted?.(details.files[0]);\n };\n\n const contentProps = {\n variant,\n aspectRatio,\n onCropChange,\n };\n\n return (\n <BitkitField ref={ref} state={state} {...fieldProps}>\n <FileUpload.Root variant={variant} onFileAccept={handleFileAccept} {...fileUploadProps}>\n <FileUpload.HiddenInput />\n <BitkitFileInputContent {...contentProps} />\n </FileUpload.Root>\n </BitkitField>\n );\n});\n\nBitkitFileInput.displayName = 'BitkitFileInput';\n\nexport default BitkitFileInput;\n"],"mappings":"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"}
|
|
@@ -7,7 +7,7 @@ export type BitkitLabelTooltipProps = {
|
|
|
7
7
|
text: string;
|
|
8
8
|
};
|
|
9
9
|
declare const BitkitLabelTooltip: {
|
|
10
|
-
({ children, disabled, placement, text }: BitkitLabelTooltipProps): import("react
|
|
10
|
+
({ children, disabled, placement, text }: BitkitLabelTooltipProps): import("react").JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default BitkitLabelTooltip;
|
|
@@ -10,8 +10,8 @@ import { Box } from "@chakra-ui/react/box";
|
|
|
10
10
|
import { useSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
11
11
|
import { forwardRef } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Card } from "@chakra-ui/react/card";
|
|
14
13
|
import { Collapsible } from "@chakra-ui/react/collapsible";
|
|
14
|
+
import { Card } from "@chakra-ui/react/card";
|
|
15
15
|
import { HStack } from "@chakra-ui/react/stack";
|
|
16
16
|
//#region lib/components/BitkitMarkdownCard/BitkitMarkdownCard.tsx
|
|
17
17
|
var STATUS_ICONS = {
|
|
@@ -33,7 +33,7 @@ declare const _default: import('react').ForwardRefExoticComponent<Omit<BitkitFie
|
|
|
33
33
|
value?: Array<string>;
|
|
34
34
|
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
35
35
|
Action: {
|
|
36
|
-
(props: import('..').BitkitSelectMenuActionProps): import("react
|
|
36
|
+
(props: import('..').BitkitSelectMenuActionProps): import("react").JSX.Element;
|
|
37
37
|
displayName: string;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
@@ -7,7 +7,7 @@ export type BitkitOverflowTooltipProps = {
|
|
|
7
7
|
text: string;
|
|
8
8
|
};
|
|
9
9
|
declare const BitkitOverflowTooltip: {
|
|
10
|
-
({ children, disabled, placement, text }: BitkitOverflowTooltipProps): import("react
|
|
10
|
+
({ children, disabled, placement, text }: BitkitOverflowTooltipProps): import("react").JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default BitkitOverflowTooltip;
|
|
@@ -30,7 +30,7 @@ declare const _default: import('react').ForwardRefExoticComponent<Omit<BitkitFie
|
|
|
30
30
|
value?: string;
|
|
31
31
|
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
32
32
|
Action: {
|
|
33
|
-
(props: import('../index.ts').BitkitSelectMenuActionProps): import("react
|
|
33
|
+
(props: import('../index.ts').BitkitSelectMenuActionProps): import("react").JSX.Element;
|
|
34
34
|
displayName: string;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
@@ -26,7 +26,7 @@ type SelectMenuShellContext = {
|
|
|
26
26
|
declare const SelectMenuShellContextProvider: import('react').Provider<SelectMenuShellContext>;
|
|
27
27
|
export { SelectMenuShellContextProvider };
|
|
28
28
|
declare const BitkitSelectMenuAction: {
|
|
29
|
-
(props: BitkitSelectMenuActionProps): import("react
|
|
29
|
+
(props: BitkitSelectMenuActionProps): import("react").JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
export default BitkitSelectMenuAction;
|
|
@@ -29,4 +29,4 @@ export type SelectMenuShellProps<T extends {
|
|
|
29
29
|
export declare const SelectMenuShell: <T extends {
|
|
30
30
|
value: string;
|
|
31
31
|
group?: string;
|
|
32
|
-
}>({ NS, children, collection, contentProps, contentRef, emptyHelperText, emptyLabel, iconSize, isLoading, onSearchChange, renderItem, searchValue, size, styles, }: SelectMenuShellProps<T>) => import("react
|
|
32
|
+
}>({ NS, children, collection, contentProps, contentRef, emptyHelperText, emptyLabel, iconSize, isLoading, onSearchChange, renderItem, searchValue, size, styles, }: SelectMenuShellProps<T>) => import("react").JSX.Element;
|
|
@@ -21,7 +21,7 @@ declare const _default: import('react').ForwardRefExoticComponent<Omit<GroupProp
|
|
|
21
21
|
Group: import('react').ForwardRefExoticComponent<import('..').BitkitMenuGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
22
|
Item: import('react').ForwardRefExoticComponent<import('..').BitkitMenuItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
23
23
|
Separator: {
|
|
24
|
-
(): import("react
|
|
24
|
+
(): import("react").JSX.Element;
|
|
25
25
|
displayName: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
@@ -23,7 +23,7 @@ declare const _default: import('react').ForwardRefExoticComponent<BitkitStepsCar
|
|
|
23
23
|
Footer: import('react').ForwardRefExoticComponent<BitkitStepsCardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
24
|
Header: import('react').ForwardRefExoticComponent<BitkitStepsCardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
25
|
Step: {
|
|
26
|
-
(props: BitkitStepsCardStepProps): import("react
|
|
26
|
+
(props: BitkitStepsCardStepProps): import("react").JSX.Element | null;
|
|
27
27
|
displayName: string;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BitkitSwitchDynamicTextProps } from '../BitkitSwitch.types';
|
|
2
|
-
declare const BitkitSwitchHelperText: ({ state, helperText }: Pick<BitkitSwitchDynamicTextProps, "state" | "helperText">) => import("react
|
|
2
|
+
declare const BitkitSwitchHelperText: ({ state, helperText }: Pick<BitkitSwitchDynamicTextProps, "state" | "helperText">) => import("react").JSX.Element | null;
|
|
3
3
|
export default BitkitSwitchHelperText;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BitkitSwitchDynamicTextProps } from '../BitkitSwitch.types';
|
|
2
|
-
declare const BitkitSwitchLabel: ({ label, state, tooltip, optional, }: Pick<BitkitSwitchDynamicTextProps, "label" | "state" | "tooltip" | "optional">) => import("react
|
|
2
|
+
declare const BitkitSwitchLabel: ({ label, state, tooltip, optional, }: Pick<BitkitSwitchDynamicTextProps, "label" | "state" | "tooltip" | "optional">) => import("react").JSX.Element | null;
|
|
3
3
|
export default BitkitSwitchLabel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BitkitSwitchProps } from '../BitkitSwitch.types';
|
|
2
2
|
type Props = Pick<BitkitSwitchProps, 'state' | 'children'>;
|
|
3
|
-
declare const BitkitSwitchReadOnly: ({ state, children }: Props) => string | number | boolean | Iterable<import('react').ReactNode> | import("react
|
|
3
|
+
declare const BitkitSwitchReadOnly: ({ state, children }: Props) => string | number | boolean | Iterable<import('react').ReactNode> | import("react").JSX.Element | null | undefined;
|
|
4
4
|
export default BitkitSwitchReadOnly;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BitkitSwitchDynamicTextProps } from '../BitkitSwitch.types';
|
|
2
|
-
declare const BitkitSwitchValueText: ({ size, state, valueText, }: Pick<BitkitSwitchDynamicTextProps, "size" | "state" | "valueText">) => import("react
|
|
2
|
+
declare const BitkitSwitchValueText: ({ size, state, valueText, }: Pick<BitkitSwitchDynamicTextProps, "size" | "state" | "valueText">) => import("react").JSX.Element | null;
|
|
3
3
|
export default BitkitSwitchValueText;
|
|
@@ -5,8 +5,12 @@ export declare const RootPropsProvider: import('react').Provider<Tabs.RootProps>
|
|
|
5
5
|
declare const Root: import('react').ForwardRefExoticComponent<Tabs.RootProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const Trigger: import('react').ForwardRefExoticComponent<Tabs.TriggerProps & {
|
|
7
7
|
badge?: ReactNode;
|
|
8
|
+
/** Shows a "changed" indicator dot. When hovered (and `onClose` is set), the close button replaces it. */
|
|
9
|
+
changed?: boolean;
|
|
8
10
|
children?: string;
|
|
9
11
|
icon?: BitkitIconComponent;
|
|
12
|
+
/** When provided, a close button reveals on hover and calls this handler when clicked. */
|
|
13
|
+
onClose?: () => void;
|
|
10
14
|
secondaryText?: ReactNode;
|
|
11
15
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
12
16
|
declare const BitkitTabs: Omit<typeof Tabs, 'Root' | 'Trigger'> & {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import IconCross from "../../icons/IconCross.js";
|
|
1
2
|
import { Box } from "@chakra-ui/react/box";
|
|
3
|
+
import { chakra, useRecipe } from "@chakra-ui/react/styled-system";
|
|
2
4
|
import { Text } from "@chakra-ui/react/text";
|
|
3
5
|
import { forwardRef } from "react";
|
|
4
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -21,25 +23,101 @@ var Root = forwardRef((props, ref) => {
|
|
|
21
23
|
});
|
|
22
24
|
Root.displayName = "BitkitTabs.Root";
|
|
23
25
|
var Trigger = forwardRef((props, ref) => {
|
|
24
|
-
const { badge, children, icon: Icon, secondaryText, ...rest } = props;
|
|
26
|
+
const { badge, changed, children, className, icon: Icon, onClose, onKeyDown, secondaryText, ...rest } = props;
|
|
25
27
|
const { variant } = useRootPropsContext();
|
|
28
|
+
const closeButtonRecipe = useRecipe({ key: "closeButton" });
|
|
29
|
+
const closable = !!onClose && !rest.disabled;
|
|
30
|
+
const showTrailing = (closable || changed) && !rest.disabled;
|
|
31
|
+
const mergedClassName = showTrailing ? className ? `group ${className}` : "group" : className;
|
|
32
|
+
const revealCloseOnInteraction = closable && !!changed;
|
|
33
|
+
const revealOnInteraction = {
|
|
34
|
+
opacity: 1,
|
|
35
|
+
pointerEvents: "auto"
|
|
36
|
+
};
|
|
37
|
+
const handleCloseClick = (event) => {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
onClose?.();
|
|
41
|
+
};
|
|
42
|
+
const handleTriggerKeyDown = (event) => {
|
|
43
|
+
if (closable && (event.key === "Delete" || event.key === "Backspace")) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
const trigger = event.currentTarget;
|
|
46
|
+
const triggers = [...trigger.closest("[role=\"tablist\"]")?.querySelectorAll("[role=\"tab\"]") ?? []];
|
|
47
|
+
const index = triggers.indexOf(trigger);
|
|
48
|
+
(triggers[index + 1] ?? triggers[index - 1])?.focus();
|
|
49
|
+
onClose?.();
|
|
50
|
+
}
|
|
51
|
+
onKeyDown?.(event);
|
|
52
|
+
};
|
|
53
|
+
const trailing = showTrailing ? /* @__PURE__ */ jsxs(chakra.span, {
|
|
54
|
+
position: "relative",
|
|
55
|
+
display: "flex",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
justifyContent: "center",
|
|
58
|
+
boxSize: "24",
|
|
59
|
+
flexShrink: 0,
|
|
60
|
+
children: [changed && /* @__PURE__ */ jsx(chakra.span, {
|
|
61
|
+
position: "absolute",
|
|
62
|
+
inset: 0,
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
justifyContent: "center",
|
|
66
|
+
pointerEvents: "none",
|
|
67
|
+
transition: "opacity 0.1s",
|
|
68
|
+
_groupHover: closable ? { opacity: 0 } : void 0,
|
|
69
|
+
_groupFocusWithin: closable ? { opacity: 0 } : void 0,
|
|
70
|
+
children: /* @__PURE__ */ jsx(chakra.span, {
|
|
71
|
+
boxSize: "8",
|
|
72
|
+
borderRadius: "full",
|
|
73
|
+
backgroundColor: "interactive/bold"
|
|
74
|
+
})
|
|
75
|
+
}), closable && /* @__PURE__ */ jsx(chakra.span, {
|
|
76
|
+
"aria-hidden": true,
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
onClick: handleCloseClick,
|
|
79
|
+
css: closeButtonRecipe({ size: "xs" }),
|
|
80
|
+
position: "absolute",
|
|
81
|
+
inset: 0,
|
|
82
|
+
color: "icon/primary",
|
|
83
|
+
opacity: revealCloseOnInteraction ? 0 : 1,
|
|
84
|
+
pointerEvents: revealCloseOnInteraction ? "none" : "auto",
|
|
85
|
+
transition: "opacity 0.1s",
|
|
86
|
+
_groupHover: revealCloseOnInteraction ? revealOnInteraction : void 0,
|
|
87
|
+
_groupFocusWithin: revealCloseOnInteraction ? revealOnInteraction : void 0,
|
|
88
|
+
children: /* @__PURE__ */ jsx(IconCross, { size: "16" })
|
|
89
|
+
})]
|
|
90
|
+
}) : null;
|
|
26
91
|
return /* @__PURE__ */ jsx(Tabs.Trigger, {
|
|
27
92
|
ref,
|
|
28
93
|
...rest,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
94
|
+
className: mergedClassName,
|
|
95
|
+
gap: showTrailing ? "12" : void 0,
|
|
96
|
+
onKeyDown: handleTriggerKeyDown,
|
|
97
|
+
paddingInlineEnd: showTrailing ? "12" : void 0,
|
|
98
|
+
children: variant === "line" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Box, {
|
|
34
99
|
display: "flex",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})] })
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
gap: "8",
|
|
102
|
+
children: [
|
|
103
|
+
Icon && /* @__PURE__ */ jsx(Icon, { size: "24" }),
|
|
104
|
+
children,
|
|
105
|
+
badge
|
|
106
|
+
]
|
|
107
|
+
}), trailing] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
108
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
109
|
+
display: "flex",
|
|
110
|
+
gap: "16",
|
|
111
|
+
children: [children, Icon && /* @__PURE__ */ jsx(Icon, { size: "24" })]
|
|
112
|
+
}),
|
|
113
|
+
!!secondaryText && /* @__PURE__ */ jsx(Text, {
|
|
114
|
+
as: "span",
|
|
115
|
+
textStyle: "body/md/regular",
|
|
116
|
+
color: rest.disabled ? "text/on-disabled" : "text/secondary",
|
|
117
|
+
children: secondaryText
|
|
118
|
+
}),
|
|
119
|
+
trailing
|
|
120
|
+
] })
|
|
43
121
|
});
|
|
44
122
|
});
|
|
45
123
|
Trigger.displayName = "BitkitTabs.Trigger";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTabs.js","names":[],"sources":["../../../lib/components/BitkitTabs/BitkitTabs.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Tabs } from '@chakra-ui/react/tabs';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\n\nexport const [RootPropsProvider, useRootPropsContext] = createContext<Tabs.RootProps>({\n name: 'RootPropsContext',\n hookName: 'useRootPropsContext',\n providerName: '<RootProps />',\n});\n\nconst Root = forwardRef<HTMLDivElement, Tabs.RootProps>((props, ref) => {\n return (\n <RootPropsProvider value={props}>\n <Tabs.Root ref={ref} {...props} />\n </RootPropsProvider>\n );\n});\n\ntype TriggerProps = Tabs.TriggerProps & {\n badge?: ReactNode;\n children?: string;\n icon?: BitkitIconComponent;\n secondaryText?: ReactNode;\n};\n\nRoot.displayName = 'BitkitTabs.Root';\n\nconst Trigger = forwardRef<HTMLButtonElement, TriggerProps>((props, ref) => {\n const { badge, children, icon: Icon, secondaryText, ...rest } = props;\n const { variant } = useRootPropsContext();\n return (\n <Tabs.Trigger
|
|
1
|
+
{"version":3,"file":"BitkitTabs.js","names":[],"sources":["../../../lib/components/BitkitTabs/BitkitTabs.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Box } from '@chakra-ui/react/box';\nimport { chakra, useRecipe } from '@chakra-ui/react/styled-system';\nimport { Tabs } from '@chakra-ui/react/tabs';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type KeyboardEvent, type MouseEvent, type ReactNode } from 'react';\n\nimport { type BitkitIconComponent, IconCross } from '../../icons';\n\nexport const [RootPropsProvider, useRootPropsContext] = createContext<Tabs.RootProps>({\n name: 'RootPropsContext',\n hookName: 'useRootPropsContext',\n providerName: '<RootProps />',\n});\n\nconst Root = forwardRef<HTMLDivElement, Tabs.RootProps>((props, ref) => {\n return (\n <RootPropsProvider value={props}>\n <Tabs.Root ref={ref} {...props} />\n </RootPropsProvider>\n );\n});\n\ntype TriggerProps = Tabs.TriggerProps & {\n badge?: ReactNode;\n /** Shows a \"changed\" indicator dot. When hovered (and `onClose` is set), the close button replaces it. */\n changed?: boolean;\n children?: string;\n icon?: BitkitIconComponent;\n /** When provided, a close button reveals on hover and calls this handler when clicked. */\n onClose?: () => void;\n secondaryText?: ReactNode;\n};\n\nRoot.displayName = 'BitkitTabs.Root';\n\nconst Trigger = forwardRef<HTMLButtonElement, TriggerProps>((props, ref) => {\n const { badge, changed, children, className, icon: Icon, onClose, onKeyDown, secondaryText, ...rest } = props;\n const { variant } = useRootPropsContext();\n const closeButtonRecipe = useRecipe({ key: 'closeButton' });\n\n const closable = !!onClose && !rest.disabled;\n const showTrailing = (closable || changed) && !rest.disabled;\n const mergedClassName = showTrailing ? (className ? `group ${className}` : 'group') : className;\n // The close button is always visible when there is no \"changed\" dot; when the dot is shown it is\n // revealed on hover/focus instead (replacing the dot).\n const revealCloseOnInteraction = closable && !!changed;\n const revealOnInteraction = { opacity: 1, pointerEvents: 'auto' } as const;\n\n const handleCloseClick = (event: MouseEvent<HTMLSpanElement>) => {\n event.stopPropagation();\n event.preventDefault();\n onClose?.();\n };\n\n // The close control is not in the tab order; keyboard users close the focused tab with Delete/Backspace.\n const handleTriggerKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (closable && (event.key === 'Delete' || event.key === 'Backspace')) {\n event.preventDefault();\n // Move focus to a sibling tab before removal so keyboard navigation can continue.\n const trigger = event.currentTarget;\n const triggers = [...(trigger.closest('[role=\"tablist\"]')?.querySelectorAll<HTMLElement>('[role=\"tab\"]') ?? [])];\n const index = triggers.indexOf(trigger);\n (triggers[index + 1] ?? triggers[index - 1])?.focus();\n onClose?.();\n }\n onKeyDown?.(event);\n };\n\n const trailing = showTrailing ? (\n <chakra.span\n position=\"relative\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n boxSize=\"24\"\n flexShrink={0}\n >\n {changed && (\n <chakra.span\n position=\"absolute\"\n inset={0}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n pointerEvents=\"none\"\n transition=\"opacity 0.1s\"\n _groupHover={closable ? { opacity: 0 } : undefined}\n _groupFocusWithin={closable ? { opacity: 0 } : undefined}\n >\n <chakra.span boxSize=\"8\" borderRadius=\"full\" backgroundColor=\"interactive/bold\" />\n </chakra.span>\n )}\n {closable && (\n <chakra.span\n aria-hidden\n tabIndex={-1}\n onClick={handleCloseClick}\n css={closeButtonRecipe({ size: 'xs' })}\n position=\"absolute\"\n inset={0}\n color=\"icon/primary\"\n opacity={revealCloseOnInteraction ? 0 : 1}\n pointerEvents={revealCloseOnInteraction ? 'none' : 'auto'}\n transition=\"opacity 0.1s\"\n _groupHover={revealCloseOnInteraction ? revealOnInteraction : undefined}\n _groupFocusWithin={revealCloseOnInteraction ? revealOnInteraction : undefined}\n >\n <IconCross size=\"16\" />\n </chakra.span>\n )}\n </chakra.span>\n ) : null;\n\n return (\n <Tabs.Trigger\n ref={ref}\n {...rest}\n className={mergedClassName}\n gap={showTrailing ? '12' : undefined}\n onKeyDown={handleTriggerKeyDown}\n paddingInlineEnd={showTrailing ? '12' : undefined}\n >\n {variant === 'line' ? (\n <>\n <Box display=\"flex\" alignItems=\"center\" gap=\"8\">\n {Icon && <Icon size=\"24\" />}\n {children}\n {badge}\n </Box>\n {trailing}\n </>\n ) : (\n <>\n <Box display=\"flex\" gap=\"16\">\n {children}\n {Icon && <Icon size=\"24\" />}\n </Box>\n {!!secondaryText && (\n <Text as=\"span\" textStyle=\"body/md/regular\" color={rest.disabled ? 'text/on-disabled' : 'text/secondary'}>\n {secondaryText}\n </Text>\n )}\n {trailing}\n </>\n )}\n </Tabs.Trigger>\n );\n});\n\nTrigger.displayName = 'BitkitTabs.Trigger';\n\nconst BitkitTabs: Omit<typeof Tabs, 'Root' | 'Trigger'> & { Root: typeof Root; Trigger: typeof Trigger } = {\n ...Tabs,\n Root,\n Trigger,\n};\n\nBitkitTabs.Content.displayName = 'BitkitTabs.Content';\nBitkitTabs.List.displayName = 'BitkitTabs.List';\nBitkitTabs.ContentGroup.displayName = 'BitkitTabs.ContentGroup';\nBitkitTabs.Root.displayName = 'BitkitTabs.Root';\n\nexport default BitkitTabs;\n"],"mappings":"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"}
|
|
@@ -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
|
|
9
|
+
declare const BitkitTag: (props: BitkitTagProps) => import("react").JSX.Element;
|
|
10
10
|
export default BitkitTag;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const BitkitToaster: () => import("react
|
|
1
|
+
declare const BitkitToaster: () => import("react").JSX.Element;
|
|
2
2
|
export default BitkitToaster;
|
|
@@ -17,7 +17,7 @@ export type BitkitTooltipProps = {
|
|
|
17
17
|
text: string;
|
|
18
18
|
};
|
|
19
19
|
declare const BitkitTooltip: {
|
|
20
|
-
({ button, children, closeOnClick, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, openDelay, placement, text, }: BitkitTooltipProps): import("react
|
|
20
|
+
({ button, children, closeOnClick, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, openDelay, placement, text, }: BitkitTooltipProps): import("react").JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
23
23
|
export default BitkitTooltip;
|
|
@@ -7,7 +7,6 @@ export { default as BitkitBadge, type BitkitBadgeProps } from './BitkitBadge/Bit
|
|
|
7
7
|
export { default as BitkitBreadcrumb, type BitkitBreadcrumbProps } from './BitkitBreadcrumb/BitkitBreadcrumb';
|
|
8
8
|
export { default as BitkitButton, type BitkitButtonProps } from './BitkitButton/BitkitButton';
|
|
9
9
|
export { default as BitkitCalendar, type BitkitCalendarProps } from './BitkitCalendar/BitkitCalendar';
|
|
10
|
-
export { default as BitkitCard } from './BitkitCard/BitkitCard';
|
|
11
10
|
export { default as BitkitCheckbox, type BitkitCheckboxProps } from './BitkitCheckbox/BitkitCheckbox';
|
|
12
11
|
export { default as BitkitCheckboxGroup, type BitkitCheckboxGroupProps, } from './BitkitCheckboxGroup/BitkitCheckboxGroup';
|
|
13
12
|
export { default as BitkitCloseButton, type BitkitCloseButtonProps } from './BitkitCloseButton/BitkitCloseButton';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ColorsBasePage: () => import("react
|
|
1
|
+
declare const ColorsBasePage: () => import("react").JSX.Element;
|
|
2
2
|
export default ColorsBasePage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ColorsComponentPage: () => import("react
|
|
1
|
+
declare const ColorsComponentPage: () => import("react").JSX.Element;
|
|
2
2
|
export default ColorsComponentPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ColorsSystemPage: () => import("react
|
|
1
|
+
declare const ColorsSystemPage: () => import("react").JSX.Element;
|
|
2
2
|
export default ColorsSystemPage;
|
package/dist/docs/Icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const IconsPage: () => import("react
|
|
1
|
+
export declare const IconsPage: () => import("react").JSX.Element;
|
package/dist/docs/Radii.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RadiiPage: () => import("react
|
|
1
|
+
declare const RadiiPage: () => import("react").JSX.Element;
|
|
2
2
|
export default RadiiPage;
|
package/dist/docs/Shadows.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ShadowsPage: () => import("react
|
|
1
|
+
declare const ShadowsPage: () => import("react").JSX.Element;
|
|
2
2
|
export default ShadowsPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SpacingAndSizesPage: () => import("react
|
|
1
|
+
declare const SpacingAndSizesPage: () => import("react").JSX.Element;
|
|
2
2
|
export default SpacingAndSizesPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TextStylesPage: () => import("react
|
|
1
|
+
declare const TextStylesPage: () => import("react").JSX.Element;
|
|
2
2
|
export default TextStylesPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TypographyPage: () => import("react
|
|
1
|
+
declare const TypographyPage: () => import("react").JSX.Element;
|
|
2
2
|
export default TypographyPage;
|
package/dist/docs/shared.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ export declare const flattenTokens: (obj: Record<string, unknown>, prefix?: stri
|
|
|
14
14
|
export declare const slugify: (text: string) => string;
|
|
15
15
|
export declare const ColorPreview: ({ value }: {
|
|
16
16
|
value: string;
|
|
17
|
-
}) => import("react
|
|
17
|
+
}) => import("react").JSX.Element;
|
|
18
18
|
export declare const Section: ({ children, heading, slug }: {
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
heading: string;
|
|
21
21
|
slug?: string;
|
|
22
|
-
}) => import("react
|
|
22
|
+
}) => import("react").JSX.Element;
|
|
23
23
|
type TokenTableRow = {
|
|
24
24
|
preview: ReactNode;
|
|
25
25
|
token: string;
|
|
@@ -27,5 +27,5 @@ type TokenTableRow = {
|
|
|
27
27
|
};
|
|
28
28
|
export declare const TokenTable: ({ rows }: {
|
|
29
29
|
rows: TokenTableRow[];
|
|
30
|
-
}) => import("react
|
|
30
|
+
}) => import("react").JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -8,7 +8,7 @@ export interface ResponsiveState {
|
|
|
8
8
|
export declare const ResponsiveProvider: {
|
|
9
9
|
({ children }: {
|
|
10
10
|
children: ReactNode;
|
|
11
|
-
}): import("react
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
declare const useResponsive: () => ResponsiveState;
|
package/dist/main.js
CHANGED
|
@@ -296,7 +296,6 @@ import BitkitGroupHeading from "./components/BitkitGroupHeading/BitkitGroupHeadi
|
|
|
296
296
|
import BitkitSelectMenuAction from "./components/BitkitSelectMenu/BitkitSelectMenuAction.js";
|
|
297
297
|
import BitkitSelectMenu from "./components/BitkitSelectMenu/BitkitSelectMenu.js";
|
|
298
298
|
import BitkitCalendar from "./components/BitkitCalendar/BitkitCalendar.js";
|
|
299
|
-
import BitkitCard from "./components/BitkitCard/BitkitCard.js";
|
|
300
299
|
import BitkitCheckbox from "./components/BitkitCheckbox/BitkitCheckbox.js";
|
|
301
300
|
import BitkitCheckboxGroup from "./components/BitkitCheckboxGroup/BitkitCheckboxGroup.js";
|
|
302
301
|
import BitkitTooltip from "./components/BitkitTooltip/BitkitTooltip.js";
|
|
@@ -367,4 +366,4 @@ import BitkitTreeView, { createTreeCollection } from "./components/BitkitTreeVie
|
|
|
367
366
|
import useResponsive, { ResponsiveProvider } from "./hooks/useResponsive.js";
|
|
368
367
|
import bitkitTheme from "./theme/index.js";
|
|
369
368
|
import Provider from "./providers/BitkitProvider.js";
|
|
370
|
-
export { BitkitAccordion, BitkitActionBar, BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar,
|
|
369
|
+
export { BitkitAccordion, BitkitActionBar, BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDialogBody, BitkitDialogButtons, BitkitDialogContent, BitkitDialogFormContent, BitkitDialogHeader, BitkitDialogRoot, BitkitDialogStep, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitExpandableRow, BitkitField, BitkitFileInput, BitkitGroupHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPagination, BitkitPaginationLoadMore, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSidebar_default as BitkitSidebar, BitkitSortableColumnHeader, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitSwitch, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitTooltip, BitkitTreeView, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFileDoc, IconFilePdf, IconFilePlist, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUpload, IconValidateShield, IconVideo, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, rem, useResponsive };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChakraProviderProps } from '@chakra-ui/react/styled-system';
|
|
2
|
-
declare const Provider: (props: Omit<ChakraProviderProps, "value">) => import("react
|
|
2
|
+
declare const Provider: (props: Omit<ChakraProviderProps, "value">) => import("react").JSX.Element;
|
|
3
3
|
export default Provider;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.239",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -73,29 +73,29 @@
|
|
|
73
73
|
"@figma-export/output-components-as-svg": "^6.4.0",
|
|
74
74
|
"@figma-export/transform-svg-with-svgo": "^6.4.0",
|
|
75
75
|
"@google-cloud/storage": "^7.19.0",
|
|
76
|
-
"@storybook/addon-docs": "^10.4.
|
|
76
|
+
"@storybook/addon-docs": "^10.4.2",
|
|
77
77
|
"@storybook/addon-mcp": "^0.6.0",
|
|
78
78
|
"@storybook/mcp": "^0.7.0",
|
|
79
|
-
"@storybook/react-vite": "^10.4.
|
|
79
|
+
"@storybook/react-vite": "^10.4.2",
|
|
80
80
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
81
|
-
"@types/node": "^24.
|
|
82
|
-
"@types/react": "^18.3.
|
|
81
|
+
"@types/node": "^24.13.0",
|
|
82
|
+
"@types/react": "^18.3.30",
|
|
83
83
|
"@types/react-dom": "^18.3.7",
|
|
84
84
|
"@vitejs/plugin-react": "^6.0.2",
|
|
85
85
|
"react": "^18.3.1",
|
|
86
86
|
"react-dom": "^18.3.1",
|
|
87
|
-
"release-it": "^20.0
|
|
88
|
-
"storybook": "^10.4.
|
|
89
|
-
"tsx": "^4.22.
|
|
87
|
+
"release-it": "^20.2.0",
|
|
88
|
+
"storybook": "^10.4.2",
|
|
89
|
+
"tsx": "^4.22.4",
|
|
90
90
|
"typescript": "^6.0.3",
|
|
91
|
-
"vite": "^8.0.
|
|
92
|
-
"vite-plugin-dts": "^5.0.
|
|
91
|
+
"vite": "^8.0.16",
|
|
92
|
+
"vite-plugin-dts": "^5.0.2",
|
|
93
93
|
"vite-plugin-svgr": "^5.2.0"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@fontsource-variable/figtree": "^5.2.10",
|
|
97
97
|
"@fontsource-variable/source-code-pro": "^5.2.7",
|
|
98
|
-
"es-toolkit": "^1.
|
|
98
|
+
"es-toolkit": "^1.47.0",
|
|
99
99
|
"react-markdown": "^10.1.0"
|
|
100
100
|
},
|
|
101
101
|
"overrides": {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Card } from "@chakra-ui/react/card";
|
|
4
|
-
//#region lib/components/BitkitCard/BitkitCard.tsx
|
|
5
|
-
var BitkitCard = forwardRef((props, ref) => {
|
|
6
|
-
const { children, ...rest } = props;
|
|
7
|
-
return /* @__PURE__ */ jsx(Card.Root, {
|
|
8
|
-
asChild: true,
|
|
9
|
-
ref,
|
|
10
|
-
...rest,
|
|
11
|
-
children: /* @__PURE__ */ jsx(Card.Body, { children })
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
BitkitCard.displayName = "BitkitCard";
|
|
15
|
-
//#endregion
|
|
16
|
-
export { BitkitCard as default };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=BitkitCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitCard.js","names":[],"sources":["../../../lib/components/BitkitCard/BitkitCard.tsx"],"sourcesContent":["import { Card, type CardRootProps } from '@chakra-ui/react/card';\nimport { forwardRef } from 'react';\n\nconst BitkitCard = forwardRef<HTMLDivElement, CardRootProps>((props, ref) => {\n const { children, ...rest } = props;\n\n return (\n <Card.Root asChild ref={ref} {...rest}>\n <Card.Body>{children}</Card.Body>\n </Card.Root>\n );\n});\n\nBitkitCard.displayName = 'BitkitCard';\n\nexport default BitkitCard;\n"],"mappings":";;;;AAGA,IAAM,aAAa,YAA2C,OAAO,QAAQ;CAC3E,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OACE,oBAAC,KAAK,MAAN;EAAW,SAAA;EAAa;EAAK,GAAI;YAC/B,oBAAC,KAAK,MAAN,EAAY,SAAoB,CAAA;CACvB,CAAA;AAEf,CAAC;AAED,WAAW,cAAc"}
|