@bitrise/bitkit-v2 0.3.171 → 0.3.173

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.
@@ -0,0 +1,14 @@
1
+ import { ListRootProps } from '@chakra-ui/react/list';
2
+ import { ReactNode } from 'react';
3
+ export interface BitkitExplainerListProps extends Omit<ListRootProps, 'colorPalette'> {
4
+ children: ReactNode;
5
+ colorPalette?: 'neutral' | 'purple';
6
+ }
7
+ export interface BitkitExplainerListItemProps {
8
+ children: ReactNode;
9
+ helperText?: string;
10
+ }
11
+ declare const _default: import('react').ForwardRefExoticComponent<BitkitExplainerListProps & import('react').RefAttributes<HTMLOListElement>> & {
12
+ Item: import('react').ForwardRefExoticComponent<BitkitExplainerListItemProps & import('react').RefAttributes<HTMLLIElement>>;
13
+ };
14
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import { Box as p } from "@chakra-ui/react/box";
2
+ import { Text as x } from "@chakra-ui/react/text";
3
+ import { forwardRef as a } from "react";
4
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
5
+ import { List as l } from "@chakra-ui/react/list";
6
+ var s = a((r, i) => {
7
+ const { children: t, colorPalette: e = "neutral", size: d = "lg", ...m } = r;
8
+ return /* @__PURE__ */ o(l.Root, {
9
+ ref: i,
10
+ as: "ol",
11
+ colorPalette: e,
12
+ counterReset: "explainer-list",
13
+ size: d,
14
+ ...m,
15
+ children: t
16
+ });
17
+ });
18
+ s.displayName = "BitkitExplainerList";
19
+ var c = a((r, i) => {
20
+ const { children: t, helperText: e } = r;
21
+ return /* @__PURE__ */ n(l.Item, {
22
+ ref: i,
23
+ counterIncrement: "explainer-list",
24
+ gap: e ? "12" : "6",
25
+ marginBlockEnd: e ? "8" : void 0,
26
+ children: [/* @__PURE__ */ o(l.Indicator, {
27
+ _before: { content: "counter(explainer-list)" },
28
+ background: "colorPalette.subtle",
29
+ borderRadius: "50%",
30
+ color: "colorPalette.strong",
31
+ height: e ? "24" : "20",
32
+ overflow: "hidden",
33
+ textStyle: "comp/badge/sm",
34
+ width: e ? "24" : "20"
35
+ }), e ? /* @__PURE__ */ n(p, {
36
+ display: "flex",
37
+ flex: "1",
38
+ flexDirection: "column",
39
+ minWidth: "0",
40
+ children: [t, /* @__PURE__ */ o(x, {
41
+ color: "text/secondary",
42
+ textStyle: "body/md/regular",
43
+ children: e
44
+ })]
45
+ }) : t]
46
+ });
47
+ });
48
+ c.displayName = "BitkitExplainerListItem";
49
+ var k = Object.assign(s, { Item: c });
50
+ export {
51
+ k as default
52
+ };
@@ -0,0 +1,13 @@
1
+ import { ListRootProps } from '@chakra-ui/react/list';
2
+ import { ReactNode } from 'react';
3
+ export interface BitkitOrderedListProps extends ListRootProps {
4
+ children: ReactNode;
5
+ size?: 'lg' | 'md';
6
+ }
7
+ export interface BitkitOrderedListItemProps {
8
+ children: ReactNode;
9
+ }
10
+ declare const _default: import('react').ForwardRefExoticComponent<BitkitOrderedListProps & import('react').RefAttributes<HTMLOListElement>> & {
11
+ Item: import('react').ForwardRefExoticComponent<BitkitOrderedListItemProps & import('react').RefAttributes<HTMLLIElement>>;
12
+ };
13
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { forwardRef as d } from "react";
2
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { List as i } from "@chakra-ui/react/list";
4
+ var o = d((e, t) => {
5
+ const { children: r, size: a = "lg", ...m } = e;
6
+ return /* @__PURE__ */ s(i.Root, {
7
+ ref: t,
8
+ as: "ol",
9
+ counterReset: "ordered-list",
10
+ size: a,
11
+ ...m,
12
+ children: r
13
+ });
14
+ });
15
+ o.displayName = "BitkitOrderedList";
16
+ var n = d((e, t) => {
17
+ const { children: r } = e;
18
+ return /* @__PURE__ */ c(i.Item, {
19
+ ref: t,
20
+ counterIncrement: "ordered-list",
21
+ children: [/* @__PURE__ */ s(i.Indicator, { _before: { content: 'counter(ordered-list) "."' } }), r]
22
+ });
23
+ });
24
+ n.displayName = "BitkitOrderedListItem";
25
+ var p = Object.assign(o, { Item: n });
26
+ export {
27
+ p as default
28
+ };
@@ -0,0 +1,23 @@
1
+ import { FieldRootProps } from '@chakra-ui/react/field';
2
+ import { TagsInput } from '@chakra-ui/react/tags-input';
3
+ import { BitkitFieldProps } from '../BitkitField/BitkitField';
4
+ export interface BitkitTagsInputProps extends Omit<FieldRootProps, 'children' | 'disabled' | 'invalid' | 'readOnly' | 'required'> {
5
+ addOnPaste?: TagsInput.RootProps['addOnPaste'];
6
+ defaultValue?: string[];
7
+ delimiter?: TagsInput.RootProps['delimiter'];
8
+ errorText?: BitkitFieldProps['errorText'];
9
+ helperText?: BitkitFieldProps['helperText'];
10
+ label?: BitkitFieldProps['label'];
11
+ max?: number;
12
+ onValueChange?: TagsInput.RootProps['onValueChange'];
13
+ optional?: BitkitFieldProps['optional'];
14
+ placeholder?: string;
15
+ size?: 'md' | 'lg';
16
+ state?: 'disabled' | 'error' | 'readOnly' | 'warning';
17
+ tooltip?: BitkitFieldProps['tooltip'];
18
+ validate?: TagsInput.RootProps['validate'];
19
+ value?: string[];
20
+ warningText?: BitkitFieldProps['warningText'];
21
+ }
22
+ declare const BitkitTagsInput: import('react').ForwardRefExoticComponent<BitkitTagsInputProps & import('react').RefAttributes<HTMLDivElement>>;
23
+ export default BitkitTagsInput;
@@ -0,0 +1,63 @@
1
+ import I from "../../icons/IconCross.js";
2
+ import P from "../../icons/IconErrorCircleFilled.js";
3
+ import W from "../../icons/IconWarningYellow.js";
4
+ import $ from "../BitkitField/BitkitField.js";
5
+ import { chakra as f, useSlotRecipe as E } from "@chakra-ui/react/styled-system";
6
+ import { forwardRef as H } from "react";
7
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
8
+ import { TagsInput as i } from "@chakra-ui/react/tags-input";
9
+ var N = H((v, u) => {
10
+ const { addOnPaste: x, defaultValue: T, delimiter: k = " ", errorText: g, helperText: y, label: w, max: a, onValueChange: C, optional: b, placeholder: z, size: t = "lg", state: l, tooltip: B, validate: O, value: R, warningText: h, ...j } = v, c = E({ key: "tagsInput" })({ size: t }), D = l === "warning" || !!h, m = l === "error" || !!g, o = l === "disabled", n = l === "readOnly";
11
+ let s;
12
+ return m ? s = /* @__PURE__ */ e(P, {
13
+ color: "icon/negative",
14
+ size: t === "lg" ? "24" : "16"
15
+ }) : D && (s = /* @__PURE__ */ e(W, {
16
+ color: "icon/warning",
17
+ size: t === "lg" ? "24" : "16"
18
+ })), /* @__PURE__ */ e(i.Root, {
19
+ addOnPaste: x,
20
+ defaultValue: T,
21
+ delimiter: k,
22
+ disabled: o,
23
+ invalid: m,
24
+ max: a,
25
+ onValueChange: C,
26
+ readOnly: n,
27
+ size: t,
28
+ validate: O,
29
+ value: R,
30
+ children: /* @__PURE__ */ e(i.Context, { children: ({ value: d }) => /* @__PURE__ */ r($, {
31
+ counterText: a !== void 0 ? `${d.length}/${a}` : void 0,
32
+ disabled: o,
33
+ errorText: g,
34
+ helperText: y,
35
+ invalid: m,
36
+ label: w,
37
+ optional: b,
38
+ readOnly: n,
39
+ ref: u,
40
+ tooltip: B,
41
+ warningText: h,
42
+ ...j,
43
+ children: [/* @__PURE__ */ r(i.Control, { children: [/* @__PURE__ */ r(f.div, {
44
+ css: c.tagsBlock,
45
+ children: [d.map((p, F) => /* @__PURE__ */ r(i.Item, {
46
+ index: F,
47
+ value: p,
48
+ children: [/* @__PURE__ */ r(i.ItemPreview, { children: [/* @__PURE__ */ e(i.ItemText, { children: p }), !n && /* @__PURE__ */ e(i.ItemDeleteTrigger, { children: /* @__PURE__ */ e(I, { size: "16" }) })] }), /* @__PURE__ */ e(i.ItemInput, {})]
49
+ }, p)), /* @__PURE__ */ e(i.Input, { placeholder: z })]
50
+ }), (s || d.length > 0 && !o && !n) && /* @__PURE__ */ r(f.div, {
51
+ css: c.suffixBlock,
52
+ children: [s, d.length > 0 && !o && !n && /* @__PURE__ */ e(i.ClearTrigger, {
53
+ css: c.clearTrigger,
54
+ children: /* @__PURE__ */ e(I, { size: t === "lg" ? "24" : "16" })
55
+ })]
56
+ })] }), /* @__PURE__ */ e(i.HiddenInput, {})]
57
+ }) })
58
+ });
59
+ });
60
+ N.displayName = "BitkitTagsInput";
61
+ export {
62
+ N as default
63
+ };
@@ -0,0 +1,16 @@
1
+ import { ListRootProps } from '@chakra-ui/react/list';
2
+ import { ReactNode } from 'react';
3
+ import { BitkitIconComponent } from '../../icons';
4
+ export interface BitkitUnorderedListProps extends ListRootProps {
5
+ children: ReactNode;
6
+ size?: 'lg' | 'md';
7
+ }
8
+ export interface BitkitUnorderedListItemProps {
9
+ children: ReactNode;
10
+ icon?: BitkitIconComponent;
11
+ iconColor?: string;
12
+ }
13
+ declare const _default: import('react').ForwardRefExoticComponent<BitkitUnorderedListProps & import('react').RefAttributes<HTMLUListElement>> & {
14
+ Item: import('react').ForwardRefExoticComponent<BitkitUnorderedListItemProps & import('react').RefAttributes<HTMLLIElement>>;
15
+ };
16
+ export default _default;
@@ -0,0 +1,46 @@
1
+ import { forwardRef as a } from "react";
2
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
3
+ import { createContext as L } from "@chakra-ui/react";
4
+ import { List as r } from "@chakra-ui/react/list";
5
+ var [I, U] = L({
6
+ name: "UnorderedListContext",
7
+ hookName: "useUnorderedListContext",
8
+ providerName: "<BitkitUnorderedList />"
9
+ }), c = a((d, i) => {
10
+ const { children: o, size: e = "lg", ...n } = d;
11
+ return /* @__PURE__ */ t(I, {
12
+ value: { size: e },
13
+ children: /* @__PURE__ */ t(r.Root, {
14
+ ref: i,
15
+ size: e,
16
+ ...n,
17
+ children: o
18
+ })
19
+ });
20
+ });
21
+ c.displayName = "BitkitUnorderedList";
22
+ var h = {
23
+ lg: "24",
24
+ md: "16"
25
+ }, m = a((d, i) => {
26
+ const { children: o, icon: e, iconColor: n } = d, { size: l } = U();
27
+ return e ? /* @__PURE__ */ s(r.Item, {
28
+ ref: i,
29
+ gap: "8",
30
+ children: [/* @__PURE__ */ t(r.Indicator, {
31
+ color: n ?? "icon/secondary",
32
+ children: /* @__PURE__ */ t(e, { size: h[l] })
33
+ }), o]
34
+ }) : /* @__PURE__ */ s(r.Item, {
35
+ ref: i,
36
+ children: [/* @__PURE__ */ t(r.Indicator, {
37
+ "aria-hidden": !0,
38
+ children: "•"
39
+ }), o]
40
+ });
41
+ });
42
+ m.displayName = "BitkitUnorderedListItem";
43
+ var x = Object.assign(c, { Item: m });
44
+ export {
45
+ x as default
46
+ };
@@ -20,6 +20,7 @@ export { default as BitkitDialogContent, type BitkitDialogContentProps } from '.
20
20
  export { default as BitkitDialogRoot, type BitkitDialogRootProps } from './BitkitDialog/BitkitDialogRoot';
21
21
  export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './BitkitEmptyState/BitkitEmptyState';
22
22
  export { default as BitkitExpandableCard, type BitkitExpandableCardProps, } from './BitkitExpandableCard/BitkitExpandableCard';
23
+ export { default as BitkitExplainerList, type BitkitExplainerListItemProps, type BitkitExplainerListProps, } from './BitkitExplainerList/BitkitExplainerList';
23
24
  export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
24
25
  export { default as BitkitIconButton, type BitkitIconButtonProps } from './BitkitIconButton/BitkitIconButton';
25
26
  export { default as BitkitInlineLoading, type BitkitInlineLoadingProps, } from './BitkitInlineLoading/BitkitInlineLoading';
@@ -29,6 +30,7 @@ export { default as BitkitLink, type BitkitLinkProps } from './BitkitLink/Bitkit
29
30
  export { default as BitkitLinkButton, type BitkitLinkButtonProps } from './BitkitLinkButton/BitkitLinkButton';
30
31
  export { default as BitkitNativeSelect, type BitkitNativeSelectProps } from './BitkitNativeSelect/BitkitNativeSelect';
31
32
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
33
+ export { default as BitkitOrderedList, type BitkitOrderedListItemProps, type BitkitOrderedListProps, } from './BitkitOrderedList/BitkitOrderedList';
32
34
  export { default as BitkitOverflowTooltip, type BitkitOverflowTooltipProps, } from './BitkitOverflowTooltip/BitkitOverflowTooltip';
33
35
  export { default as BitkitRadio, type BitkitRadioProps } from './BitkitRadio/BitkitRadio';
34
36
  export { default as BitkitRadioGroup, type BitkitRadioGroupProps } from './BitkitRadioGroup/BitkitRadioGroup';
@@ -40,7 +42,9 @@ export { default as BitkitSelectMenu, type BitkitSelectMenuProps } from './Bitki
40
42
  export { default as BitkitSplitButton, type BitkitSplitButtonProps } from './BitkitSplitButton/BitkitSplitButton';
41
43
  export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
42
44
  export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
45
+ export { default as BitkitTagsInput, type BitkitTagsInputProps } from './BitkitTagsInput/BitkitTagsInput';
43
46
  export { default as BitkitTextInput, type BitkitTextInputProps } from './BitkitTextInput/BitkitTextInput';
44
47
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
45
48
  export { default as BitkitToggleButton, type BitkitToggleButtonProps } from './BitkitToggleButton/BitkitToggleButton';
46
49
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';
50
+ export { default as BitkitUnorderedList, type BitkitUnorderedListItemProps, type BitkitUnorderedListProps, } from './BitkitUnorderedList/BitkitUnorderedList';