@bitrise/bitkit-v2 0.3.74 → 0.3.76

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,9 @@
1
+ import { ActionBarRootProps } from '@chakra-ui/react/action-bar';
2
+ import { ReactNode } from 'react';
3
+ export interface BitkitActionBarProps extends ActionBarRootProps {
4
+ children: ReactNode;
5
+ countValue: number;
6
+ onClose?: () => void;
7
+ }
8
+ declare const BitkitActionBar: (props: BitkitActionBarProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default BitkitActionBar;
@@ -1,7 +1,5 @@
1
1
  import { HTMLChakraProps, RecipeProps } from '@chakra-ui/react/styled-system';
2
- import { ReactElement } from 'react';
3
2
  export interface BitkitCloseButtonProps extends HTMLChakraProps<'button'>, RecipeProps<'closeButton'> {
4
- children?: ReactElement;
5
3
  }
6
4
  declare const BitkitCloseButton: import('react').ForwardRefExoticComponent<BitkitCloseButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
7
5
  export default BitkitCloseButton;
@@ -1,12 +1,23 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { createRecipeContext as o } from "@chakra-ui/react/styled-system";
3
- import e from "../../icons/24x24/IconCross24.js";
4
- const { withContext: i } = o({ key: "closeButton" }), r = i("button", {
5
- defaultProps: {
6
- children: /* @__PURE__ */ t(e, {})
7
- }
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useRecipe as l, chakra as a } from "@chakra-ui/react/styled-system";
3
+ import { forwardRef as c } from "react";
4
+ import n from "../../icons/16x16/IconCross16.js";
5
+ import m from "../../icons/24x24/IconCross24.js";
6
+ const p = c((e, s) => {
7
+ const { size: t, ...r } = e, i = l({ key: "closeButton" });
8
+ return /* @__PURE__ */ o(
9
+ a.button,
10
+ {
11
+ ref: s,
12
+ "aria-label": "Close",
13
+ ...r,
14
+ css: i({ size: t }),
15
+ color: r.colorPalette === "neutral" ? "icon/primary" : void 0,
16
+ children: t === "xs" ? /* @__PURE__ */ o(n, {}) : /* @__PURE__ */ o(m, {})
17
+ }
18
+ );
8
19
  });
9
- r.displayName = "BitkitCloseButton";
20
+ p.displayName = "BitkitCloseButton";
10
21
  export {
11
- r as default
22
+ p as default
12
23
  };
@@ -0,0 +1,19 @@
1
+ import { FieldRootProps } from '@chakra-ui/react/field';
2
+ import { NativeSelectRootProps } from '@chakra-ui/react/native-select';
3
+ import { ReactNode } from 'react';
4
+ import { BitkitFieldProps } from '../BitkitField/BitkitField';
5
+ export interface BitkitSelectProps extends FieldRootProps {
6
+ errorText?: BitkitFieldProps['errorText'];
7
+ helperText?: BitkitFieldProps['helperText'];
8
+ label?: BitkitFieldProps['label'];
9
+ optional?: BitkitFieldProps['optional'];
10
+ placeholder?: string;
11
+ selectProps?: NativeSelectRootProps;
12
+ size?: 'md' | 'lg';
13
+ state?: 'disabled' | 'error' | 'readOnly' | 'warning';
14
+ tooltip?: BitkitFieldProps['tooltip'];
15
+ warningText?: BitkitFieldProps['warningText'];
16
+ children: ReactNode;
17
+ }
18
+ declare const BitkitSelect: import('react').ForwardRefExoticComponent<BitkitSelectProps & import('react').RefAttributes<HTMLDivElement>>;
19
+ export default BitkitSelect;
@@ -0,0 +1,52 @@
1
+ import { jsx as o, jsxs as x } from "react/jsx-runtime";
2
+ import { NativeSelect as n } from "@chakra-ui/react/native-select";
3
+ import { useSlotRecipe as S } from "@chakra-ui/react/styled-system";
4
+ import { forwardRef as y } from "react";
5
+ import k from "../../icons/16x16/IconErrorCircleFilled16.js";
6
+ import F from "../../icons/16x16/IconWarningYellow16.js";
7
+ import b from "../../icons/24x24/IconErrorCircleFilled24.js";
8
+ import B from "../../icons/24x24/IconSelectChevron24.js";
9
+ import C from "../../icons/24x24/IconWarningYellow24.js";
10
+ import N from "../BitkitField/BitkitField.js";
11
+ const R = y((a, d) => {
12
+ const {
13
+ errorText: l,
14
+ helperText: m,
15
+ label: p,
16
+ optional: f,
17
+ placeholder: g,
18
+ selectProps: I,
19
+ size: t = "md",
20
+ state: e,
21
+ tooltip: u,
22
+ warningText: c,
23
+ children: h,
24
+ ...v
25
+ } = a, r = S({ key: "nativeSelect" })(), w = e === "warning" || !!c, s = e === "error" || !!l;
26
+ let i;
27
+ return s ? i = t === "lg" ? /* @__PURE__ */ o(b, { css: r.statusIcon, color: "icon/negative" }) : /* @__PURE__ */ o(k, { css: r.statusIcon, color: "icon/negative" }) : w && (i = t === "lg" ? /* @__PURE__ */ o(C, { css: r.statusIcon, color: "icon/warning" }) : /* @__PURE__ */ o(F, { css: r.statusIcon, color: "icon/warning" })), /* @__PURE__ */ o(
28
+ N,
29
+ {
30
+ disabled: e === "disabled",
31
+ errorText: l,
32
+ helperText: m,
33
+ invalid: s,
34
+ label: p,
35
+ optional: f,
36
+ readOnly: e === "readOnly",
37
+ ref: d,
38
+ tooltip: u,
39
+ warningText: c,
40
+ ...v,
41
+ children: /* @__PURE__ */ x(n.Root, { size: t, ...I, className: "group", children: [
42
+ /* @__PURE__ */ o(n.Field, { placeholder: g, children: h }),
43
+ i,
44
+ /* @__PURE__ */ o(n.Indicator, { children: /* @__PURE__ */ o(B, {}) })
45
+ ] })
46
+ }
47
+ );
48
+ });
49
+ R.displayName = "BitkitSelect";
50
+ export {
51
+ R as default
52
+ };
@@ -3,6 +3,7 @@ export { default as BitkitCloseButton, type BitkitCloseButtonProps } from './Bit
3
3
  export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './BitkitEmptyState/BitkitEmptyState';
4
4
  export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
5
5
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
6
+ export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/BitkitSelect';
6
7
  export { default as BitkitTextField, type BitkitTextFieldProps } from './BitkitTextField/BitkitTextField';
7
8
  export { default as BitkitToggle, type BitkitToggleProps } from './BitkitToggle';
8
9
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';