@easypost/easy-ui 1.0.0-alpha.4 → 1.0.0-alpha.6
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/Badge/index.js +32 -26
- package/Badge/index.mjs +32 -26
- package/Banner/index.js +15 -16
- package/Banner/index.mjs +15 -16
- package/Button/Button.d.ts +61 -0
- package/Button/Button.d.ts.map +1 -1
- package/Button/index.js +34 -69
- package/Button/index.mjs +33 -68
- package/CHANGELOG.md +21 -0
- package/Card/index.js +84 -5
- package/Card/index.mjs +84 -5
- package/Checkbox/index.js +84 -72
- package/Checkbox/index.mjs +84 -72
- package/CodeBlock/index.js +43 -49
- package/CodeBlock/index.mjs +43 -49
- package/DropdownButton/DropdownButton.d.ts +48 -0
- package/DropdownButton/DropdownButton.d.ts.map +1 -1
- package/DropdownButton/index.js +29 -101
- package/DropdownButton/index.mjs +29 -85
- package/HorizontalGrid/index.js +11 -31
- package/HorizontalGrid/index.mjs +11 -31
- package/HorizontalStack/index.js +48 -4
- package/HorizontalStack/index.mjs +48 -4
- package/Icon/Icon.d.ts +51 -0
- package/Icon/Icon.d.ts.map +1 -1
- package/Icon/index.js +38 -4
- package/Icon/index.mjs +38 -4
- package/IconButton/IconButton.d.ts +62 -0
- package/IconButton/IconButton.d.ts.map +1 -1
- package/IconButton/index.js +26 -43
- package/IconButton/index.mjs +25 -42
- package/InputField/Label.d.ts +2 -2
- package/InputField/index.js +282 -10
- package/InputField/index.mjs +266 -10
- package/InputField/utilities.d.ts +1 -1
- package/InputField/utilities.d.ts.map +1 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/index.js +178 -1958
- package/Menu/index.mjs +168 -1948
- package/Menu/utilities.d.ts +11 -0
- package/Menu/utilities.d.ts.map +1 -0
- package/Notification/index.js +1534 -14
- package/Notification/index.mjs +1518 -14
- package/Provider/index.js +15 -15
- package/Provider/index.mjs +15 -15
- package/RadioGroup/index.js +63 -63
- package/RadioGroup/index.mjs +63 -63
- package/Select/Select.d.ts +88 -0
- package/Select/Select.d.ts.map +1 -0
- package/Select/Select.stories.d.ts +17 -0
- package/Select/Select.stories.d.ts.map +1 -0
- package/Select/Select.test.d.ts +2 -0
- package/Select/Select.test.d.ts.map +1 -0
- package/Select/SelectContext.d.ts +14 -0
- package/Select/SelectContext.d.ts.map +1 -0
- package/Select/SelectField.d.ts +62 -0
- package/Select/SelectField.d.ts.map +1 -0
- package/Select/SelectOption.d.ts +23 -0
- package/Select/SelectOption.d.ts.map +1 -0
- package/Select/SelectOverlay.d.ts +3 -0
- package/Select/SelectOverlay.d.ts.map +1 -0
- package/Select/SelectSection.d.ts +22 -0
- package/Select/SelectSection.d.ts.map +1 -0
- package/Select/SelectTrigger.d.ts +30 -0
- package/Select/SelectTrigger.d.ts.map +1 -0
- package/Select/index.d.ts +2 -0
- package/Select/index.d.ts.map +1 -0
- package/Select/index.js +816 -0
- package/Select/index.mjs +816 -0
- package/SelectorErrorTooltip/index.js +102 -11
- package/SelectorErrorTooltip/index.mjs +86 -11
- package/Text/index.js +85 -4
- package/Text/index.mjs +85 -4
- package/TextField/index.js +19 -38
- package/TextField/index.mjs +19 -38
- package/Textarea/index.js +20 -37
- package/Textarea/index.mjs +20 -37
- package/Theme/index.js +145 -9
- package/Theme/index.mjs +145 -9
- package/Toggle/index.js +51 -50
- package/Toggle/index.mjs +51 -50
- package/Tooltip/index.js +299 -10
- package/Tooltip/index.mjs +299 -10
- package/UnstyledButton/index.js +4 -4
- package/UnstyledButton/index.mjs +3 -3
- package/VerticalStack/index.js +13 -47
- package/VerticalStack/index.mjs +13 -47
- package/__chunks__/ExpandMore400-7c5263a4.mjs +49 -0
- package/__chunks__/ExpandMore400-92646971.js +65 -0
- package/__chunks__/InputIcon-2317befd.mjs +148 -0
- package/__chunks__/InputIcon-d3963cf8.js +147 -0
- package/__chunks__/{import-e7f45c7e.mjs → import-0561e1ba.mjs} +3 -3
- package/__chunks__/{import-b7971a11.mjs → import-19bc38ac.mjs} +72 -34
- package/__chunks__/{import-01299af6.js → import-24a482e1.js} +3 -2
- package/__chunks__/{import-baa3cd0c.mjs → import-29af6941.mjs} +4 -3
- package/__chunks__/{import-0d1b4d93.js → import-2b302763.js} +193 -141
- package/__chunks__/{import-ab878fb6.mjs → import-3d962a94.mjs} +205 -153
- package/__chunks__/{import-86330a7c.mjs → import-6a831ca1.mjs} +16 -15
- package/__chunks__/{import-7545401a.js → import-8b6c0bc7.js} +3 -3
- package/__chunks__/{import-63bf0645.js → import-a1e0f814.js} +47 -9
- package/__chunks__/{import-3ab42f86.js → import-a2023d8f.js} +35 -22
- package/__chunks__/{import-76076ca6.js → import-dea5a24d.js} +15 -14
- package/__chunks__/{import-856e0385.mjs → import-f1f4792a.mjs} +36 -23
- package/__chunks__/{UnstyledButton-883f0c6c.mjs → index-29d7bca9.mjs} +17 -42
- package/__chunks__/{UnstyledButton-96172ec0.js → index-3985350a.js} +17 -42
- package/__chunks__/{overlayscrollbars-react.es-c8369a03.mjs → overlayscrollbars-react.es-7f332a3b.mjs} +4 -4
- package/__chunks__/{overlayscrollbars-react.es-20563393.js → overlayscrollbars-react.es-f2a0bcff.js} +4 -4
- package/__chunks__/{real-module-e4cd2301.mjs → real-module-515df21d.mjs} +1 -1
- package/__chunks__/{real-module-ae2a4342.js → real-module-e36b1436.js} +1 -1
- package/__chunks__/useTriggerWidth-156b038a.js +2030 -0
- package/__chunks__/useTriggerWidth-addcd1d6.mjs +2031 -0
- package/package.json +11 -11
- package/style.css +1423 -1196
- package/utilities/css.js +14 -58
- package/utilities/css.mjs +14 -58
- package/__chunks__/Card-7bbd41e0.mjs +0 -110
- package/__chunks__/Card-dac53c75.js +0 -109
- package/__chunks__/HorizontalStack-a441c63f.mjs +0 -80
- package/__chunks__/HorizontalStack-a862839b.js +0 -79
- package/__chunks__/Icon-3d00481a.js +0 -44
- package/__chunks__/Icon-a75b5201.mjs +0 -45
- package/__chunks__/InputField-4fbaae06.js +0 -487
- package/__chunks__/InputField-a272f602.mjs +0 -472
- package/__chunks__/Notification-b8eafec6.mjs +0 -1456
- package/__chunks__/Notification-c5b34eb3.js +0 -1471
- package/__chunks__/SelectorErrorTooltip-43c5e29e.js +0 -84
- package/__chunks__/SelectorErrorTooltip-b6204987.mjs +0 -69
- package/__chunks__/Text-1ae70c19.js +0 -102
- package/__chunks__/Text-4ae50d5c.mjs +0 -103
- package/__chunks__/Theme-4e498252.mjs +0 -132
- package/__chunks__/Theme-751e5575.js +0 -131
- package/__chunks__/Tooltip-bd55165e.js +0 -317
- package/__chunks__/Tooltip-f7e67b21.mjs +0 -318
package/utilities/css.js
CHANGED
|
@@ -7,87 +7,43 @@ function variationName(name, value) {
|
|
|
7
7
|
return `${name}${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
8
8
|
}
|
|
9
9
|
function sanitizeCustomProperties(styles) {
|
|
10
|
-
const nonNullValues = Object.entries(styles).filter(
|
|
11
|
-
([, value]) => value != null
|
|
12
|
-
);
|
|
10
|
+
const nonNullValues = Object.entries(styles).filter(([, value]) => value != null);
|
|
13
11
|
return nonNullValues.length ? Object.fromEntries(nonNullValues) : void 0;
|
|
14
12
|
}
|
|
15
13
|
function getComponentToken(componentName, componentProp, value) {
|
|
16
14
|
return value ? {
|
|
17
|
-
[`--ezui-c-${tokenSafeKebabCase(componentName)}-${tokenSafeKebabCase(
|
|
18
|
-
componentProp
|
|
19
|
-
)}`]: value
|
|
15
|
+
[`--ezui-c-${tokenSafeKebabCase(componentName)}-${tokenSafeKebabCase(componentProp)}`]: value
|
|
20
16
|
} : {};
|
|
21
17
|
}
|
|
22
18
|
function getComponentDesignToken(componentName, componentProp, tokenSubgroup, token) {
|
|
23
|
-
return getComponentToken(
|
|
24
|
-
componentName,
|
|
25
|
-
componentProp,
|
|
26
|
-
token ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
27
|
-
token
|
|
28
|
-
)})` : void 0
|
|
29
|
-
);
|
|
19
|
+
return getComponentToken(componentName, componentProp, token ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(token)})` : void 0);
|
|
30
20
|
}
|
|
31
21
|
function getComponentThemeToken(componentName, componentProp, tokenSubgroup, token) {
|
|
32
|
-
return getComponentToken(
|
|
33
|
-
componentName,
|
|
34
|
-
componentProp,
|
|
35
|
-
token ? `var(--ezui-t-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
36
|
-
token
|
|
37
|
-
)})` : void 0
|
|
38
|
-
);
|
|
22
|
+
return getComponentToken(componentName, componentProp, token ? `var(--ezui-t-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(token)})` : void 0);
|
|
39
23
|
}
|
|
40
24
|
function getResponsiveDesignToken(componentName, componentProp, tokenSubgroup, responsiveProp) {
|
|
41
25
|
if (!responsiveProp) {
|
|
42
26
|
return {};
|
|
43
27
|
}
|
|
44
28
|
if (typeof responsiveProp === "string") {
|
|
45
|
-
return getComponentToken(
|
|
46
|
-
componentName,
|
|
47
|
-
`${componentProp}-xs`,
|
|
48
|
-
`var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
49
|
-
responsiveProp
|
|
50
|
-
)})`
|
|
51
|
-
);
|
|
29
|
+
return getComponentToken(componentName, `${componentProp}-xs`, `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(responsiveProp)})`);
|
|
52
30
|
}
|
|
53
|
-
return Object.fromEntries(
|
|
54
|
-
Object.entries(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
componentName,
|
|
58
|
-
`${componentProp}-${breakpointAlias}`,
|
|
59
|
-
aliasOrScale ? `var(--ezui-${tokenSafeKebabCase(
|
|
60
|
-
tokenSubgroup
|
|
61
|
-
)}-${tokenSafeKebabCase(aliasOrScale)})` : void 0
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
return tokenEntry;
|
|
65
|
-
}).filter((e) => Boolean(e))
|
|
66
|
-
);
|
|
31
|
+
return Object.fromEntries(Object.entries(responsiveProp).map(([breakpointAlias, aliasOrScale]) => {
|
|
32
|
+
const [tokenEntry] = Object.entries(getComponentToken(componentName, `${componentProp}-${breakpointAlias}`, aliasOrScale ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(aliasOrScale)})` : void 0));
|
|
33
|
+
return tokenEntry;
|
|
34
|
+
}).filter((e) => Boolean(e)));
|
|
67
35
|
}
|
|
68
36
|
function getResponsiveValue(componentName, componentProp, responsiveValue) {
|
|
69
37
|
if (!responsiveValue) {
|
|
70
38
|
return {};
|
|
71
39
|
}
|
|
72
40
|
if (typeof responsiveValue === "string" || typeof responsiveValue === "number") {
|
|
73
|
-
return getComponentToken(
|
|
74
|
-
componentName,
|
|
75
|
-
`${componentProp}-xs`,
|
|
76
|
-
addPxUnitToNumber(responsiveValue)
|
|
77
|
-
);
|
|
41
|
+
return getComponentToken(componentName, `${componentProp}-xs`, addPxUnitToNumber(responsiveValue));
|
|
78
42
|
}
|
|
79
|
-
return Object.fromEntries(
|
|
80
|
-
Object.entries(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
componentName,
|
|
84
|
-
`${componentProp}-${breakpointAlias}`,
|
|
85
|
-
addPxUnitToNumber(responsiveValue2)
|
|
86
|
-
)
|
|
87
|
-
);
|
|
88
|
-
return tokenEntry;
|
|
89
|
-
}).filter((e) => Boolean(e))
|
|
90
|
-
);
|
|
43
|
+
return Object.fromEntries(Object.entries(responsiveValue).map(([breakpointAlias, responsiveValue2]) => {
|
|
44
|
+
const [tokenEntry] = Object.entries(getComponentToken(componentName, `${componentProp}-${breakpointAlias}`, addPxUnitToNumber(responsiveValue2)));
|
|
45
|
+
return tokenEntry;
|
|
46
|
+
}).filter((e) => Boolean(e)));
|
|
91
47
|
}
|
|
92
48
|
function pxToRem(px) {
|
|
93
49
|
return parseInt(String(px), 10) / 16;
|
package/utilities/css.mjs
CHANGED
|
@@ -5,87 +5,43 @@ function variationName(name, value) {
|
|
|
5
5
|
return `${name}${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
6
6
|
}
|
|
7
7
|
function sanitizeCustomProperties(styles) {
|
|
8
|
-
const nonNullValues = Object.entries(styles).filter(
|
|
9
|
-
([, value]) => value != null
|
|
10
|
-
);
|
|
8
|
+
const nonNullValues = Object.entries(styles).filter(([, value]) => value != null);
|
|
11
9
|
return nonNullValues.length ? Object.fromEntries(nonNullValues) : void 0;
|
|
12
10
|
}
|
|
13
11
|
function getComponentToken(componentName, componentProp, value) {
|
|
14
12
|
return value ? {
|
|
15
|
-
[`--ezui-c-${tokenSafeKebabCase(componentName)}-${tokenSafeKebabCase(
|
|
16
|
-
componentProp
|
|
17
|
-
)}`]: value
|
|
13
|
+
[`--ezui-c-${tokenSafeKebabCase(componentName)}-${tokenSafeKebabCase(componentProp)}`]: value
|
|
18
14
|
} : {};
|
|
19
15
|
}
|
|
20
16
|
function getComponentDesignToken(componentName, componentProp, tokenSubgroup, token) {
|
|
21
|
-
return getComponentToken(
|
|
22
|
-
componentName,
|
|
23
|
-
componentProp,
|
|
24
|
-
token ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
25
|
-
token
|
|
26
|
-
)})` : void 0
|
|
27
|
-
);
|
|
17
|
+
return getComponentToken(componentName, componentProp, token ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(token)})` : void 0);
|
|
28
18
|
}
|
|
29
19
|
function getComponentThemeToken(componentName, componentProp, tokenSubgroup, token) {
|
|
30
|
-
return getComponentToken(
|
|
31
|
-
componentName,
|
|
32
|
-
componentProp,
|
|
33
|
-
token ? `var(--ezui-t-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
34
|
-
token
|
|
35
|
-
)})` : void 0
|
|
36
|
-
);
|
|
20
|
+
return getComponentToken(componentName, componentProp, token ? `var(--ezui-t-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(token)})` : void 0);
|
|
37
21
|
}
|
|
38
22
|
function getResponsiveDesignToken(componentName, componentProp, tokenSubgroup, responsiveProp) {
|
|
39
23
|
if (!responsiveProp) {
|
|
40
24
|
return {};
|
|
41
25
|
}
|
|
42
26
|
if (typeof responsiveProp === "string") {
|
|
43
|
-
return getComponentToken(
|
|
44
|
-
componentName,
|
|
45
|
-
`${componentProp}-xs`,
|
|
46
|
-
`var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(
|
|
47
|
-
responsiveProp
|
|
48
|
-
)})`
|
|
49
|
-
);
|
|
27
|
+
return getComponentToken(componentName, `${componentProp}-xs`, `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(responsiveProp)})`);
|
|
50
28
|
}
|
|
51
|
-
return Object.fromEntries(
|
|
52
|
-
Object.entries(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
componentName,
|
|
56
|
-
`${componentProp}-${breakpointAlias}`,
|
|
57
|
-
aliasOrScale ? `var(--ezui-${tokenSafeKebabCase(
|
|
58
|
-
tokenSubgroup
|
|
59
|
-
)}-${tokenSafeKebabCase(aliasOrScale)})` : void 0
|
|
60
|
-
)
|
|
61
|
-
);
|
|
62
|
-
return tokenEntry;
|
|
63
|
-
}).filter((e) => Boolean(e))
|
|
64
|
-
);
|
|
29
|
+
return Object.fromEntries(Object.entries(responsiveProp).map(([breakpointAlias, aliasOrScale]) => {
|
|
30
|
+
const [tokenEntry] = Object.entries(getComponentToken(componentName, `${componentProp}-${breakpointAlias}`, aliasOrScale ? `var(--ezui-${tokenSafeKebabCase(tokenSubgroup)}-${tokenSafeKebabCase(aliasOrScale)})` : void 0));
|
|
31
|
+
return tokenEntry;
|
|
32
|
+
}).filter((e) => Boolean(e)));
|
|
65
33
|
}
|
|
66
34
|
function getResponsiveValue(componentName, componentProp, responsiveValue) {
|
|
67
35
|
if (!responsiveValue) {
|
|
68
36
|
return {};
|
|
69
37
|
}
|
|
70
38
|
if (typeof responsiveValue === "string" || typeof responsiveValue === "number") {
|
|
71
|
-
return getComponentToken(
|
|
72
|
-
componentName,
|
|
73
|
-
`${componentProp}-xs`,
|
|
74
|
-
addPxUnitToNumber(responsiveValue)
|
|
75
|
-
);
|
|
39
|
+
return getComponentToken(componentName, `${componentProp}-xs`, addPxUnitToNumber(responsiveValue));
|
|
76
40
|
}
|
|
77
|
-
return Object.fromEntries(
|
|
78
|
-
Object.entries(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
componentName,
|
|
82
|
-
`${componentProp}-${breakpointAlias}`,
|
|
83
|
-
addPxUnitToNumber(responsiveValue2)
|
|
84
|
-
)
|
|
85
|
-
);
|
|
86
|
-
return tokenEntry;
|
|
87
|
-
}).filter((e) => Boolean(e))
|
|
88
|
-
);
|
|
41
|
+
return Object.fromEntries(Object.entries(responsiveValue).map(([breakpointAlias, responsiveValue2]) => {
|
|
42
|
+
const [tokenEntry] = Object.entries(getComponentToken(componentName, `${componentProp}-${breakpointAlias}`, addPxUnitToNumber(responsiveValue2)));
|
|
43
|
+
return tokenEntry;
|
|
44
|
+
}).filter((e) => Boolean(e)));
|
|
89
45
|
}
|
|
90
46
|
function pxToRem(px) {
|
|
91
47
|
return parseInt(String(px), 10) / 16;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
var __objRest = (source, exclude) => {
|
|
18
|
-
var target = {};
|
|
19
|
-
for (var prop in source)
|
|
20
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
-
target[prop] = source[prop];
|
|
22
|
-
if (source != null && __getOwnPropSymbols)
|
|
23
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
};
|
|
29
|
-
import { o as omit } from "./omit-f17deb8f.mjs";
|
|
30
|
-
import React__default from "react";
|
|
31
|
-
import { classNames, variationName, getComponentThemeToken, getResponsiveDesignToken } from "../utilities/css.mjs";
|
|
32
|
-
const container = "_container_1sq6b_5";
|
|
33
|
-
const area = "_area_1sq6b_22";
|
|
34
|
-
const variantOutlined = "_variantOutlined_1sq6b_58";
|
|
35
|
-
const variantFlagged = "_variantFlagged_1sq6b_59";
|
|
36
|
-
const selected = "_selected_1sq6b_71";
|
|
37
|
-
const disabled = "_disabled_1sq6b_75";
|
|
38
|
-
const statusDanger = "_statusDanger_1sq6b_79";
|
|
39
|
-
const statusWarning = "_statusWarning_1sq6b_83";
|
|
40
|
-
const statusSuccess = "_statusSuccess_1sq6b_87";
|
|
41
|
-
const styles = {
|
|
42
|
-
container,
|
|
43
|
-
area,
|
|
44
|
-
variantOutlined,
|
|
45
|
-
variantFlagged,
|
|
46
|
-
selected,
|
|
47
|
-
disabled,
|
|
48
|
-
statusDanger,
|
|
49
|
-
statusWarning,
|
|
50
|
-
statusSuccess
|
|
51
|
-
};
|
|
52
|
-
const DEFAULT_ELEMENT_TYPE = "div";
|
|
53
|
-
const DEFAULT_VARIANT = "outlined";
|
|
54
|
-
function CardContainer(props) {
|
|
55
|
-
const _a = props, {
|
|
56
|
-
as: As = DEFAULT_ELEMENT_TYPE,
|
|
57
|
-
children,
|
|
58
|
-
isDisabled,
|
|
59
|
-
isSelected,
|
|
60
|
-
status,
|
|
61
|
-
variant = DEFAULT_VARIANT
|
|
62
|
-
} = _a, restProps = __objRest(_a, [
|
|
63
|
-
"as",
|
|
64
|
-
"children",
|
|
65
|
-
"isDisabled",
|
|
66
|
-
"isSelected",
|
|
67
|
-
"status",
|
|
68
|
-
"variant"
|
|
69
|
-
]);
|
|
70
|
-
const className = classNames(
|
|
71
|
-
styles.container,
|
|
72
|
-
styles[variationName("variant", variant)],
|
|
73
|
-
variant === "flagged" && status && styles[variationName("status", status)],
|
|
74
|
-
variant === "outlined" && isDisabled && styles.disabled,
|
|
75
|
-
variant === "outlined" && isSelected && styles.selected
|
|
76
|
-
);
|
|
77
|
-
if (variant !== "flagged" && status) {
|
|
78
|
-
console.warn("status is only applicable for flagged cards");
|
|
79
|
-
}
|
|
80
|
-
if (variant !== "outlined" && isSelected) {
|
|
81
|
-
console.warn("isSelected is only applicable for outlined cards");
|
|
82
|
-
}
|
|
83
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
84
|
-
As,
|
|
85
|
-
__spreadValues({
|
|
86
|
-
className,
|
|
87
|
-
"data-testid": "container",
|
|
88
|
-
disabled: isDisabled
|
|
89
|
-
}, omit(restProps, ["className"])),
|
|
90
|
-
children
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
function CardArea({ background, children, padding = "2" }) {
|
|
94
|
-
const style = __spreadValues(__spreadValues({}, getComponentThemeToken(
|
|
95
|
-
"card-area",
|
|
96
|
-
"background",
|
|
97
|
-
"color.surface.card",
|
|
98
|
-
background
|
|
99
|
-
)), getResponsiveDesignToken("card-area", "padding", "space", padding));
|
|
100
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: styles.area, style, "data-testid": "area" }, children);
|
|
101
|
-
}
|
|
102
|
-
function Card(props) {
|
|
103
|
-
const _a = props, { background, children, padding } = _a, containerProps = __objRest(_a, ["background", "children", "padding"]);
|
|
104
|
-
return /* @__PURE__ */ React__default.createElement(CardContainer, __spreadValues({}, containerProps), /* @__PURE__ */ React__default.createElement(CardArea, { background, padding }, children));
|
|
105
|
-
}
|
|
106
|
-
Card.Container = CardContainer;
|
|
107
|
-
Card.Area = CardArea;
|
|
108
|
-
export {
|
|
109
|
-
Card as C
|
|
110
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
|
-
var __objRest = (source, exclude) => {
|
|
19
|
-
var target = {};
|
|
20
|
-
for (var prop in source)
|
|
21
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
22
|
-
target[prop] = source[prop];
|
|
23
|
-
if (source != null && __getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
25
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
26
|
-
target[prop] = source[prop];
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
};
|
|
30
|
-
const omit = require("./omit-fca26542.js");
|
|
31
|
-
const React = require("react");
|
|
32
|
-
const utilities_css = require("../utilities/css.js");
|
|
33
|
-
const container = "_container_1sq6b_5";
|
|
34
|
-
const area = "_area_1sq6b_22";
|
|
35
|
-
const variantOutlined = "_variantOutlined_1sq6b_58";
|
|
36
|
-
const variantFlagged = "_variantFlagged_1sq6b_59";
|
|
37
|
-
const selected = "_selected_1sq6b_71";
|
|
38
|
-
const disabled = "_disabled_1sq6b_75";
|
|
39
|
-
const statusDanger = "_statusDanger_1sq6b_79";
|
|
40
|
-
const statusWarning = "_statusWarning_1sq6b_83";
|
|
41
|
-
const statusSuccess = "_statusSuccess_1sq6b_87";
|
|
42
|
-
const styles = {
|
|
43
|
-
container,
|
|
44
|
-
area,
|
|
45
|
-
variantOutlined,
|
|
46
|
-
variantFlagged,
|
|
47
|
-
selected,
|
|
48
|
-
disabled,
|
|
49
|
-
statusDanger,
|
|
50
|
-
statusWarning,
|
|
51
|
-
statusSuccess
|
|
52
|
-
};
|
|
53
|
-
const DEFAULT_ELEMENT_TYPE = "div";
|
|
54
|
-
const DEFAULT_VARIANT = "outlined";
|
|
55
|
-
function CardContainer(props) {
|
|
56
|
-
const _a = props, {
|
|
57
|
-
as: As = DEFAULT_ELEMENT_TYPE,
|
|
58
|
-
children,
|
|
59
|
-
isDisabled,
|
|
60
|
-
isSelected,
|
|
61
|
-
status,
|
|
62
|
-
variant = DEFAULT_VARIANT
|
|
63
|
-
} = _a, restProps = __objRest(_a, [
|
|
64
|
-
"as",
|
|
65
|
-
"children",
|
|
66
|
-
"isDisabled",
|
|
67
|
-
"isSelected",
|
|
68
|
-
"status",
|
|
69
|
-
"variant"
|
|
70
|
-
]);
|
|
71
|
-
const className = utilities_css.classNames(
|
|
72
|
-
styles.container,
|
|
73
|
-
styles[utilities_css.variationName("variant", variant)],
|
|
74
|
-
variant === "flagged" && status && styles[utilities_css.variationName("status", status)],
|
|
75
|
-
variant === "outlined" && isDisabled && styles.disabled,
|
|
76
|
-
variant === "outlined" && isSelected && styles.selected
|
|
77
|
-
);
|
|
78
|
-
if (variant !== "flagged" && status) {
|
|
79
|
-
console.warn("status is only applicable for flagged cards");
|
|
80
|
-
}
|
|
81
|
-
if (variant !== "outlined" && isSelected) {
|
|
82
|
-
console.warn("isSelected is only applicable for outlined cards");
|
|
83
|
-
}
|
|
84
|
-
return /* @__PURE__ */ React.createElement(
|
|
85
|
-
As,
|
|
86
|
-
__spreadValues({
|
|
87
|
-
className,
|
|
88
|
-
"data-testid": "container",
|
|
89
|
-
disabled: isDisabled
|
|
90
|
-
}, omit.omit(restProps, ["className"])),
|
|
91
|
-
children
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
function CardArea({ background, children, padding = "2" }) {
|
|
95
|
-
const style = __spreadValues(__spreadValues({}, utilities_css.getComponentThemeToken(
|
|
96
|
-
"card-area",
|
|
97
|
-
"background",
|
|
98
|
-
"color.surface.card",
|
|
99
|
-
background
|
|
100
|
-
)), utilities_css.getResponsiveDesignToken("card-area", "padding", "space", padding));
|
|
101
|
-
return /* @__PURE__ */ React.createElement("div", { className: styles.area, style, "data-testid": "area" }, children);
|
|
102
|
-
}
|
|
103
|
-
function Card(props) {
|
|
104
|
-
const _a = props, { background, children, padding } = _a, containerProps = __objRest(_a, ["background", "children", "padding"]);
|
|
105
|
-
return /* @__PURE__ */ React.createElement(CardContainer, __spreadValues({}, containerProps), /* @__PURE__ */ React.createElement(CardArea, { background, padding }, children));
|
|
106
|
-
}
|
|
107
|
-
Card.Container = CardContainer;
|
|
108
|
-
Card.Area = CardArea;
|
|
109
|
-
exports.Card = Card;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import React__default, { forwardRef } from "react";
|
|
33
|
-
import { getResponsiveDesignToken, getComponentToken } from "../utilities/css.mjs";
|
|
34
|
-
const HorizontalStack$1 = "_HorizontalStack_7wlyw_5";
|
|
35
|
-
const styles = {
|
|
36
|
-
HorizontalStack: HorizontalStack$1
|
|
37
|
-
};
|
|
38
|
-
const HorizontalStack = forwardRef(
|
|
39
|
-
(props, ref) => {
|
|
40
|
-
const _a = props, {
|
|
41
|
-
as: As = "div",
|
|
42
|
-
align,
|
|
43
|
-
blockAlign,
|
|
44
|
-
gap,
|
|
45
|
-
wrap = true,
|
|
46
|
-
children,
|
|
47
|
-
inline
|
|
48
|
-
} = _a, restProps = __objRest(_a, [
|
|
49
|
-
"as",
|
|
50
|
-
"align",
|
|
51
|
-
"blockAlign",
|
|
52
|
-
"gap",
|
|
53
|
-
"wrap",
|
|
54
|
-
"children",
|
|
55
|
-
"inline"
|
|
56
|
-
]);
|
|
57
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getResponsiveDesignToken("horizontal-stack", "gap", "space", gap)), getComponentToken("horizontal-stack", "align", align)), getComponentToken("horizontal-stack", "block-align", blockAlign)), getComponentToken(
|
|
58
|
-
"horizontal-stack",
|
|
59
|
-
"wrap",
|
|
60
|
-
wrap ? "wrap" : "nowrap"
|
|
61
|
-
)), getComponentToken(
|
|
62
|
-
"horizontal-stack",
|
|
63
|
-
"display",
|
|
64
|
-
inline ? "inline-flex" : "flex"
|
|
65
|
-
));
|
|
66
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
67
|
-
As,
|
|
68
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
69
|
-
className: styles.HorizontalStack,
|
|
70
|
-
style,
|
|
71
|
-
ref
|
|
72
|
-
}),
|
|
73
|
-
children
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
HorizontalStack.displayName = "HorizontalStack";
|
|
78
|
-
export {
|
|
79
|
-
HorizontalStack as H
|
|
80
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
const React = require("react");
|
|
34
|
-
const utilities_css = require("../utilities/css.js");
|
|
35
|
-
const HorizontalStack$1 = "_HorizontalStack_7wlyw_5";
|
|
36
|
-
const styles = {
|
|
37
|
-
HorizontalStack: HorizontalStack$1
|
|
38
|
-
};
|
|
39
|
-
const HorizontalStack = React.forwardRef(
|
|
40
|
-
(props, ref) => {
|
|
41
|
-
const _a = props, {
|
|
42
|
-
as: As = "div",
|
|
43
|
-
align,
|
|
44
|
-
blockAlign,
|
|
45
|
-
gap,
|
|
46
|
-
wrap = true,
|
|
47
|
-
children,
|
|
48
|
-
inline
|
|
49
|
-
} = _a, restProps = __objRest(_a, [
|
|
50
|
-
"as",
|
|
51
|
-
"align",
|
|
52
|
-
"blockAlign",
|
|
53
|
-
"gap",
|
|
54
|
-
"wrap",
|
|
55
|
-
"children",
|
|
56
|
-
"inline"
|
|
57
|
-
]);
|
|
58
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getResponsiveDesignToken("horizontal-stack", "gap", "space", gap)), utilities_css.getComponentToken("horizontal-stack", "align", align)), utilities_css.getComponentToken("horizontal-stack", "block-align", blockAlign)), utilities_css.getComponentToken(
|
|
59
|
-
"horizontal-stack",
|
|
60
|
-
"wrap",
|
|
61
|
-
wrap ? "wrap" : "nowrap"
|
|
62
|
-
)), utilities_css.getComponentToken(
|
|
63
|
-
"horizontal-stack",
|
|
64
|
-
"display",
|
|
65
|
-
inline ? "inline-flex" : "flex"
|
|
66
|
-
));
|
|
67
|
-
return /* @__PURE__ */ React.createElement(
|
|
68
|
-
As,
|
|
69
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
70
|
-
className: styles.HorizontalStack,
|
|
71
|
-
style,
|
|
72
|
-
ref
|
|
73
|
-
}),
|
|
74
|
-
children
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
HorizontalStack.displayName = "HorizontalStack";
|
|
79
|
-
exports.HorizontalStack = HorizontalStack;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
|
-
const React = require("react");
|
|
19
|
-
const utilities_css = require("../utilities/css.js");
|
|
20
|
-
const Icon$1 = "_Icon_a6zcu_5";
|
|
21
|
-
const Svg = "_Svg_a6zcu_54";
|
|
22
|
-
const styles = {
|
|
23
|
-
Icon: Icon$1,
|
|
24
|
-
Svg
|
|
25
|
-
};
|
|
26
|
-
function Icon({
|
|
27
|
-
symbol: Symbol2,
|
|
28
|
-
size = "md",
|
|
29
|
-
color,
|
|
30
|
-
accessibilityLabel
|
|
31
|
-
}) {
|
|
32
|
-
const style = __spreadValues(__spreadValues({}, utilities_css.getComponentThemeToken("icon", "color", "color.text", color)), utilities_css.getResponsiveDesignToken("icon", "size", "size.icon", size));
|
|
33
|
-
return /* @__PURE__ */ React.createElement("span", { className: styles.Icon, style }, /* @__PURE__ */ React.createElement(
|
|
34
|
-
Symbol2,
|
|
35
|
-
{
|
|
36
|
-
className: styles.Svg,
|
|
37
|
-
focusable: "false",
|
|
38
|
-
role: "img",
|
|
39
|
-
title: accessibilityLabel,
|
|
40
|
-
"aria-hidden": !accessibilityLabel ? "true" : void 0
|
|
41
|
-
}
|
|
42
|
-
));
|
|
43
|
-
}
|
|
44
|
-
exports.Icon = Icon;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import React__default from "react";
|
|
18
|
-
import { getComponentThemeToken, getResponsiveDesignToken } from "../utilities/css.mjs";
|
|
19
|
-
const Icon$1 = "_Icon_a6zcu_5";
|
|
20
|
-
const Svg = "_Svg_a6zcu_54";
|
|
21
|
-
const styles = {
|
|
22
|
-
Icon: Icon$1,
|
|
23
|
-
Svg
|
|
24
|
-
};
|
|
25
|
-
function Icon({
|
|
26
|
-
symbol: Symbol2,
|
|
27
|
-
size = "md",
|
|
28
|
-
color,
|
|
29
|
-
accessibilityLabel
|
|
30
|
-
}) {
|
|
31
|
-
const style = __spreadValues(__spreadValues({}, getComponentThemeToken("icon", "color", "color.text", color)), getResponsiveDesignToken("icon", "size", "size.icon", size));
|
|
32
|
-
return /* @__PURE__ */ React__default.createElement("span", { className: styles.Icon, style }, /* @__PURE__ */ React__default.createElement(
|
|
33
|
-
Symbol2,
|
|
34
|
-
{
|
|
35
|
-
className: styles.Svg,
|
|
36
|
-
focusable: "false",
|
|
37
|
-
role: "img",
|
|
38
|
-
title: accessibilityLabel,
|
|
39
|
-
"aria-hidden": !accessibilityLabel ? "true" : void 0
|
|
40
|
-
}
|
|
41
|
-
));
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
Icon as I
|
|
45
|
-
};
|