@easypost/easy-ui 1.0.0-alpha.0
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/Button.d.ts +27 -0
- package/Button/Button.d.ts.map +1 -0
- package/Button/Button.test.d.ts +2 -0
- package/Button/Button.test.d.ts.map +1 -0
- package/Button/index.d.ts +2 -0
- package/Button/index.d.ts.map +1 -0
- package/Button/index.js +1 -0
- package/Button/index.mjs +49 -0
- package/Button/utilities.d.ts +5 -0
- package/Button/utilities.d.ts.map +1 -0
- package/Button.module-115ca683.mjs +818 -0
- package/Button.module-14fa8511.js +1 -0
- package/Button.module-1fb91980.js +1 -0
- package/Button.module-494257e9.js +1 -0
- package/Button.module-5cc363bc.js +1 -0
- package/Button.module-5ce97013.mjs +818 -0
- package/Button.module-607d5623.mjs +818 -0
- package/Button.module-679f6b64.js +1 -0
- package/Button.module-7023bed7.mjs +818 -0
- package/Button.module-77f21f0f.mjs +818 -0
- package/Button.module-7d974638.mjs +818 -0
- package/Button.module-7f3d0216.js +1 -0
- package/Button.module-82af93cc.mjs +818 -0
- package/Button.module-9123c201.mjs +818 -0
- package/Button.module-91cfa338.js +1 -0
- package/Button.module-942c4274.js +1 -0
- package/Button.module-94a630d2.js +1 -0
- package/Button.module-a2c386c5.mjs +818 -0
- package/Button.module-aa9387fb.js +1 -0
- package/Button.module-baa496d5.mjs +818 -0
- package/DropdownButton/DropdownButton.d.ts +15 -0
- package/DropdownButton/DropdownButton.d.ts.map +1 -0
- package/DropdownButton/DropdownButton.test.d.ts +2 -0
- package/DropdownButton/DropdownButton.test.d.ts.map +1 -0
- package/DropdownButton/index.d.ts +2 -0
- package/DropdownButton/index.d.ts.map +1 -0
- package/DropdownButton/index.js +1 -0
- package/DropdownButton/index.mjs +40 -0
- package/Icon/Icon.d.ts +17 -0
- package/Icon/Icon.d.ts.map +1 -0
- package/Icon/Icon.test.d.ts +2 -0
- package/Icon/Icon.test.d.ts.map +1 -0
- package/Icon/index.d.ts +2 -0
- package/Icon/index.d.ts.map +1 -0
- package/Icon/index.js +1 -0
- package/Icon/index.mjs +6 -0
- package/Icon-0c035f66.mjs +30 -0
- package/Icon-1b63144c.js +1 -0
- package/Icon-37ce3d9a.mjs +30 -0
- package/Icon-53acbca3.mjs +30 -0
- package/Icon-5639942d.js +1 -0
- package/Icon-570b5898.js +1 -0
- package/Icon-666c3de5.js +1 -0
- package/Icon-68936d33.mjs +30 -0
- package/Icon-6abef12c.mjs +30 -0
- package/Icon-8baad3e8.js +1 -0
- package/Icon-8d3de3bb.js +1 -0
- package/Icon-96d00995.mjs +30 -0
- package/Icon-98a40b01.mjs +30 -0
- package/Icon-aa3be33e.js +1 -0
- package/Icon-d82e92cf.js +1 -0
- package/Icon-da4359df.mjs +30 -0
- package/Icon-e3fea9c2.mjs +30 -0
- package/Icon-e457e65d.js +1 -0
- package/Icon-eacb00d7.js +1 -0
- package/Icon-fea6a93a.mjs +30 -0
- package/Placeholder/Placeholder.d.ts +15 -0
- package/Placeholder/Placeholder.d.ts.map +1 -0
- package/Placeholder/Placeholder.test.d.ts +2 -0
- package/Placeholder/Placeholder.test.d.ts.map +1 -0
- package/Placeholder/index.d.ts +2 -0
- package/Placeholder/index.d.ts.map +1 -0
- package/Placeholder/index.js +1 -0
- package/Placeholder/index.mjs +65 -0
- package/Provider/Provider.d.ts +10 -0
- package/Provider/Provider.d.ts.map +1 -0
- package/Provider/index.d.ts +2 -0
- package/Provider/index.d.ts.map +1 -0
- package/Provider/index.js +1 -0
- package/Provider/index.mjs +9 -0
- package/Text/Text.d.ts +70 -0
- package/Text/Text.d.ts.map +1 -0
- package/Text/Text.test.d.ts +2 -0
- package/Text/Text.test.d.ts.map +1 -0
- package/Text/index.d.ts +2 -0
- package/Text/index.d.ts.map +1 -0
- package/Text/index.js +1 -0
- package/Text/index.mjs +60 -0
- package/Theme/Container.d.ts +6 -0
- package/Theme/Container.d.ts.map +1 -0
- package/Theme/Theme.d.ts +63 -0
- package/Theme/Theme.d.ts.map +1 -0
- package/Theme/Theme.test.d.ts +2 -0
- package/Theme/Theme.test.d.ts.map +1 -0
- package/Theme/index.d.ts +2 -0
- package/Theme/index.d.ts.map +1 -0
- package/Theme/index.js +1 -0
- package/Theme/index.mjs +8 -0
- package/Theme-0f0cbd77.mjs +396 -0
- package/Theme-122e766e.mjs +63 -0
- package/Theme-141dde98.js +7 -0
- package/Theme-161aed4a.mjs +389 -0
- package/Theme-1644b1f8.js +1 -0
- package/Theme-1a567898.js +18 -0
- package/Theme-2364878e.js +33 -0
- package/Theme-5ea4ba90.js +5 -0
- package/Theme-6ff68130.mjs +3764 -0
- package/Theme-93ca6374.js +18 -0
- package/Theme-e616f85f.mjs +57 -0
- package/Theme-f6215b48.mjs +375 -0
- package/package.json +19 -0
- package/style.css +1 -0
- package/styles/ezui-theme.scss.js +1 -0
- package/styles/ezui-theme.scss.mjs +4 -0
- package/theme.css +13 -0
- package/tokens-19a34c03.js +1 -0
- package/tokens-32b892de.mjs +192 -0
- package/tokens-4571c29d.js +1 -0
- package/tokens-713623f4.mjs +210 -0
- package/tokens-e7406ce6.js +1 -0
- package/tokens-ecab3956.mjs +196 -0
- package/types.d.ts +16 -0
- package/types.d.ts.map +1 -0
- package/utilities/css.d.ts +21 -0
- package/utilities/css.d.ts.map +1 -0
- package/utilities/css.js +1 -0
- package/utilities/css.mjs +47 -0
- package/utilities/css.test.d.ts +2 -0
- package/utilities/css.test.d.ts.map +1 -0
- package/utilities/css.test.js +1 -0
- package/utilities/css.test.mjs +56 -0
- package/utilities/storybook.d.ts +33 -0
- package/utilities/storybook.d.ts.map +1 -0
- package/utilities/storybook.js +1 -0
- package/utilities/storybook.mjs +33 -0
- package/utilities/tokens.d.ts +2 -0
- package/utilities/tokens.d.ts.map +1 -0
- package/utilities/tokens.js +1 -0
- package/utilities/tokens.mjs +9 -0
- package/utilities/tokens.test.d.ts +2 -0
- package/utilities/tokens.test.d.ts.map +1 -0
- package/utilities/types.d.ts +7 -0
- package/utilities/types.d.ts.map +1 -0
- package/utilities/types.js +1 -0
- package/utilities/types.mjs +1 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { IconProps } from "../Icon";
|
|
3
|
+
export type ButtonColor = "primary" | "secondary" | "success" | "warning" | "neutral" | "support" | "inverse";
|
|
4
|
+
export type ButtonVariant = "filled" | "outlined" | "link";
|
|
5
|
+
export type ButtonSize = "sm" | "md";
|
|
6
|
+
export type ButtonProps = {
|
|
7
|
+
/** Button color */
|
|
8
|
+
color?: ButtonColor;
|
|
9
|
+
/** Button variant */
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
/** Button size */
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
/** Disables button */
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
/** Button will grow to width of container */
|
|
16
|
+
isBlock?: boolean;
|
|
17
|
+
/** Positions icon before children */
|
|
18
|
+
iconAtStart?: ReactElement<IconProps>;
|
|
19
|
+
/** Positions icon after children */
|
|
20
|
+
iconAtEnd?: ReactElement<IconProps>;
|
|
21
|
+
/** Content inside button */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/** Link's destination */
|
|
24
|
+
href?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function Button(props: ButtonProps): JSX.Element;
|
|
27
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMpC,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG;IACxB,mBAAmB;IACnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,qBAAqB;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kBAAkB;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sBAAsB;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,WAAW,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACtC,oCAAoC;IACpC,SAAS,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACpC,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,eAiDxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../src/Button/Button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/Button/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("../utilities/css.js"),t=require("../Button.module-1fb91980.js");function f(c){const{color:i="primary",variant:s="filled",size:m="md",isDisabled:d=!1,isBlock:B=!1,iconAtStart:o=null,iconAtEnd:a=null,children:y="Button",href:S=""}=c,r=e.useRef(null),u=S?"a":"button",{buttonProps:b}=t.$701a24aa0da5b062$export$ea18c227d4417cc3({...c,elementType:u},r),l=(a||o)&&s!=="link"&&m!=="sm";return t.logWarningIfInvalidColorVariantCombination(i,s),e.createElement(u,{disabled:d,ref:r,className:n.classNames(t.commonButtonStyles.Button,t.commonButtonStyles[n.variationName("color",i)],t.commonButtonStyles[n.variationName("variant",s)],t.commonButtonStyles[n.variationName("size",m)],B&&t.commonButtonStyles.block),...b},o&&l&&e.cloneElement(o),e.createElement("span",{className:n.classNames(o&&l&&t.commonButtonStyles.iconAtStart,a&&l&&t.commonButtonStyles.iconAtEnd)},y),a&&l&&e.cloneElement(a))}exports.Button=f;
|
package/Button/index.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import a, { useRef as B } from "react";
|
|
2
|
+
import { classNames as d, variationName as c } from "../utilities/css.mjs";
|
|
3
|
+
import { $ as v, l as N, c as t } from "../Button.module-5ce97013.mjs";
|
|
4
|
+
function I(s) {
|
|
5
|
+
const {
|
|
6
|
+
color: r = "primary",
|
|
7
|
+
variant: l = "filled",
|
|
8
|
+
size: i = "md",
|
|
9
|
+
isDisabled: f = !1,
|
|
10
|
+
isBlock: p = !1,
|
|
11
|
+
iconAtStart: n = null,
|
|
12
|
+
iconAtEnd: e = null,
|
|
13
|
+
children: b = "Button",
|
|
14
|
+
href: E = ""
|
|
15
|
+
} = s, m = B(null), u = E ? "a" : "button", { buttonProps: A } = v(
|
|
16
|
+
{ ...s, elementType: u },
|
|
17
|
+
m
|
|
18
|
+
), o = (e || n) && l !== "link" && i !== "sm";
|
|
19
|
+
return N(r, l), /* @__PURE__ */ a.createElement(
|
|
20
|
+
u,
|
|
21
|
+
{
|
|
22
|
+
disabled: f,
|
|
23
|
+
ref: m,
|
|
24
|
+
className: d(
|
|
25
|
+
t.Button,
|
|
26
|
+
t[c("color", r)],
|
|
27
|
+
t[c("variant", l)],
|
|
28
|
+
t[c("size", i)],
|
|
29
|
+
p && t.block
|
|
30
|
+
),
|
|
31
|
+
...A
|
|
32
|
+
},
|
|
33
|
+
n && o && a.cloneElement(n),
|
|
34
|
+
/* @__PURE__ */ a.createElement(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
className: d(
|
|
38
|
+
n && o && t.iconAtStart,
|
|
39
|
+
e && o && t.iconAtEnd
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
b
|
|
43
|
+
),
|
|
44
|
+
e && o && a.cloneElement(e)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
I as Button
|
|
49
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonColor } from "./Button";
|
|
2
|
+
import { ButtonVariant } from "./Button";
|
|
3
|
+
import { DropdownButtonVariant } from "../DropdownButton";
|
|
4
|
+
export declare function logWarningIfInvalidColorVariantCombination(color: ButtonColor, variant: ButtonVariant | DropdownButtonVariant): void;
|
|
5
|
+
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/Button/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,aAAa,GAAG,qBAAqB,GAC7C,IAAI,CAmBN"}
|