@bitrise/bitkit-v2 0.3.151 → 0.3.153
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/BitkitButton/BitkitButton.d.ts +3 -3
- package/dist/components/BitkitButton/BitkitButton.js +12 -12
- package/dist/components/BitkitCalendar/components/CalendarNextTrigger.js +1 -1
- package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.js +3 -3
- package/dist/components/BitkitDialog/BitkitDialog.d.ts +24 -0
- package/dist/components/BitkitDialog/BitkitDialog.js +50 -0
- package/dist/components/BitkitDialog/BitkitDialogBody.d.ts +9 -0
- package/dist/components/BitkitDialog/BitkitDialogBody.js +53 -0
- package/dist/components/BitkitDialog/BitkitDialogContent.d.ts +11 -0
- package/dist/components/BitkitDialog/BitkitDialogContent.js +29 -0
- package/dist/components/BitkitDialog/BitkitDialogRoot.d.ts +4 -0
- package/dist/components/BitkitDialog/BitkitDialogRoot.js +10 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/main.js +584 -576
- package/dist/theme/recipes/Button.recipe.js +24 -9
- package/dist/theme/recipes/ControlButton.recipe.d.ts +1 -1
- package/dist/theme/recipes/ControlButton.recipe.js +4 -4
- package/dist/theme/recipes/index.d.ts +1 -1
- package/dist/theme/semantic-tokens/semanticColors.js +14 -2
- package/dist/theme/slot-recipes/Dialog.recipe.d.ts +35 -0
- package/dist/theme/slot-recipes/Dialog.recipe.js +171 -0
- package/dist/theme/slot-recipes/NumberInput.recipe.js +1 -1
- package/dist/theme/slot-recipes/index.d.ts +146 -112
- package/dist/theme/slot-recipes/index.js +36 -34
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ButtonProps } from '@chakra-ui/react/button';
|
|
2
2
|
import { BitkitIconComponent } from '../../icons';
|
|
3
|
-
export interface BitkitButtonProps extends Omit<ButtonProps, 'colorPalette' | 'disabled' | 'loading' | 'loadingText' | 'spinner' | 'spinnerPlacement'> {
|
|
3
|
+
export interface BitkitButtonProps extends Omit<ButtonProps, 'children' | 'colorPalette' | 'disabled' | 'loading' | 'loadingText' | 'spinner' | 'spinnerPlacement'> {
|
|
4
4
|
children: string;
|
|
5
|
-
|
|
6
|
-
rightIcon?: BitkitIconComponent;
|
|
5
|
+
icon?: BitkitIconComponent;
|
|
7
6
|
state?: 'disabled' | 'loading' | 'skeleton';
|
|
7
|
+
suffixIcon?: BitkitIconComponent;
|
|
8
8
|
}
|
|
9
9
|
declare const BitkitButton: import('react').ForwardRefExoticComponent<BitkitButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export default BitkitButton;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Skeleton as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
const
|
|
6
|
-
const { children: a,
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
|
|
1
|
+
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Button as f } from "@chakra-ui/react/button";
|
|
3
|
+
import { Skeleton as m } from "@chakra-ui/react/skeleton";
|
|
4
|
+
import { forwardRef as u } from "react";
|
|
5
|
+
const p = u((r, d) => {
|
|
6
|
+
const { children: a, icon: t, size: e, state: o, suffixIcon: n, ...l } = r, s = e === "sm" ? "16" : "24";
|
|
7
|
+
return /* @__PURE__ */ i(m, { asChild: !0, loading: o === "skeleton", children: /* @__PURE__ */ c(f, { disabled: o === "disabled", loading: o === "loading", ref: d, size: e, ...l, children: [
|
|
8
|
+
t && /* @__PURE__ */ i(t, { size: s }),
|
|
9
|
+
/* @__PURE__ */ i("span", { children: a }),
|
|
10
|
+
n && /* @__PURE__ */ i(n, { size: s })
|
|
11
11
|
] }) });
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
p.displayName = "BitkitButton";
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
p as default
|
|
16
16
|
};
|
|
@@ -4,7 +4,7 @@ import o from "../../../icons/IconChevronRight.js";
|
|
|
4
4
|
import { useDatePickerContext as i } from "@ark-ui/react/date-picker";
|
|
5
5
|
const m = () => {
|
|
6
6
|
const t = i();
|
|
7
|
-
return /* @__PURE__ */ r(e, { ...t.getNextTriggerProps(), color: "button/secondary/fg", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
7
|
+
return /* @__PURE__ */ r(e, { ...t.getNextTriggerProps(), color: "button/secondary/fg/text", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
m as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton as
|
|
2
|
+
import { IconButton as e } from "@chakra-ui/react";
|
|
3
3
|
import o from "../../../icons/IconChevronLeft.js";
|
|
4
4
|
import { useDatePickerContext as i } from "@ark-ui/react/date-picker";
|
|
5
5
|
const m = () => {
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
6
|
+
const t = i();
|
|
7
|
+
return /* @__PURE__ */ r(e, { ...t.getPrevTriggerProps(), color: "button/secondary/fg/text", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
m as default
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Dialog } from '@chakra-ui/react/dialog';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface BitkitDialogProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
maxHeight?: string;
|
|
6
|
+
onOpenChange?: (details: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
}) => void;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
preventScroll?: boolean;
|
|
11
|
+
scrollBehavior?: 'inside' | 'outside';
|
|
12
|
+
showScrollGradient?: boolean;
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
trigger?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const BitkitDialog: {
|
|
19
|
+
({ label, maxHeight, onOpenChange, open, title, trigger, children, preventScroll, scrollBehavior, showScrollGradient, size, }: BitkitDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const BitkitDialogActionTrigger: import('react').ForwardRefExoticComponent<Dialog.ActionTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export declare const BitkitDialogFooter: import('react').ForwardRefExoticComponent<Dialog.FooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export default BitkitDialog;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as i } from "@chakra-ui/react/dialog";
|
|
3
|
+
import { Portal as f } from "@chakra-ui/react/portal";
|
|
4
|
+
import k from "./BitkitDialogContent.js";
|
|
5
|
+
import D from "./BitkitDialogRoot.js";
|
|
6
|
+
const h = ({
|
|
7
|
+
label: e,
|
|
8
|
+
maxHeight: l,
|
|
9
|
+
onOpenChange: m,
|
|
10
|
+
open: n,
|
|
11
|
+
title: d,
|
|
12
|
+
trigger: t,
|
|
13
|
+
children: p,
|
|
14
|
+
preventScroll: g,
|
|
15
|
+
scrollBehavior: r,
|
|
16
|
+
showScrollGradient: s,
|
|
17
|
+
size: c
|
|
18
|
+
}) => /* @__PURE__ */ a(
|
|
19
|
+
D,
|
|
20
|
+
{
|
|
21
|
+
open: n,
|
|
22
|
+
preventScroll: g,
|
|
23
|
+
scrollBehavior: r,
|
|
24
|
+
size: c,
|
|
25
|
+
onOpenChange: m,
|
|
26
|
+
children: [
|
|
27
|
+
t && /* @__PURE__ */ o(i.Trigger, { asChild: !0, children: t }),
|
|
28
|
+
/* @__PURE__ */ a(f, { children: [
|
|
29
|
+
/* @__PURE__ */ o(i.Backdrop, {}),
|
|
30
|
+
/* @__PURE__ */ o(i.Positioner, { children: /* @__PURE__ */ o(
|
|
31
|
+
k,
|
|
32
|
+
{
|
|
33
|
+
label: e,
|
|
34
|
+
maxHeight: l,
|
|
35
|
+
scrollBehavior: r,
|
|
36
|
+
showScrollGradient: s,
|
|
37
|
+
title: d,
|
|
38
|
+
children: p
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
41
|
+
] })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
i.ActionTrigger;
|
|
46
|
+
i.Footer;
|
|
47
|
+
h.displayName = "BitkitDialog";
|
|
48
|
+
export {
|
|
49
|
+
h as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dialog } from '@chakra-ui/react/dialog';
|
|
2
|
+
interface DialogBodyContext {
|
|
3
|
+
scrollBehavior: 'inside' | 'outside';
|
|
4
|
+
showScrollGradient: boolean;
|
|
5
|
+
}
|
|
6
|
+
export type BitkitDialogBodyProps = Dialog.BodyProps;
|
|
7
|
+
export declare const DialogBodyContext: import('react').Context<DialogBodyContext>;
|
|
8
|
+
declare const BitkitDialogBody: (props: BitkitDialogBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default BitkitDialogBody;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { Box as d } from "@chakra-ui/react/box";
|
|
3
|
+
import { Dialog as f, useDialogContext as y } from "@chakra-ui/react/dialog";
|
|
4
|
+
import { useSlotRecipe as g, chakra as S } from "@chakra-ui/react/styled-system";
|
|
5
|
+
import { useContext as m, createContext as v, useRef as x, useState as C, useCallback as D, useEffect as k } from "react";
|
|
6
|
+
import w from "../../icons/IconArrowDown.js";
|
|
7
|
+
const B = v({
|
|
8
|
+
scrollBehavior: "outside",
|
|
9
|
+
showScrollGradient: !0
|
|
10
|
+
}), R = ({ children: r, ...n }) => {
|
|
11
|
+
const { showScrollGradient: b } = m(B), c = g({ key: "dialog" })({}), { open: i } = y(), e = x(null), [h, a] = C(!1), s = D(() => {
|
|
12
|
+
const o = e.current;
|
|
13
|
+
if (!o) {
|
|
14
|
+
a(!1);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const l = o.scrollTop >= o.scrollHeight - o.offsetHeight - 1;
|
|
18
|
+
a(!l);
|
|
19
|
+
}, []);
|
|
20
|
+
return k(() => {
|
|
21
|
+
const o = e.current;
|
|
22
|
+
if (!i || !o) return;
|
|
23
|
+
o.addEventListener("scroll", s);
|
|
24
|
+
const l = new ResizeObserver(s);
|
|
25
|
+
return l.observe(o), () => {
|
|
26
|
+
o.removeEventListener("scroll", s), l.disconnect();
|
|
27
|
+
};
|
|
28
|
+
}, [i, s]), /* @__PURE__ */ u(d, { css: c.scrollBody, children: [
|
|
29
|
+
/* @__PURE__ */ t(f.Body, { ref: e, ...n, children: r }),
|
|
30
|
+
h && /* @__PURE__ */ u(p, { children: [
|
|
31
|
+
b && /* @__PURE__ */ t(d, { css: c.scrollGradient }),
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
|
+
S.button,
|
|
34
|
+
{
|
|
35
|
+
"aria-label": "Scroll to bottom",
|
|
36
|
+
css: c.scrollButton,
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: () => {
|
|
39
|
+
e.current?.scrollTo({ top: e.current.scrollHeight, behavior: "smooth" });
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ t(w, { color: "icon/tertiary", size: "16" })
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
}, I = (r) => {
|
|
47
|
+
const { scrollBehavior: n } = m(B);
|
|
48
|
+
return n === "inside" ? /* @__PURE__ */ t(R, { ...r }) : /* @__PURE__ */ t(f.Body, { ...r });
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
B as DialogBodyContext,
|
|
52
|
+
I as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface BitkitDialogContentProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
maxHeight?: string;
|
|
5
|
+
scrollBehavior?: 'inside' | 'outside';
|
|
6
|
+
showScrollGradient?: boolean;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const BitkitDialogContent: ({ label, maxHeight, title, scrollBehavior, showScrollGradient, children, }: BitkitDialogContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default BitkitDialogContent;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Box as m } from "@chakra-ui/react/box";
|
|
3
|
+
import { Dialog as i } from "@chakra-ui/react/dialog";
|
|
4
|
+
import { useSlotRecipe as a, chakra as p } from "@chakra-ui/react/styled-system";
|
|
5
|
+
import f from "../BitkitCloseButton/BitkitCloseButton.js";
|
|
6
|
+
import { DialogBodyContext as h } from "./BitkitDialogBody.js";
|
|
7
|
+
const D = ({
|
|
8
|
+
label: r,
|
|
9
|
+
maxHeight: t,
|
|
10
|
+
title: l,
|
|
11
|
+
scrollBehavior: n = "outside",
|
|
12
|
+
showScrollGradient: s = !0,
|
|
13
|
+
children: c
|
|
14
|
+
}) => {
|
|
15
|
+
const d = a({ key: "dialog" })({});
|
|
16
|
+
return /* @__PURE__ */ e(i.Content, { maxHeight: t, children: /* @__PURE__ */ o(h.Provider, { value: { scrollBehavior: n, showScrollGradient: s }, children: [
|
|
17
|
+
/* @__PURE__ */ o(i.Header, { children: [
|
|
18
|
+
/* @__PURE__ */ o(m, { display: "flex", flexDirection: "column", gap: "4", children: [
|
|
19
|
+
r && /* @__PURE__ */ e(p.p, { css: d.label, children: r }),
|
|
20
|
+
/* @__PURE__ */ e(i.Title, { children: l })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ e(i.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ e(f, { size: "md" }) })
|
|
23
|
+
] }),
|
|
24
|
+
c
|
|
25
|
+
] }) });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
D as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Dialog } from '@chakra-ui/react/dialog';
|
|
2
|
+
export type BitkitDialogRootProps = Dialog.RootProps;
|
|
3
|
+
declare const BitkitDialogRoot: ({ closeOnInteractOutside, preventScroll, ...props }: BitkitDialogRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default BitkitDialogRoot;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as a } from "@chakra-ui/react/dialog";
|
|
3
|
+
const l = ({
|
|
4
|
+
closeOnInteractOutside: o = !1,
|
|
5
|
+
preventScroll: t = !0,
|
|
6
|
+
...i
|
|
7
|
+
}) => /* @__PURE__ */ r(a.Root, { closeOnInteractOutside: o, preventScroll: t, ...i });
|
|
8
|
+
export {
|
|
9
|
+
l as default
|
|
10
|
+
};
|
|
@@ -13,6 +13,10 @@ export { default as BitkitColorButton, type BitkitColorButtonProps } from './Bit
|
|
|
13
13
|
export { default as BitkitCombobox, type BitkitComboboxProps } from './BitkitCombobox/BitkitCombobox';
|
|
14
14
|
export { default as BitkitControlButton, type BitkitControlButtonProps, } from './BitkitControlButton/BitkitControlButton';
|
|
15
15
|
export { default as BitkitDefinitionTooltip, type BitkitDefinitionTooltipProps, } from './BitkitDefinitionTooltip/BitkitDefinitionTooltip';
|
|
16
|
+
export { default as BitkitDialog, type BitkitDialogProps } from './BitkitDialog/BitkitDialog';
|
|
17
|
+
export { default as BitkitDialogBody, type BitkitDialogBodyProps } from './BitkitDialog/BitkitDialogBody';
|
|
18
|
+
export { default as BitkitDialogContent, type BitkitDialogContentProps } from './BitkitDialog/BitkitDialogContent';
|
|
19
|
+
export { default as BitkitDialogRoot, type BitkitDialogRootProps } from './BitkitDialog/BitkitDialogRoot';
|
|
16
20
|
export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './BitkitEmptyState/BitkitEmptyState';
|
|
17
21
|
export { default as BitkitExpandableCard, type BitkitExpandableCardProps, } from './BitkitExpandableCard/BitkitExpandableCard';
|
|
18
22
|
export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
|