@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/VerticalStack/index.js
CHANGED
|
@@ -33,57 +33,23 @@ var __objRest = (source, exclude) => {
|
|
|
33
33
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
34
34
|
const React = require("react");
|
|
35
35
|
const utilities_css = require("../utilities/css.js");
|
|
36
|
-
const VerticalStack$1 = "
|
|
37
|
-
const listReset = "
|
|
38
|
-
const fieldsetReset = "
|
|
36
|
+
const VerticalStack$1 = "_VerticalStack_ci6yn_5";
|
|
37
|
+
const listReset = "_listReset_ci6yn_44";
|
|
38
|
+
const fieldsetReset = "_fieldsetReset_ci6yn_51";
|
|
39
39
|
const styles = {
|
|
40
40
|
VerticalStack: VerticalStack$1,
|
|
41
41
|
listReset,
|
|
42
42
|
fieldsetReset
|
|
43
43
|
};
|
|
44
|
-
const VerticalStack = React.forwardRef(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} = _a, restProps = __objRest(_a, [
|
|
55
|
-
"as",
|
|
56
|
-
"align",
|
|
57
|
-
"children",
|
|
58
|
-
"gap",
|
|
59
|
-
"inline",
|
|
60
|
-
"inlineAlign",
|
|
61
|
-
"reverseOrder"
|
|
62
|
-
]);
|
|
63
|
-
const className = utilities_css.classNames(
|
|
64
|
-
styles.VerticalStack,
|
|
65
|
-
(As === "ul" || As === "ol") && styles.listReset,
|
|
66
|
-
As === "fieldset" && styles.fieldsetReset
|
|
67
|
-
);
|
|
68
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getResponsiveDesignToken("vertical-stack", "gap", "space", gap)), utilities_css.getComponentToken("vertical-stack", "align", align)), utilities_css.getComponentToken("vertical-stack", "inline-align", inlineAlign)), utilities_css.getComponentToken(
|
|
69
|
-
"vertical-stack",
|
|
70
|
-
"order",
|
|
71
|
-
reverseOrder ? "column-reverse" : "column"
|
|
72
|
-
)), utilities_css.getComponentToken(
|
|
73
|
-
"vertical-stack",
|
|
74
|
-
"display",
|
|
75
|
-
inline ? "inline-flex" : "flex"
|
|
76
|
-
));
|
|
77
|
-
return /* @__PURE__ */ React.createElement(
|
|
78
|
-
As,
|
|
79
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
80
|
-
className,
|
|
81
|
-
style: utilities_css.sanitizeCustomProperties(style),
|
|
82
|
-
ref
|
|
83
|
-
}),
|
|
84
|
-
children
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
);
|
|
44
|
+
const VerticalStack = React.forwardRef((props, ref) => {
|
|
45
|
+
const _a = props, { as: As = "div", align, children, gap, inline, inlineAlign, reverseOrder = false } = _a, restProps = __objRest(_a, ["as", "align", "children", "gap", "inline", "inlineAlign", "reverseOrder"]);
|
|
46
|
+
const className = utilities_css.classNames(styles.VerticalStack, (As === "ul" || As === "ol") && styles.listReset, As === "fieldset" && styles.fieldsetReset);
|
|
47
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getResponsiveDesignToken("vertical-stack", "gap", "space", gap)), utilities_css.getComponentToken("vertical-stack", "align", align)), utilities_css.getComponentToken("vertical-stack", "inline-align", inlineAlign)), utilities_css.getComponentToken("vertical-stack", "order", reverseOrder ? "column-reverse" : "column")), utilities_css.getComponentToken("vertical-stack", "display", inline ? "inline-flex" : "flex"));
|
|
48
|
+
return React.createElement(As, __spreadProps(__spreadValues({}, restProps), {
|
|
49
|
+
className,
|
|
50
|
+
style: utilities_css.sanitizeCustomProperties(style),
|
|
51
|
+
ref
|
|
52
|
+
}), children);
|
|
53
|
+
});
|
|
88
54
|
VerticalStack.displayName = "VerticalStack";
|
|
89
55
|
exports.VerticalStack = VerticalStack;
|
package/VerticalStack/index.mjs
CHANGED
|
@@ -31,58 +31,24 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import React__default, { forwardRef } from "react";
|
|
33
33
|
import { classNames, getResponsiveDesignToken, getComponentToken, sanitizeCustomProperties } from "../utilities/css.mjs";
|
|
34
|
-
const VerticalStack$1 = "
|
|
35
|
-
const listReset = "
|
|
36
|
-
const fieldsetReset = "
|
|
34
|
+
const VerticalStack$1 = "_VerticalStack_ci6yn_5";
|
|
35
|
+
const listReset = "_listReset_ci6yn_44";
|
|
36
|
+
const fieldsetReset = "_fieldsetReset_ci6yn_51";
|
|
37
37
|
const styles = {
|
|
38
38
|
VerticalStack: VerticalStack$1,
|
|
39
39
|
listReset,
|
|
40
40
|
fieldsetReset
|
|
41
41
|
};
|
|
42
|
-
const VerticalStack = forwardRef(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} = _a, restProps = __objRest(_a, [
|
|
53
|
-
"as",
|
|
54
|
-
"align",
|
|
55
|
-
"children",
|
|
56
|
-
"gap",
|
|
57
|
-
"inline",
|
|
58
|
-
"inlineAlign",
|
|
59
|
-
"reverseOrder"
|
|
60
|
-
]);
|
|
61
|
-
const className = classNames(
|
|
62
|
-
styles.VerticalStack,
|
|
63
|
-
(As === "ul" || As === "ol") && styles.listReset,
|
|
64
|
-
As === "fieldset" && styles.fieldsetReset
|
|
65
|
-
);
|
|
66
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getResponsiveDesignToken("vertical-stack", "gap", "space", gap)), getComponentToken("vertical-stack", "align", align)), getComponentToken("vertical-stack", "inline-align", inlineAlign)), getComponentToken(
|
|
67
|
-
"vertical-stack",
|
|
68
|
-
"order",
|
|
69
|
-
reverseOrder ? "column-reverse" : "column"
|
|
70
|
-
)), getComponentToken(
|
|
71
|
-
"vertical-stack",
|
|
72
|
-
"display",
|
|
73
|
-
inline ? "inline-flex" : "flex"
|
|
74
|
-
));
|
|
75
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
76
|
-
As,
|
|
77
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
78
|
-
className,
|
|
79
|
-
style: sanitizeCustomProperties(style),
|
|
80
|
-
ref
|
|
81
|
-
}),
|
|
82
|
-
children
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
);
|
|
42
|
+
const VerticalStack = forwardRef((props, ref) => {
|
|
43
|
+
const _a = props, { as: As = "div", align, children, gap, inline, inlineAlign, reverseOrder = false } = _a, restProps = __objRest(_a, ["as", "align", "children", "gap", "inline", "inlineAlign", "reverseOrder"]);
|
|
44
|
+
const className = classNames(styles.VerticalStack, (As === "ul" || As === "ol") && styles.listReset, As === "fieldset" && styles.fieldsetReset);
|
|
45
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getResponsiveDesignToken("vertical-stack", "gap", "space", gap)), getComponentToken("vertical-stack", "align", align)), getComponentToken("vertical-stack", "inline-align", inlineAlign)), getComponentToken("vertical-stack", "order", reverseOrder ? "column-reverse" : "column")), getComponentToken("vertical-stack", "display", inline ? "inline-flex" : "flex"));
|
|
46
|
+
return React__default.createElement(As, __spreadProps(__spreadValues({}, restProps), {
|
|
47
|
+
className,
|
|
48
|
+
style: sanitizeCustomProperties(style),
|
|
49
|
+
ref
|
|
50
|
+
}), children);
|
|
51
|
+
});
|
|
86
52
|
VerticalStack.displayName = "VerticalStack";
|
|
87
53
|
export {
|
|
88
54
|
VerticalStack
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
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, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value
|
|
11
|
+
}) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
const ExpandMore400 = (_a) => {
|
|
36
|
+
var _b = _a, { title, titleId } = _b, props = __objRest(_b, ["title", "titleId"]);
|
|
37
|
+
return React.createElement("svg", __spreadValues({
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
viewBox: "0 -960 960 960",
|
|
40
|
+
"aria-labelledby": titleId
|
|
41
|
+
}, props), title ? React.createElement("title", {
|
|
42
|
+
id: titleId
|
|
43
|
+
}, title) : null, React.createElement("path", {
|
|
44
|
+
d: "M480-345 240-585l43-43 197 198 197-197 43 43-240 239Z"
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
ExpandMore400 as E
|
|
49
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const React = require("react");
|
|
3
|
+
function _interopNamespaceDefault(e) {
|
|
4
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
+
if (e) {
|
|
6
|
+
for (const k in e) {
|
|
7
|
+
if (k !== "default") {
|
|
8
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: () => e[k]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
n.default = e;
|
|
17
|
+
return Object.freeze(n);
|
|
18
|
+
}
|
|
19
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
+
var __defProp = Object.defineProperty;
|
|
21
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
22
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
23
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
24
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value
|
|
29
|
+
}) : obj[key] = value;
|
|
30
|
+
var __spreadValues = (a, b) => {
|
|
31
|
+
for (var prop in b || (b = {}))
|
|
32
|
+
if (__hasOwnProp.call(b, prop))
|
|
33
|
+
__defNormalProp(a, prop, b[prop]);
|
|
34
|
+
if (__getOwnPropSymbols)
|
|
35
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
36
|
+
if (__propIsEnum.call(b, prop))
|
|
37
|
+
__defNormalProp(a, prop, b[prop]);
|
|
38
|
+
}
|
|
39
|
+
return a;
|
|
40
|
+
};
|
|
41
|
+
var __objRest = (source, exclude) => {
|
|
42
|
+
var target = {};
|
|
43
|
+
for (var prop in source)
|
|
44
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
45
|
+
target[prop] = source[prop];
|
|
46
|
+
if (source != null && __getOwnPropSymbols)
|
|
47
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
48
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
49
|
+
target[prop] = source[prop];
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
};
|
|
53
|
+
const ExpandMore400 = (_a) => {
|
|
54
|
+
var _b = _a, { title, titleId } = _b, props = __objRest(_b, ["title", "titleId"]);
|
|
55
|
+
return React__namespace.createElement("svg", __spreadValues({
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
viewBox: "0 -960 960 960",
|
|
58
|
+
"aria-labelledby": titleId
|
|
59
|
+
}, props), title ? React__namespace.createElement("title", {
|
|
60
|
+
id: titleId
|
|
61
|
+
}, title) : null, React__namespace.createElement("path", {
|
|
62
|
+
d: "M480-345 240-585l43-43 197 198 197-197 43 43-240 239Z"
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
exports.ExpandMore400 = ExpandMore400;
|
|
@@ -0,0 +1,148 @@
|
|
|
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 from "react";
|
|
33
|
+
import { Text } from "../Text/index.mjs";
|
|
34
|
+
import { classNames, variationName } from "../utilities/css.mjs";
|
|
35
|
+
import { Icon } from "../Icon/index.mjs";
|
|
36
|
+
const root = "_root_rsv81_5";
|
|
37
|
+
const inputIconContainer = "_inputIconContainer_rsv81_26";
|
|
38
|
+
const label = "_label_rsv81_32";
|
|
39
|
+
const labelHidden = "_labelHidden_rsv81_36";
|
|
40
|
+
const input = "_input_rsv81_26";
|
|
41
|
+
const errorInput = "_errorInput_rsv81_74";
|
|
42
|
+
const inputSizeSm = "_inputSizeSm_rsv81_82";
|
|
43
|
+
const inputSizeLg = "_inputSizeLg_rsv81_96";
|
|
44
|
+
const passwordInput = "_passwordInput_rsv81_104";
|
|
45
|
+
const passwordBtn = "_passwordBtn_rsv81_114";
|
|
46
|
+
const hovered = "_hovered_rsv81_145";
|
|
47
|
+
const textArea = "_textArea_rsv81_154";
|
|
48
|
+
const passwordBtnError = "_passwordBtnError_rsv81_159";
|
|
49
|
+
const passwordBtnSm = "_passwordBtnSm_rsv81_165";
|
|
50
|
+
const passwordBtnLg = "_passwordBtnLg_rsv81_174";
|
|
51
|
+
const icon = "_icon_rsv81_183";
|
|
52
|
+
const iconDisabled = "_iconDisabled_rsv81_193";
|
|
53
|
+
const iconStart = "_iconStart_rsv81_197";
|
|
54
|
+
const iconEnd = "_iconEnd_rsv81_201";
|
|
55
|
+
const iconStartInput = "_iconStartInput_rsv81_205";
|
|
56
|
+
const iconEndInput = "_iconEndInput_rsv81_209";
|
|
57
|
+
const inputIconPlacementSm = "_inputIconPlacementSm_rsv81_213";
|
|
58
|
+
const inputIconPlacementLg = "_inputIconPlacementLg_rsv81_217";
|
|
59
|
+
const caption = "_caption_rsv81_221";
|
|
60
|
+
const styles = {
|
|
61
|
+
root,
|
|
62
|
+
inputIconContainer,
|
|
63
|
+
label,
|
|
64
|
+
labelHidden,
|
|
65
|
+
input,
|
|
66
|
+
errorInput,
|
|
67
|
+
inputSizeSm,
|
|
68
|
+
inputSizeLg,
|
|
69
|
+
passwordInput,
|
|
70
|
+
passwordBtn,
|
|
71
|
+
hovered,
|
|
72
|
+
textArea,
|
|
73
|
+
passwordBtnError,
|
|
74
|
+
passwordBtnSm,
|
|
75
|
+
passwordBtnLg,
|
|
76
|
+
icon,
|
|
77
|
+
iconDisabled,
|
|
78
|
+
iconStart,
|
|
79
|
+
iconEnd,
|
|
80
|
+
iconStartInput,
|
|
81
|
+
iconEndInput,
|
|
82
|
+
inputIconPlacementSm,
|
|
83
|
+
inputIconPlacementLg,
|
|
84
|
+
caption
|
|
85
|
+
};
|
|
86
|
+
function Label(props) {
|
|
87
|
+
const _a = props, { isLabelVisuallyHidden = false, isLabelEmphasized = false, fieldSize = "md", hasError = false, children } = _a, labelProps = __objRest(_a, ["isLabelVisuallyHidden", "isLabelEmphasized", "fieldSize", "hasError", "children"]);
|
|
88
|
+
const textVariant = isLabelEmphasized ? "subtitle1" : fieldSize === "sm" ? "body2" : "body1";
|
|
89
|
+
const as = isLabelEmphasized ? "strong" : "span";
|
|
90
|
+
const color = hasError ? "danger" : void 0;
|
|
91
|
+
return React__default.createElement("label", __spreadProps(__spreadValues({}, labelProps), {
|
|
92
|
+
className: classNames(styles.label, isLabelVisuallyHidden && styles.labelHidden)
|
|
93
|
+
}), React__default.createElement(Text, {
|
|
94
|
+
variant: textVariant,
|
|
95
|
+
as,
|
|
96
|
+
color,
|
|
97
|
+
visuallyHidden: isLabelVisuallyHidden
|
|
98
|
+
}, children));
|
|
99
|
+
}
|
|
100
|
+
function InputCaption(props) {
|
|
101
|
+
const _a = props, { variant, children } = _a, captionTextProps = __objRest(_a, ["variant", "children"]);
|
|
102
|
+
return React__default.createElement("div", __spreadProps(__spreadValues({}, captionTextProps), {
|
|
103
|
+
className: styles.caption
|
|
104
|
+
}), React__default.createElement(Text, {
|
|
105
|
+
variant: "caption",
|
|
106
|
+
color: variant === "helper" ? "subdued" : "danger"
|
|
107
|
+
}, children));
|
|
108
|
+
}
|
|
109
|
+
function mapIconSize(size) {
|
|
110
|
+
if (size === "sm") {
|
|
111
|
+
return "xs";
|
|
112
|
+
} else if (size === "lg") {
|
|
113
|
+
return "md";
|
|
114
|
+
}
|
|
115
|
+
return size;
|
|
116
|
+
}
|
|
117
|
+
function logWarningsForInvalidPropConfiguration(bothIconPropsDefined, smallSizeTextarea, definedIconsWithTextarea) {
|
|
118
|
+
if (bothIconPropsDefined) {
|
|
119
|
+
console.warn("Cannot simultaneously define `iconAtEnd` and `iconAtStart`");
|
|
120
|
+
}
|
|
121
|
+
if (smallSizeTextarea) {
|
|
122
|
+
console.warn("`textarea` cannot be defined with size `sm`");
|
|
123
|
+
}
|
|
124
|
+
if (definedIconsWithTextarea) {
|
|
125
|
+
console.warn("Cannot define `textarea` with `iconAtEnd` or `iconAtStart`");
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function getElementType(isMultiline) {
|
|
129
|
+
return isMultiline ? "textarea" : "input";
|
|
130
|
+
}
|
|
131
|
+
function InputIcon(props) {
|
|
132
|
+
const { alignment = "start", size = "md", isDisabled = false, icon: icon2 } = props;
|
|
133
|
+
return React__default.createElement("div", {
|
|
134
|
+
className: classNames(styles.icon, alignment === "start" ? styles.iconStart : styles.iconEnd, isDisabled && styles.iconDisabled, styles[variationName("inputIconPlacement", size)])
|
|
135
|
+
}, React__default.createElement(Icon, {
|
|
136
|
+
symbol: icon2,
|
|
137
|
+
size: mapIconSize(size)
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
InputIcon as I,
|
|
142
|
+
Label as L,
|
|
143
|
+
InputCaption as a,
|
|
144
|
+
getElementType as g,
|
|
145
|
+
logWarningsForInvalidPropConfiguration as l,
|
|
146
|
+
mapIconSize as m,
|
|
147
|
+
styles as s
|
|
148
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
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 Text_index = require("../Text/index.js");
|
|
35
|
+
const utilities_css = require("../utilities/css.js");
|
|
36
|
+
const Icon_index = require("../Icon/index.js");
|
|
37
|
+
const root = "_root_rsv81_5";
|
|
38
|
+
const inputIconContainer = "_inputIconContainer_rsv81_26";
|
|
39
|
+
const label = "_label_rsv81_32";
|
|
40
|
+
const labelHidden = "_labelHidden_rsv81_36";
|
|
41
|
+
const input = "_input_rsv81_26";
|
|
42
|
+
const errorInput = "_errorInput_rsv81_74";
|
|
43
|
+
const inputSizeSm = "_inputSizeSm_rsv81_82";
|
|
44
|
+
const inputSizeLg = "_inputSizeLg_rsv81_96";
|
|
45
|
+
const passwordInput = "_passwordInput_rsv81_104";
|
|
46
|
+
const passwordBtn = "_passwordBtn_rsv81_114";
|
|
47
|
+
const hovered = "_hovered_rsv81_145";
|
|
48
|
+
const textArea = "_textArea_rsv81_154";
|
|
49
|
+
const passwordBtnError = "_passwordBtnError_rsv81_159";
|
|
50
|
+
const passwordBtnSm = "_passwordBtnSm_rsv81_165";
|
|
51
|
+
const passwordBtnLg = "_passwordBtnLg_rsv81_174";
|
|
52
|
+
const icon = "_icon_rsv81_183";
|
|
53
|
+
const iconDisabled = "_iconDisabled_rsv81_193";
|
|
54
|
+
const iconStart = "_iconStart_rsv81_197";
|
|
55
|
+
const iconEnd = "_iconEnd_rsv81_201";
|
|
56
|
+
const iconStartInput = "_iconStartInput_rsv81_205";
|
|
57
|
+
const iconEndInput = "_iconEndInput_rsv81_209";
|
|
58
|
+
const inputIconPlacementSm = "_inputIconPlacementSm_rsv81_213";
|
|
59
|
+
const inputIconPlacementLg = "_inputIconPlacementLg_rsv81_217";
|
|
60
|
+
const caption = "_caption_rsv81_221";
|
|
61
|
+
const styles = {
|
|
62
|
+
root,
|
|
63
|
+
inputIconContainer,
|
|
64
|
+
label,
|
|
65
|
+
labelHidden,
|
|
66
|
+
input,
|
|
67
|
+
errorInput,
|
|
68
|
+
inputSizeSm,
|
|
69
|
+
inputSizeLg,
|
|
70
|
+
passwordInput,
|
|
71
|
+
passwordBtn,
|
|
72
|
+
hovered,
|
|
73
|
+
textArea,
|
|
74
|
+
passwordBtnError,
|
|
75
|
+
passwordBtnSm,
|
|
76
|
+
passwordBtnLg,
|
|
77
|
+
icon,
|
|
78
|
+
iconDisabled,
|
|
79
|
+
iconStart,
|
|
80
|
+
iconEnd,
|
|
81
|
+
iconStartInput,
|
|
82
|
+
iconEndInput,
|
|
83
|
+
inputIconPlacementSm,
|
|
84
|
+
inputIconPlacementLg,
|
|
85
|
+
caption
|
|
86
|
+
};
|
|
87
|
+
function Label(props) {
|
|
88
|
+
const _a = props, { isLabelVisuallyHidden = false, isLabelEmphasized = false, fieldSize = "md", hasError = false, children } = _a, labelProps = __objRest(_a, ["isLabelVisuallyHidden", "isLabelEmphasized", "fieldSize", "hasError", "children"]);
|
|
89
|
+
const textVariant = isLabelEmphasized ? "subtitle1" : fieldSize === "sm" ? "body2" : "body1";
|
|
90
|
+
const as = isLabelEmphasized ? "strong" : "span";
|
|
91
|
+
const color = hasError ? "danger" : void 0;
|
|
92
|
+
return React.createElement("label", __spreadProps(__spreadValues({}, labelProps), {
|
|
93
|
+
className: utilities_css.classNames(styles.label, isLabelVisuallyHidden && styles.labelHidden)
|
|
94
|
+
}), React.createElement(Text_index.Text, {
|
|
95
|
+
variant: textVariant,
|
|
96
|
+
as,
|
|
97
|
+
color,
|
|
98
|
+
visuallyHidden: isLabelVisuallyHidden
|
|
99
|
+
}, children));
|
|
100
|
+
}
|
|
101
|
+
function InputCaption(props) {
|
|
102
|
+
const _a = props, { variant, children } = _a, captionTextProps = __objRest(_a, ["variant", "children"]);
|
|
103
|
+
return React.createElement("div", __spreadProps(__spreadValues({}, captionTextProps), {
|
|
104
|
+
className: styles.caption
|
|
105
|
+
}), React.createElement(Text_index.Text, {
|
|
106
|
+
variant: "caption",
|
|
107
|
+
color: variant === "helper" ? "subdued" : "danger"
|
|
108
|
+
}, children));
|
|
109
|
+
}
|
|
110
|
+
function mapIconSize(size) {
|
|
111
|
+
if (size === "sm") {
|
|
112
|
+
return "xs";
|
|
113
|
+
} else if (size === "lg") {
|
|
114
|
+
return "md";
|
|
115
|
+
}
|
|
116
|
+
return size;
|
|
117
|
+
}
|
|
118
|
+
function logWarningsForInvalidPropConfiguration(bothIconPropsDefined, smallSizeTextarea, definedIconsWithTextarea) {
|
|
119
|
+
if (bothIconPropsDefined) {
|
|
120
|
+
console.warn("Cannot simultaneously define `iconAtEnd` and `iconAtStart`");
|
|
121
|
+
}
|
|
122
|
+
if (smallSizeTextarea) {
|
|
123
|
+
console.warn("`textarea` cannot be defined with size `sm`");
|
|
124
|
+
}
|
|
125
|
+
if (definedIconsWithTextarea) {
|
|
126
|
+
console.warn("Cannot define `textarea` with `iconAtEnd` or `iconAtStart`");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function getElementType(isMultiline) {
|
|
130
|
+
return isMultiline ? "textarea" : "input";
|
|
131
|
+
}
|
|
132
|
+
function InputIcon(props) {
|
|
133
|
+
const { alignment = "start", size = "md", isDisabled = false, icon: icon2 } = props;
|
|
134
|
+
return React.createElement("div", {
|
|
135
|
+
className: utilities_css.classNames(styles.icon, alignment === "start" ? styles.iconStart : styles.iconEnd, isDisabled && styles.iconDisabled, styles[utilities_css.variationName("inputIconPlacement", size)])
|
|
136
|
+
}, React.createElement(Icon_index.Icon, {
|
|
137
|
+
symbol: icon2,
|
|
138
|
+
size: mapIconSize(size)
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
exports.InputCaption = InputCaption;
|
|
142
|
+
exports.InputIcon = InputIcon;
|
|
143
|
+
exports.Label = Label;
|
|
144
|
+
exports.getElementType = getElementType;
|
|
145
|
+
exports.logWarningsForInvalidPropConfiguration = logWarningsForInvalidPropConfiguration;
|
|
146
|
+
exports.mapIconSize = mapIconSize;
|
|
147
|
+
exports.styles = styles;
|
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./import-
|
|
20
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./import-19bc38ac.mjs";
|
|
21
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21, a as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./import-3d962a94.mjs";
|
|
22
|
+
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./import-6a831ca1.mjs";
|
|
23
23
|
function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
24
24
|
let { isDisabled = false, isRequired = false, isReadOnly = false, value, name, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState = "valid" } = props;
|
|
25
25
|
let onChange = (e) => {
|