colibri-ui 0.7.3 → 0.7.4
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/Button/index.d.ts +1 -1
- package/Button/index.js +5 -2
- package/Button/index.props.d.ts +14 -4
- package/Button/index.props.js +14 -0
- package/Button/styles.js +11 -8
- package/DotsLoader/index.d.ts +5 -0
- package/DotsLoader/package.json +6 -0
- package/DotsLoader/styles.d.ts +15 -0
- package/Theme/breakpoints.d.ts +1 -0
- package/Theme/color.d.ts +51 -46
- package/Theme/color.js +53 -49
- package/Theme/index.d.ts +14 -0
- package/Theme/index.props.d.ts +2 -0
- package/Theme/themes/buenos_aires.d.ts +15 -1
- package/Theme/themes/buenos_aires.js +51 -42
- package/Theme/themes/default.d.ts +15 -1
- package/Theme/themes/default.js +51 -42
- package/Typography/index.d.ts +4 -0
- package/Typography/index.props.d.ts +18 -0
- package/Typography/package.json +6 -0
- package/Typography/styles.d.ts +11 -0
- package/esm/Button/index.d.ts +1 -1
- package/esm/Button/index.js +5 -2
- package/esm/Button/index.props.d.ts +14 -4
- package/esm/Button/index.props.js +14 -0
- package/esm/Button/styles.js +11 -8
- package/esm/DotsLoader/index.d.ts +5 -0
- package/esm/DotsLoader/styles.d.ts +15 -0
- package/esm/Theme/breakpoints.d.ts +1 -0
- package/esm/Theme/color.d.ts +51 -46
- package/esm/Theme/color.js +52 -49
- package/esm/Theme/index.d.ts +14 -0
- package/esm/Theme/index.props.d.ts +2 -0
- package/esm/Theme/themes/buenos_aires.d.ts +15 -1
- package/esm/Theme/themes/buenos_aires.js +12 -4
- package/esm/Theme/themes/default.d.ts +15 -1
- package/esm/Theme/themes/default.js +12 -4
- package/esm/Typography/index.d.ts +4 -0
- package/esm/Typography/index.props.d.ts +18 -0
- package/esm/Typography/styles.d.ts +11 -0
- package/package.json +1 -1
package/Button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type
|
|
2
|
+
import { type IButtonProps } from "./index.props";
|
|
3
3
|
declare const Button: import("react").ForwardRefExoticComponent<IButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export default Button;
|
package/Button/index.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
7
|
var react = require('react');
|
|
8
|
+
var index_props = require('./index.props.js');
|
|
8
9
|
var styles = require('./styles.js');
|
|
9
10
|
|
|
10
11
|
var Button = /*#__PURE__*/react.forwardRef(function (_a, ref) {
|
|
@@ -12,16 +13,18 @@ var Button = /*#__PURE__*/react.forwardRef(function (_a, ref) {
|
|
|
12
13
|
_b = _a.fullWidth,
|
|
13
14
|
fullWidth = _b === void 0 ? false : _b,
|
|
14
15
|
_c = _a.variant,
|
|
15
|
-
variant = _c === void 0 ?
|
|
16
|
+
variant = _c === void 0 ? index_props.VARIANT.DEFAULT : _c,
|
|
16
17
|
iconStart = _a.iconStart,
|
|
17
18
|
iconEnd = _a.iconEnd,
|
|
18
19
|
icon = _a.icon,
|
|
20
|
+
size = _a.size,
|
|
19
21
|
children = _a.children,
|
|
20
22
|
onClick = _a.onClick,
|
|
21
|
-
props = tslib.__rest(_a, ["className", "fullWidth", "variant", "iconStart", "iconEnd", "icon", "children", "onClick"]);
|
|
23
|
+
props = tslib.__rest(_a, ["className", "fullWidth", "variant", "iconStart", "iconEnd", "icon", "size", "children", "onClick"]);
|
|
22
24
|
return jsxRuntime.jsxs(styles.StyledButton, tslib.__assign({
|
|
23
25
|
onClick: onClick,
|
|
24
26
|
ref: ref,
|
|
27
|
+
size: size,
|
|
25
28
|
className: className,
|
|
26
29
|
variant: variant,
|
|
27
30
|
icon: icon,
|
package/Button/index.props.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import type { CSSObject } from "@emotion/react";
|
|
3
|
+
export declare enum SIZE {
|
|
4
|
+
S = "s",
|
|
5
|
+
M = "m",
|
|
6
|
+
L = "l"
|
|
7
|
+
}
|
|
8
|
+
export declare enum VARIANT {
|
|
9
|
+
DEFAULT = "default",
|
|
10
|
+
PRIMARY = "primary",
|
|
11
|
+
CLEAR = "clear"
|
|
12
|
+
}
|
|
3
13
|
type BaseStyles = {
|
|
4
14
|
color: CSSObject["color"];
|
|
5
15
|
borderRadius: CSSObject["borderRadius"];
|
|
@@ -25,9 +35,9 @@ export type ButtonBase = {
|
|
|
25
35
|
base: BaseStyles;
|
|
26
36
|
};
|
|
27
37
|
export type ButtonVariant = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
[VARIANT.DEFAULT]: VariantStates;
|
|
39
|
+
[VARIANT.PRIMARY]: VariantStates;
|
|
40
|
+
[VARIANT.CLEAR]: VariantStates;
|
|
31
41
|
};
|
|
32
42
|
export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
33
43
|
variant?: keyof ButtonVariant;
|
|
@@ -35,6 +45,6 @@ export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
35
45
|
icon?: ReactNode;
|
|
36
46
|
iconStart?: ReactNode;
|
|
37
47
|
iconEnd?: ReactNode;
|
|
38
|
-
size?:
|
|
48
|
+
size?: SIZE;
|
|
39
49
|
}
|
|
40
50
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.SIZE = void 0;
|
|
4
|
+
(function (SIZE) {
|
|
5
|
+
SIZE["S"] = "s";
|
|
6
|
+
SIZE["M"] = "m";
|
|
7
|
+
SIZE["L"] = "l";
|
|
8
|
+
})(exports.SIZE || (exports.SIZE = {}));
|
|
9
|
+
exports.VARIANT = void 0;
|
|
10
|
+
(function (VARIANT) {
|
|
11
|
+
VARIANT["DEFAULT"] = "default";
|
|
12
|
+
VARIANT["PRIMARY"] = "primary";
|
|
13
|
+
VARIANT["CLEAR"] = "clear";
|
|
14
|
+
})(exports.VARIANT || (exports.VARIANT = {}));
|