colibri-ui 0.7.8 → 0.7.9

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.
Files changed (82) hide show
  1. package/Button/index.props.d.ts +5 -9
  2. package/Button/index.props.js +0 -6
  3. package/Button/styles.d.ts +2 -2
  4. package/Button/styles.js +13 -7
  5. package/Checkbox/index.props.d.ts +2 -2
  6. package/Checkbox/styles.js +8 -8
  7. package/Icons/index.d.ts +0 -2
  8. package/Icons/index.js +0 -4
  9. package/Input/index.d.ts +4 -0
  10. package/Input/index.js +50 -0
  11. package/Input/index.props.d.ts +13 -0
  12. package/Input/package.json +6 -0
  13. package/README.md +2 -0
  14. package/Skeleton/index.d.ts +4 -0
  15. package/Skeleton/index.js +34 -0
  16. package/Skeleton/index.props.d.ts +11 -0
  17. package/Skeleton/package.json +6 -0
  18. package/Skeleton/styles.d.ts +9 -0
  19. package/Skeleton/styles.js +31 -0
  20. package/Theme/index.d.ts +80 -0
  21. package/Theme/index.props.d.ts +2 -0
  22. package/Theme/themes/buenos_aires.d.ts +80 -0
  23. package/Theme/themes/buenos_aires.js +49 -7
  24. package/Theme/themes/default.d.ts +80 -0
  25. package/Theme/themes/default.js +49 -8
  26. package/Typography/index.props.d.ts +4 -7
  27. package/base/FormField/index.d.ts +4 -0
  28. package/base/FormField/index.js +30 -0
  29. package/base/FormField/index.props.d.ts +8 -0
  30. package/base/FormField/styles.d.ts +5 -0
  31. package/base/FormField/styles.js +18 -0
  32. package/base/InputRoot/index.d.ts +4 -0
  33. package/base/InputRoot/index.js +34 -0
  34. package/base/InputRoot/index.props.d.ts +41 -0
  35. package/base/InputRoot/styles.d.ts +27 -0
  36. package/base/InputRoot/styles.js +82 -0
  37. package/esm/Button/index.props.d.ts +5 -9
  38. package/esm/Button/index.props.js +1 -7
  39. package/esm/Button/styles.d.ts +2 -2
  40. package/esm/Button/styles.js +13 -7
  41. package/esm/Checkbox/index.props.d.ts +2 -2
  42. package/esm/Checkbox/styles.js +8 -8
  43. package/esm/Icons/index.d.ts +0 -2
  44. package/esm/Icons/index.js +0 -2
  45. package/esm/Input/index.d.ts +4 -0
  46. package/esm/Input/index.js +46 -0
  47. package/esm/Input/index.props.d.ts +13 -0
  48. package/esm/Skeleton/index.d.ts +4 -0
  49. package/esm/Skeleton/index.js +31 -0
  50. package/esm/Skeleton/index.props.d.ts +11 -0
  51. package/esm/Skeleton/styles.d.ts +9 -0
  52. package/esm/Skeleton/styles.js +24 -0
  53. package/esm/Theme/index.d.ts +80 -0
  54. package/esm/Theme/index.props.d.ts +2 -0
  55. package/esm/Theme/themes/buenos_aires.d.ts +80 -0
  56. package/esm/Theme/themes/buenos_aires.js +49 -8
  57. package/esm/Theme/themes/default.d.ts +80 -0
  58. package/esm/Theme/themes/default.js +49 -9
  59. package/esm/Typography/index.props.d.ts +4 -7
  60. package/esm/base/FormField/index.d.ts +4 -0
  61. package/esm/base/FormField/index.js +26 -0
  62. package/esm/base/FormField/index.props.d.ts +8 -0
  63. package/esm/base/FormField/styles.d.ts +5 -0
  64. package/esm/base/FormField/styles.js +12 -0
  65. package/esm/base/InputRoot/index.d.ts +4 -0
  66. package/esm/base/InputRoot/index.js +30 -0
  67. package/esm/base/InputRoot/index.props.d.ts +41 -0
  68. package/esm/base/InputRoot/styles.d.ts +27 -0
  69. package/esm/base/InputRoot/styles.js +72 -0
  70. package/esm/index.d.ts +2 -0
  71. package/esm/index.js +2 -2
  72. package/index.d.ts +2 -0
  73. package/index.js +12 -11
  74. package/package.json +1 -1
  75. package/Icons/Burger.d.ts +0 -3
  76. package/Icons/Burger.js +0 -22
  77. package/Icons/Check.d.ts +0 -3
  78. package/Icons/Check.js +0 -24
  79. package/esm/Icons/Burger.d.ts +0 -3
  80. package/esm/Icons/Burger.js +0 -18
  81. package/esm/Icons/Check.d.ts +0 -3
  82. package/esm/Icons/Check.js +0 -20
@@ -3,7 +3,6 @@ import Breakpoints from '../breakpoints.js';
3
3
 
4
4
  var ButtonThemeDefault = {
5
5
  base: {
6
- color: Color.BLACK,
7
6
  borderRadius: "26px"
8
7
  },
9
8
  primary: {
@@ -12,12 +11,12 @@ var ButtonThemeDefault = {
12
11
  backgroundColor: Color.PRIMARY_4,
13
12
  borderColor: Color.PRIMARY_4
14
13
  },
15
- hover: {
14
+ hovered: {
16
15
  color: Color.WHITE,
17
16
  backgroundColor: Color.PRIMARY_5,
18
17
  borderColor: Color.PRIMARY_5
19
18
  },
20
- focus: {
19
+ focused: {
21
20
  color: Color.WHITE,
22
21
  backgroundColor: Color.PRIMARY_5,
23
22
  borderColor: Color.PRIMARY_5
@@ -39,12 +38,12 @@ var ButtonThemeDefault = {
39
38
  backgroundColor: Color.SECONDARY_4,
40
39
  borderColor: Color.SECONDARY_4
41
40
  },
42
- hover: {
41
+ hovered: {
43
42
  color: Color.WHITE,
44
43
  backgroundColor: Color.SECONDARY_5,
45
44
  borderColor: Color.SECONDARY_5
46
45
  },
47
- focus: {
46
+ focused: {
48
47
  color: Color.WHITE,
49
48
  backgroundColor: Color.SECONDARY_5,
50
49
  borderColor: Color.SECONDARY_5
@@ -66,7 +65,7 @@ var ButtonThemeDefault = {
66
65
  backgroundColor: Color.WHITE,
67
66
  borderColor: Color.WHITE
68
67
  },
69
- hover: {
68
+ hovered: {
70
69
  color: Color.TRETIARY_5,
71
70
  backgroundColor: Color.TRETIARY_2,
72
71
  borderColor: Color.TRETIARY_2
@@ -83,15 +82,52 @@ var ButtonThemeDefault = {
83
82
  }
84
83
  }
85
84
  };
85
+ var InputThemeDefault = {
86
+ placeholder: {
87
+ color: Color.BG_2
88
+ },
89
+ primary: {
90
+ normal: {
91
+ borderColor: Color.BG_3
92
+ },
93
+ hovered: {
94
+ borderColor: Color.PRIMARY_3,
95
+ boxShadow: "0px 0px 0px 2px ".concat(Color.PRIMARY_2)
96
+ },
97
+ focused: {
98
+ borderColor: Color.PRIMARY_4
99
+ },
100
+ disabled: {
101
+ color: Color.BG_3,
102
+ backgroundColor: Color.BG_1,
103
+ borderColor: Color.BG_3
104
+ },
105
+ error: {
106
+ normal: {
107
+ backgroundColor: Color.TRETIARY_2,
108
+ borderColor: Color.ALERT
109
+ },
110
+ hovered: {
111
+ backgroundColor: Color.WHITE,
112
+ borderColor: Color.ALERT,
113
+ boxShadow: "0px 0px 0px 2px ".concat(Color.TRETIARY_2)
114
+ },
115
+ focused: {
116
+ backgroundColor: Color.WHITE,
117
+ borderColor: Color.ALERT
118
+ }
119
+ }
120
+ }
121
+ };
86
122
  var CheckboxThemeDefault = {
87
123
  primary: {
88
124
  normal: {
89
125
  backgroundColor: Color.PRIMARY_4
90
126
  },
91
- hover: {
127
+ hovered: {
92
128
  backgroundColor: Color.PRIMARY_4
93
129
  },
94
- focus: {
130
+ focused: {
95
131
  boxShadow: "0 0 0 2px ".concat(Color.PRIMARY_1)
96
132
  },
97
133
  checked: {
@@ -113,6 +149,9 @@ var TypographyThemeDefault = {
113
149
  },
114
150
  success: {
115
151
  color: Color.SUCCESS
152
+ },
153
+ secondary: {
154
+ color: Color.BG_3
116
155
  }
117
156
  };
118
157
  var SwitchThemeDefault = {
@@ -133,10 +172,11 @@ var SwitchThemeDefault = {
133
172
  var THEME_DEFAULT = {
134
173
  breakpoints: Breakpoints,
135
174
  button: ButtonThemeDefault,
175
+ input: InputThemeDefault,
136
176
  checkbox: CheckboxThemeDefault,
137
177
  typography: TypographyThemeDefault,
138
178
  "switch": SwitchThemeDefault,
139
179
  palette: Color
140
180
  };
141
181
 
142
- export { ButtonThemeDefault, CheckboxThemeDefault, SwitchThemeDefault, THEME_DEFAULT, TypographyThemeDefault };
182
+ export { ButtonThemeDefault, CheckboxThemeDefault, InputThemeDefault, SwitchThemeDefault, THEME_DEFAULT, TypographyThemeDefault };
@@ -1,18 +1,15 @@
1
1
  import type { CSSObject } from "@emotion/react";
2
- export declare enum VARIANT {
3
- ALERT = "alert",
4
- SUCCESS = "success"
5
- }
6
2
  type VariantStyles = {
7
3
  color?: CSSObject["color"];
8
4
  };
9
5
  export type TypographyVariant = {
10
- [VARIANT.ALERT]: VariantStyles;
11
- [VARIANT.SUCCESS]: VariantStyles;
6
+ alert: VariantStyles;
7
+ success: VariantStyles;
8
+ secondary: VariantStyles;
12
9
  };
13
10
  export type TypographyFontWeight = "normal" | "medium" | "bold";
14
11
  export type TypographySize = "xs" | "s" | "m" | "l" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
15
- export type TypographyTag = "span" | "legend" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s";
12
+ export type TypographyTag = "span" | "label" | "legend" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s";
16
13
  export type TypographyProps = {
17
14
  className?: string;
18
15
  tag?: TypographyTag;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { FormFieldProps } from "./index.props";
3
+ declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default FormField;
@@ -0,0 +1,26 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import Typography from '../../Typography/index.js';
4
+ import { BaseContainer } from './styles.js';
5
+
6
+ var FormField = /*#__PURE__*/forwardRef(function (_a, ref) {
7
+ var label = _a.label,
8
+ hint = _a.hint,
9
+ children = _a.children,
10
+ error = _a.error,
11
+ className = _a.className;
12
+ return jsxs(BaseContainer, {
13
+ className: className,
14
+ ref: ref,
15
+ children: [label && jsx(Typography, {
16
+ tag: "label",
17
+ children: label
18
+ }), children, hint && jsx(Typography, {
19
+ variant: error ? "alert" : "secondary",
20
+ tag: "span",
21
+ children: hint
22
+ })]
23
+ });
24
+ });
25
+
26
+ export { FormField as default };
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from "react";
2
+ export type FormFieldProps = {
3
+ label?: ReactNode;
4
+ hint?: ReactNode;
5
+ error?: boolean;
6
+ className?: string;
7
+ children: ReactNode;
8
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const BaseContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,12 @@
1
+ import _styled from '@emotion/styled/base';
2
+ import { __makeTemplateObject } from 'tslib';
3
+
4
+ var BaseContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
5
+ target: "ex9vcr90"
6
+ } : {
7
+ target: "ex9vcr90",
8
+ label: "BaseContainer"
9
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuZXhwb3J0IHZhciBCYXNlQ29udGFpbmVyID0gc3R5bGVkLmRpdih0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSwgW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSkpKTtcbnZhciB0ZW1wbGF0ZU9iamVjdF8xO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdfQ== */")], ["\n display: flex;\n flex-direction: column;\n gap: 8px;\n" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuZXhwb3J0IHZhciBCYXNlQ29udGFpbmVyID0gc3R5bGVkLmRpdih0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSwgW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSkpKTtcbnZhciB0ZW1wbGF0ZU9iamVjdF8xO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdfQ== */")])));
10
+ var templateObject_1;
11
+
12
+ export { BaseContainer };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { InputProps } from "./index.props";
3
+ declare const InputRoot: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default InputRoot;
@@ -0,0 +1,30 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { BaseInputRoot, BaseIcon, BaseDisableWrapper } from './styles.js';
4
+
5
+ var InputRoot = /*#__PURE__*/forwardRef(function (_a, ref) {
6
+ var className = _a.className,
7
+ startIcon = _a.startIcon,
8
+ endIcon = _a.endIcon,
9
+ children = _a.children,
10
+ _b = _a.variant,
11
+ variant = _b === void 0 ? "primary" : _b,
12
+ disabled = _a.disabled,
13
+ error = _a.error,
14
+ size = _a.size;
15
+ return jsxs(BaseInputRoot, {
16
+ ref: ref,
17
+ className: className,
18
+ variant: variant,
19
+ isError: error ? 1 : 0,
20
+ disabled: disabled,
21
+ size: size,
22
+ children: [startIcon && jsx(BaseIcon, {
23
+ children: startIcon
24
+ }), children, endIcon && jsx(BaseIcon, {
25
+ children: endIcon
26
+ }), disabled && jsx(BaseDisableWrapper, {})]
27
+ });
28
+ });
29
+
30
+ export { InputRoot as default };
@@ -0,0 +1,41 @@
1
+ import type { CSSObject } from "@emotion/react";
2
+ import type { ReactNode } from "react";
3
+ export type InputSize = "s" | "m" | "l";
4
+ type VariantStyles = {
5
+ color?: CSSObject["color"];
6
+ backgroundColor?: CSSObject["backgroundColor"];
7
+ borderColor?: CSSObject["borderColor"];
8
+ boxShadow?: CSSObject["boxShadow"];
9
+ };
10
+ type PlaceholderStyles = {
11
+ color?: CSSObject["color"];
12
+ };
13
+ type VariantStates = {
14
+ normal?: VariantStyles;
15
+ hovered?: VariantStyles;
16
+ focused?: VariantStyles;
17
+ active?: VariantStyles;
18
+ disabled?: VariantStyles;
19
+ error?: {
20
+ normal?: VariantStyles;
21
+ hovered?: VariantStyles;
22
+ focused?: VariantStyles;
23
+ };
24
+ };
25
+ export type InputVariant = {
26
+ primary: VariantStates;
27
+ };
28
+ export type PlaceholderProps = {
29
+ placeholder: PlaceholderStyles;
30
+ };
31
+ export type InputProps = {
32
+ variant?: keyof InputVariant;
33
+ disabled: boolean;
34
+ error?: boolean;
35
+ className?: string;
36
+ startIcon?: ReactNode;
37
+ endIcon?: ReactNode;
38
+ children: ReactNode;
39
+ size?: InputSize;
40
+ };
41
+ export {};
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { InputSize, InputVariant } from "./index.props";
3
+ export declare const BaseInputRoot: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ } & {
7
+ disabled: boolean;
8
+ isError?: number | undefined;
9
+ size?: InputSize | undefined;
10
+ variant: keyof InputVariant;
11
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
+ export declare const BaseInput: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
15
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
+ export declare const BasePlaceholder: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
20
+ export declare const BaseIcon: import("@emotion/styled").StyledComponent<{
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
23
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
24
+ export declare const BaseDisableWrapper: import("@emotion/styled").StyledComponent<{
25
+ theme?: import("@emotion/react").Theme | undefined;
26
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
27
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;