@easypost/easy-ui 1.0.0-alpha.5 → 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 +16 -16
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +7 -7
- package/Banner/index.mjs +5 -5
- package/Button/Button.d.ts +61 -0
- package/Button/Button.d.ts.map +1 -1
- package/Button/index.js +23 -23
- package/Button/index.mjs +20 -20
- package/CHANGELOG.md +8 -0
- package/Card/index.js +84 -5
- package/Card/index.mjs +84 -5
- package/Checkbox/index.js +26 -26
- package/Checkbox/index.mjs +24 -24
- package/CodeBlock/index.js +4 -4
- package/CodeBlock/index.mjs +4 -4
- package/DropdownButton/DropdownButton.d.ts +48 -0
- package/DropdownButton/DropdownButton.d.ts.map +1 -1
- package/DropdownButton/index.js +17 -17
- package/DropdownButton/index.mjs +15 -15
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- 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 +18 -18
- package/IconButton/index.mjs +15 -15
- package/InputField/index.js +282 -11
- package/InputField/index.mjs +266 -11
- package/Menu/index.js +57 -15
- package/Menu/index.mjs +58 -16
- package/Notification/index.js +1534 -14
- package/Notification/index.mjs +1518 -14
- package/Provider/index.js +8 -8
- package/Provider/index.mjs +8 -8
- package/RadioGroup/index.js +24 -24
- package/RadioGroup/index.mjs +22 -22
- package/Select/index.js +71 -29
- package/Select/index.mjs +71 -29
- package/SelectorErrorTooltip/index.js +99 -8
- package/SelectorErrorTooltip/index.mjs +85 -10
- package/Text/index.js +85 -4
- package/Text/index.mjs +85 -4
- package/TextField/index.js +7 -7
- package/TextField/index.mjs +8 -8
- package/Textarea/index.js +7 -7
- package/Textarea/index.mjs +8 -8
- package/Theme/index.js +145 -9
- package/Theme/index.mjs +145 -9
- package/Toggle/index.js +14 -14
- package/Toggle/index.mjs +14 -14
- package/Tooltip/index.js +297 -8
- package/Tooltip/index.mjs +298 -9
- package/UnstyledButton/index.js +3 -3
- package/UnstyledButton/index.mjs +3 -3
- package/VerticalStack/index.js +3 -3
- package/VerticalStack/index.mjs +3 -3
- package/__chunks__/{InputIcon-4a8e5243.mjs → InputIcon-2317befd.mjs} +26 -26
- package/__chunks__/{InputIcon-70dad3e5.js → InputIcon-d3963cf8.js} +29 -29
- package/__chunks__/{import-9c958e32.mjs → import-0561e1ba.mjs} +2 -2
- package/__chunks__/{import-fbe7cc7e.mjs → import-19bc38ac.mjs} +26 -26
- package/__chunks__/{import-d2e79ac1.mjs → import-29af6941.mjs} +3 -3
- package/__chunks__/{import-9581a2dc.js → import-2b302763.js} +43 -1
- package/__chunks__/{import-a6cadfe8.mjs → import-3d962a94.mjs} +57 -15
- package/__chunks__/{import-d52cd5cf.js → import-8b6c0bc7.js} +1 -1
- package/__chunks__/{import-87c465c9.js → import-a2023d8f.js} +1 -1
- package/__chunks__/{import-29edaaea.mjs → import-f1f4792a.mjs} +9 -9
- package/__chunks__/{UnstyledButton-981cd9af.mjs → index-29d7bca9.mjs} +2 -2
- package/__chunks__/{UnstyledButton-5bbb3c5e.js → index-3985350a.js} +1 -1
- 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-2f165429.mjs → real-module-515df21d.mjs} +4 -4
- package/__chunks__/{useTriggerWidth-9528009c.js → useTriggerWidth-156b038a.js} +48 -6
- package/__chunks__/{useTriggerWidth-29becc21.mjs → useTriggerWidth-addcd1d6.mjs} +71 -29
- package/package.json +6 -6
- package/style.css +1437 -1436
- package/__chunks__/Card-2bd533c4.js +0 -85
- package/__chunks__/Card-4ad318ba.mjs +0 -86
- package/__chunks__/HorizontalStack-65adb570.mjs +0 -50
- package/__chunks__/HorizontalStack-f331bfc7.js +0 -49
- package/__chunks__/Icon-1a25dcae.js +0 -39
- package/__chunks__/Icon-6eb724b4.mjs +0 -40
- package/__chunks__/InputField-cc829736.mjs +0 -268
- package/__chunks__/InputField-f5072e37.js +0 -283
- package/__chunks__/Notification-8d749bd1.mjs +0 -1533
- package/__chunks__/Notification-b7a2c277.js +0 -1548
- package/__chunks__/SelectorErrorTooltip-4d820c45.mjs +0 -83
- package/__chunks__/SelectorErrorTooltip-b7bb5b9d.js +0 -98
- package/__chunks__/Text-2efbe1fe.js +0 -86
- package/__chunks__/Text-ec2b8d8a.mjs +0 -87
- package/__chunks__/Theme-123ba2c3.mjs +0 -147
- package/__chunks__/Theme-57f8311c.js +0 -146
- package/__chunks__/Tooltip-b4e23b78.mjs +0 -299
- package/__chunks__/Tooltip-c5076ca7.js +0 -298
|
@@ -1,85 +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_1vum0_5";
|
|
34
|
-
const area = "_area_1vum0_22";
|
|
35
|
-
const variantOutlined = "_variantOutlined_1vum0_58";
|
|
36
|
-
const variantFlagged = "_variantFlagged_1vum0_59";
|
|
37
|
-
const selected = "_selected_1vum0_71";
|
|
38
|
-
const disabled = "_disabled_1vum0_75";
|
|
39
|
-
const statusDanger = "_statusDanger_1vum0_79";
|
|
40
|
-
const statusWarning = "_statusWarning_1vum0_83";
|
|
41
|
-
const statusSuccess = "_statusSuccess_1vum0_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, { as: As = DEFAULT_ELEMENT_TYPE, children, isDisabled, isSelected, status, variant = DEFAULT_VARIANT } = _a, restProps = __objRest(_a, ["as", "children", "isDisabled", "isSelected", "status", "variant"]);
|
|
57
|
-
const className = utilities_css.classNames(styles.container, styles[utilities_css.variationName("variant", variant)], variant === "flagged" && status && styles[utilities_css.variationName("status", status)], variant === "outlined" && isDisabled && styles.disabled, variant === "outlined" && isSelected && styles.selected);
|
|
58
|
-
if (variant !== "flagged" && status) {
|
|
59
|
-
console.warn("status is only applicable for flagged cards");
|
|
60
|
-
}
|
|
61
|
-
if (variant !== "outlined" && isSelected) {
|
|
62
|
-
console.warn("isSelected is only applicable for outlined cards");
|
|
63
|
-
}
|
|
64
|
-
return React.createElement(As, __spreadValues({
|
|
65
|
-
className,
|
|
66
|
-
disabled: isDisabled
|
|
67
|
-
}, omit.omit(restProps, ["className"])), children);
|
|
68
|
-
}
|
|
69
|
-
function CardArea({ background, children, padding = "2" }) {
|
|
70
|
-
const style = __spreadValues(__spreadValues({}, utilities_css.getComponentThemeToken("card-area", "background", "color.surface.card", background)), utilities_css.getResponsiveDesignToken("card-area", "padding", "space", padding));
|
|
71
|
-
return React.createElement("div", {
|
|
72
|
-
className: styles.area,
|
|
73
|
-
style
|
|
74
|
-
}, children);
|
|
75
|
-
}
|
|
76
|
-
function Card(props) {
|
|
77
|
-
const _a = props, { background, children, padding } = _a, containerProps = __objRest(_a, ["background", "children", "padding"]);
|
|
78
|
-
return React.createElement(CardContainer, __spreadValues({}, containerProps), React.createElement(CardArea, {
|
|
79
|
-
background,
|
|
80
|
-
padding
|
|
81
|
-
}, children));
|
|
82
|
-
}
|
|
83
|
-
Card.Container = CardContainer;
|
|
84
|
-
Card.Area = CardArea;
|
|
85
|
-
exports.Card = Card;
|
|
@@ -1,86 +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_1vum0_5";
|
|
33
|
-
const area = "_area_1vum0_22";
|
|
34
|
-
const variantOutlined = "_variantOutlined_1vum0_58";
|
|
35
|
-
const variantFlagged = "_variantFlagged_1vum0_59";
|
|
36
|
-
const selected = "_selected_1vum0_71";
|
|
37
|
-
const disabled = "_disabled_1vum0_75";
|
|
38
|
-
const statusDanger = "_statusDanger_1vum0_79";
|
|
39
|
-
const statusWarning = "_statusWarning_1vum0_83";
|
|
40
|
-
const statusSuccess = "_statusSuccess_1vum0_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, { as: As = DEFAULT_ELEMENT_TYPE, children, isDisabled, isSelected, status, variant = DEFAULT_VARIANT } = _a, restProps = __objRest(_a, ["as", "children", "isDisabled", "isSelected", "status", "variant"]);
|
|
56
|
-
const className = classNames(styles.container, styles[variationName("variant", variant)], variant === "flagged" && status && styles[variationName("status", status)], variant === "outlined" && isDisabled && styles.disabled, variant === "outlined" && isSelected && styles.selected);
|
|
57
|
-
if (variant !== "flagged" && status) {
|
|
58
|
-
console.warn("status is only applicable for flagged cards");
|
|
59
|
-
}
|
|
60
|
-
if (variant !== "outlined" && isSelected) {
|
|
61
|
-
console.warn("isSelected is only applicable for outlined cards");
|
|
62
|
-
}
|
|
63
|
-
return React__default.createElement(As, __spreadValues({
|
|
64
|
-
className,
|
|
65
|
-
disabled: isDisabled
|
|
66
|
-
}, omit(restProps, ["className"])), children);
|
|
67
|
-
}
|
|
68
|
-
function CardArea({ background, children, padding = "2" }) {
|
|
69
|
-
const style = __spreadValues(__spreadValues({}, getComponentThemeToken("card-area", "background", "color.surface.card", background)), getResponsiveDesignToken("card-area", "padding", "space", padding));
|
|
70
|
-
return React__default.createElement("div", {
|
|
71
|
-
className: styles.area,
|
|
72
|
-
style
|
|
73
|
-
}, children);
|
|
74
|
-
}
|
|
75
|
-
function Card(props) {
|
|
76
|
-
const _a = props, { background, children, padding } = _a, containerProps = __objRest(_a, ["background", "children", "padding"]);
|
|
77
|
-
return React__default.createElement(CardContainer, __spreadValues({}, containerProps), React__default.createElement(CardArea, {
|
|
78
|
-
background,
|
|
79
|
-
padding
|
|
80
|
-
}, children));
|
|
81
|
-
}
|
|
82
|
-
Card.Container = CardContainer;
|
|
83
|
-
Card.Area = CardArea;
|
|
84
|
-
export {
|
|
85
|
-
Card as C
|
|
86
|
-
};
|
|
@@ -1,50 +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_1gyjm_5";
|
|
35
|
-
const styles = {
|
|
36
|
-
HorizontalStack: HorizontalStack$1
|
|
37
|
-
};
|
|
38
|
-
const HorizontalStack = forwardRef((props, ref) => {
|
|
39
|
-
const _a = props, { as: As = "div", align, blockAlign, gap, wrap = true, children, inline } = _a, restProps = __objRest(_a, ["as", "align", "blockAlign", "gap", "wrap", "children", "inline"]);
|
|
40
|
-
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("horizontal-stack", "wrap", wrap ? "wrap" : "nowrap")), getComponentToken("horizontal-stack", "display", inline ? "inline-flex" : "flex"));
|
|
41
|
-
return React__default.createElement(As, __spreadProps(__spreadValues({}, restProps), {
|
|
42
|
-
className: styles.HorizontalStack,
|
|
43
|
-
style,
|
|
44
|
-
ref
|
|
45
|
-
}), children);
|
|
46
|
-
});
|
|
47
|
-
HorizontalStack.displayName = "HorizontalStack";
|
|
48
|
-
export {
|
|
49
|
-
HorizontalStack as H
|
|
50
|
-
};
|
|
@@ -1,49 +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_1gyjm_5";
|
|
36
|
-
const styles = {
|
|
37
|
-
HorizontalStack: HorizontalStack$1
|
|
38
|
-
};
|
|
39
|
-
const HorizontalStack = React.forwardRef((props, ref) => {
|
|
40
|
-
const _a = props, { as: As = "div", align, blockAlign, gap, wrap = true, children, inline } = _a, restProps = __objRest(_a, ["as", "align", "blockAlign", "gap", "wrap", "children", "inline"]);
|
|
41
|
-
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("horizontal-stack", "wrap", wrap ? "wrap" : "nowrap")), utilities_css.getComponentToken("horizontal-stack", "display", inline ? "inline-flex" : "flex"));
|
|
42
|
-
return React.createElement(As, __spreadProps(__spreadValues({}, restProps), {
|
|
43
|
-
className: styles.HorizontalStack,
|
|
44
|
-
style,
|
|
45
|
-
ref
|
|
46
|
-
}), children);
|
|
47
|
-
});
|
|
48
|
-
HorizontalStack.displayName = "HorizontalStack";
|
|
49
|
-
exports.HorizontalStack = HorizontalStack;
|
|
@@ -1,39 +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_5mfa3_5";
|
|
21
|
-
const Svg = "_Svg_5mfa3_54";
|
|
22
|
-
const styles = {
|
|
23
|
-
Icon: Icon$1,
|
|
24
|
-
Svg
|
|
25
|
-
};
|
|
26
|
-
function Icon({ symbol: Symbol2, size = "md", color, accessibilityLabel }) {
|
|
27
|
-
const style = __spreadValues(__spreadValues({}, utilities_css.getComponentThemeToken("icon", "color", "color.text", color)), utilities_css.getResponsiveDesignToken("icon", "size", "size.icon", size));
|
|
28
|
-
return React.createElement("span", {
|
|
29
|
-
className: styles.Icon,
|
|
30
|
-
style
|
|
31
|
-
}, React.createElement(Symbol2, {
|
|
32
|
-
className: styles.Svg,
|
|
33
|
-
focusable: "false",
|
|
34
|
-
role: "img",
|
|
35
|
-
title: accessibilityLabel,
|
|
36
|
-
"aria-hidden": !accessibilityLabel ? "true" : void 0
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
exports.Icon = Icon;
|
|
@@ -1,40 +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_5mfa3_5";
|
|
20
|
-
const Svg = "_Svg_5mfa3_54";
|
|
21
|
-
const styles = {
|
|
22
|
-
Icon: Icon$1,
|
|
23
|
-
Svg
|
|
24
|
-
};
|
|
25
|
-
function Icon({ symbol: Symbol2, size = "md", color, accessibilityLabel }) {
|
|
26
|
-
const style = __spreadValues(__spreadValues({}, getComponentThemeToken("icon", "color", "color.text", color)), getResponsiveDesignToken("icon", "size", "size.icon", size));
|
|
27
|
-
return React__default.createElement("span", {
|
|
28
|
-
className: styles.Icon,
|
|
29
|
-
style
|
|
30
|
-
}, React__default.createElement(Symbol2, {
|
|
31
|
-
className: styles.Svg,
|
|
32
|
-
focusable: "false",
|
|
33
|
-
role: "img",
|
|
34
|
-
title: accessibilityLabel,
|
|
35
|
-
"aria-hidden": !accessibilityLabel ? "true" : void 0
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
Icon as I
|
|
40
|
-
};
|
|
@@ -1,268 +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
|
-
import * as React from "react";
|
|
21
|
-
import React__default, { useState } from "react";
|
|
22
|
-
import { classNames, variationName } from "../utilities/css.mjs";
|
|
23
|
-
import { s as styles, m as mapIconSize, g as getElementType, l as logWarningsForInvalidPropConfiguration, L as Label, I as InputIcon, a as InputCaption } from "./InputIcon-4a8e5243.mjs";
|
|
24
|
-
import { T as Text } from "./Text-ec2b8d8a.mjs";
|
|
25
|
-
import { I as Icon } from "./Icon-6eb724b4.mjs";
|
|
26
|
-
import { U as UnstyledButton } from "./UnstyledButton-981cd9af.mjs";
|
|
27
|
-
import { a as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./import-fbe7cc7e.mjs";
|
|
28
|
-
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./import-d2e79ac1.mjs";
|
|
29
|
-
import { g as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c, a as $6179b936705e76d3$export$ae780daf29e6d456 } from "./import-a6cadfe8.mjs";
|
|
30
|
-
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
31
|
-
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, validationState, type = "text", onChange = () => {
|
|
32
|
-
} } = props;
|
|
33
|
-
let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref);
|
|
34
|
-
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d(props);
|
|
35
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
36
|
-
labelable: true
|
|
37
|
-
});
|
|
38
|
-
const inputOnlyProps = {
|
|
39
|
-
type,
|
|
40
|
-
pattern: props.pattern
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
labelProps,
|
|
44
|
-
inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, inputElementType === "input" && inputOnlyProps, __spreadValues(__spreadValues({
|
|
45
|
-
disabled: isDisabled,
|
|
46
|
-
readOnly: isReadOnly,
|
|
47
|
-
"aria-required": isRequired || void 0,
|
|
48
|
-
"aria-invalid": validationState === "invalid" || void 0,
|
|
49
|
-
"aria-errormessage": props["aria-errormessage"],
|
|
50
|
-
"aria-activedescendant": props["aria-activedescendant"],
|
|
51
|
-
"aria-autocomplete": props["aria-autocomplete"],
|
|
52
|
-
"aria-haspopup": props["aria-haspopup"],
|
|
53
|
-
value: props.value,
|
|
54
|
-
defaultValue: props.value ? void 0 : props.defaultValue,
|
|
55
|
-
onChange: (e) => onChange(e.target.value),
|
|
56
|
-
autoComplete: props.autoComplete,
|
|
57
|
-
maxLength: props.maxLength,
|
|
58
|
-
minLength: props.minLength,
|
|
59
|
-
name: props.name,
|
|
60
|
-
placeholder: props.placeholder,
|
|
61
|
-
inputMode: props.inputMode,
|
|
62
|
-
// Clipboard events
|
|
63
|
-
onCopy: props.onCopy,
|
|
64
|
-
onCut: props.onCut,
|
|
65
|
-
onPaste: props.onPaste,
|
|
66
|
-
// Composition events
|
|
67
|
-
onCompositionEnd: props.onCompositionEnd,
|
|
68
|
-
onCompositionStart: props.onCompositionStart,
|
|
69
|
-
onCompositionUpdate: props.onCompositionUpdate,
|
|
70
|
-
// Selection events
|
|
71
|
-
onSelect: props.onSelect,
|
|
72
|
-
// Input events
|
|
73
|
-
onBeforeInput: props.onBeforeInput,
|
|
74
|
-
onInput: props.onInput
|
|
75
|
-
}, focusableProps), fieldProps)),
|
|
76
|
-
descriptionProps,
|
|
77
|
-
errorMessageProps
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
var __defProp$1 = Object.defineProperty;
|
|
81
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
82
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
83
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
84
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
configurable: true,
|
|
87
|
-
writable: true,
|
|
88
|
-
value
|
|
89
|
-
}) : obj[key] = value;
|
|
90
|
-
var __spreadValues$1 = (a, b) => {
|
|
91
|
-
for (var prop in b || (b = {}))
|
|
92
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
93
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
94
|
-
if (__getOwnPropSymbols$1)
|
|
95
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
96
|
-
if (__propIsEnum$1.call(b, prop))
|
|
97
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
98
|
-
}
|
|
99
|
-
return a;
|
|
100
|
-
};
|
|
101
|
-
var __objRest$1 = (source, exclude) => {
|
|
102
|
-
var target = {};
|
|
103
|
-
for (var prop in source)
|
|
104
|
-
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
105
|
-
target[prop] = source[prop];
|
|
106
|
-
if (source != null && __getOwnPropSymbols$1)
|
|
107
|
-
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
108
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
109
|
-
target[prop] = source[prop];
|
|
110
|
-
}
|
|
111
|
-
return target;
|
|
112
|
-
};
|
|
113
|
-
const Visibility = (_a) => {
|
|
114
|
-
var _b = _a, { title, titleId } = _b, props = __objRest$1(_b, ["title", "titleId"]);
|
|
115
|
-
return React.createElement("svg", __spreadValues$1({
|
|
116
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
117
|
-
viewBox: "0 -960 960 960",
|
|
118
|
-
"aria-labelledby": titleId
|
|
119
|
-
}, props), title ? React.createElement("title", {
|
|
120
|
-
id: titleId
|
|
121
|
-
}, title) : null, React.createElement("path", {
|
|
122
|
-
d: "M480.208-344.232q64.638 0 110.099-45.669 45.461-45.67 45.461-110.307 0-64.638-45.669-110.099-45.67-45.461-110.307-45.461-64.638 0-110.099 45.669-45.461 45.67-45.461 110.307 0 64.638 45.669 110.099 45.67 45.461 110.307 45.461Zm-.511-44.922q-46.312 0-78.428-32.418-32.115-32.419-32.115-78.731t32.418-78.428q32.419-32.115 78.731-32.115t78.428 32.418q32.115 32.419 32.115 78.731t-32.418 78.428q-32.419 32.115-78.731 32.115Zm.358 169.153q-137.593 0-249.823-77.038Q118.001-374.078 61.54-500q56.461-125.922 168.637-202.961 112.175-77.038 249.768-77.038 137.593 0 249.823 77.038Q841.999-625.922 898.46-500q-56.461 125.922-168.637 202.961-112.175 77.038-249.768 77.038ZM480-500Zm-.169 234.615q119.246 0 218.823-63.769Q798.23-392.923 850.461-500 798.23-607.077 698.822-670.846q-99.408-63.769-218.653-63.769-119.246 0-218.823 63.769Q161.77-607.077 108.924-500q52.846 107.077 152.254 170.846 99.408 63.769 218.653 63.769Z"
|
|
123
|
-
}));
|
|
124
|
-
};
|
|
125
|
-
var __defProp2 = Object.defineProperty;
|
|
126
|
-
var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
|
|
127
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
128
|
-
var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
|
|
129
|
-
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
|
|
130
|
-
enumerable: true,
|
|
131
|
-
configurable: true,
|
|
132
|
-
writable: true,
|
|
133
|
-
value
|
|
134
|
-
}) : obj[key] = value;
|
|
135
|
-
var __spreadValues2 = (a, b) => {
|
|
136
|
-
for (var prop in b || (b = {}))
|
|
137
|
-
if (__hasOwnProp2.call(b, prop))
|
|
138
|
-
__defNormalProp2(a, prop, b[prop]);
|
|
139
|
-
if (__getOwnPropSymbols2)
|
|
140
|
-
for (var prop of __getOwnPropSymbols2(b)) {
|
|
141
|
-
if (__propIsEnum2.call(b, prop))
|
|
142
|
-
__defNormalProp2(a, prop, b[prop]);
|
|
143
|
-
}
|
|
144
|
-
return a;
|
|
145
|
-
};
|
|
146
|
-
var __objRest = (source, exclude) => {
|
|
147
|
-
var target = {};
|
|
148
|
-
for (var prop in source)
|
|
149
|
-
if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
150
|
-
target[prop] = source[prop];
|
|
151
|
-
if (source != null && __getOwnPropSymbols2)
|
|
152
|
-
for (var prop of __getOwnPropSymbols2(source)) {
|
|
153
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum2.call(source, prop))
|
|
154
|
-
target[prop] = source[prop];
|
|
155
|
-
}
|
|
156
|
-
return target;
|
|
157
|
-
};
|
|
158
|
-
const VisibilityOff = (_a) => {
|
|
159
|
-
var _b = _a, { title, titleId } = _b, props = __objRest(_b, ["title", "titleId"]);
|
|
160
|
-
return React.createElement("svg", __spreadValues2({
|
|
161
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
162
|
-
viewBox: "0 -960 960 960",
|
|
163
|
-
"aria-labelledby": titleId
|
|
164
|
-
}, props), title ? React.createElement("title", {
|
|
165
|
-
id: titleId
|
|
166
|
-
}, title) : null, React.createElement("path", {
|
|
167
|
-
d: "m620.153-434.386-34.768-34.768q21.384-67.539-28.539-111.461-49.923-43.923-107.692-24.77l-34.768-34.768q13.538-7.923 30.307-11.769T480-655.768q65.23 0 110.499 45.269Q635.768-565.23 635.768-500q0 18.538-4.154 35.999-4.153 17.462-11.461 29.615Zm127.846 126.692-31.153-29.999q45.923-34.077 80.692-75.884 34.769-41.808 52.923-86.423-50-108.307-148.461-171.461-98.462-63.154-214.693-63.154-38.538 0-78.114 7.038-39.577 7.039-65.346 16.885l-34.846-35.461q33.462-14.461 81.423-24.153 47.961-9.693 93.422-9.693 134.538 0 248.038 76.115Q845.383-627.769 898.46-500q-24.461 57.461-62.192 105.653-37.731 48.192-88.269 86.653Zm59.923 216.769-161.845-160q-30.769 13.616-74.384 22.27-43.616 8.654-91.693 8.654-137.538 0-250.768-76.115Q116.001-372.231 61.54-500q21.539-52.385 59.154-101.115 37.616-48.731 87.077-89.115L85.233-812.384l31.999-32.615L837.691-124.54l-29.769 33.615ZM238.77-658.231q-37.384 26.231-74.961 71-37.578 44.769-54.885 87.231 50.615 108.307 150.807 171.461 100.192 63.154 225.961 63.154 37.231 0 73.655-5.731 36.423-5.731 52.423-14.115l-70.924-70.924q-10.615 5.385-28.346 8.654t-32.5 3.269q-64.615 0-110.192-44.961Q324.232-434.154 324.232-500q0-15 3.269-31.923t8.654-28.923l-97.385-97.385ZM531.462-517Zm-105.999 53.384Z"
|
|
168
|
-
}));
|
|
169
|
-
};
|
|
170
|
-
function PasswordButton(props) {
|
|
171
|
-
const { hasError = false, inputSize = "md", isDisabled = false, isPasswordVisible = false, toggleVisibility, isInputHovered = false } = props;
|
|
172
|
-
return React__default.createElement(UnstyledButton, {
|
|
173
|
-
className: classNames(styles.passwordBtn, isInputHovered && styles.hovered, hasError && styles.passwordBtnError, styles[variationName("passwordBtn", inputSize)]),
|
|
174
|
-
onPress: toggleVisibility,
|
|
175
|
-
isDisabled
|
|
176
|
-
}, React__default.createElement(Text, {
|
|
177
|
-
visuallyHidden: true
|
|
178
|
-
}, "password visibility"), React__default.createElement(Icon, {
|
|
179
|
-
symbol: isPasswordVisible ? Visibility : VisibilityOff,
|
|
180
|
-
size: mapIconSize(inputSize)
|
|
181
|
-
}));
|
|
182
|
-
}
|
|
183
|
-
function useInputField(props, ref) {
|
|
184
|
-
const { isMultiline = false } = props;
|
|
185
|
-
const { labelProps, inputProps, descriptionProps: helperTextProps, errorMessageProps: errorTextProps } = $2d73ec29415bd339$export$712718f7aec83d5(__spreadProps(__spreadValues({}, props), {
|
|
186
|
-
inputElementType: getElementType(isMultiline)
|
|
187
|
-
}), ref);
|
|
188
|
-
let elementProps = {};
|
|
189
|
-
if (isMultiline) {
|
|
190
|
-
elementProps = inputProps;
|
|
191
|
-
} else {
|
|
192
|
-
elementProps = inputProps;
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
labelProps,
|
|
196
|
-
elementProps,
|
|
197
|
-
helperTextProps,
|
|
198
|
-
errorTextProps
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
function InputField(props) {
|
|
202
|
-
const { isMultiline = false, type = "text", size = "md", isLabelVisuallyHidden = false, isDisabled = false, isRequired = false, validationState = "valid", isLabelEmphasized = false, autoFocus = false, label, errorText, helperText, placeholder, value, defaultValue, iconAtStart, iconAtEnd, rows } = props;
|
|
203
|
-
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
204
|
-
const ref = React__default.useRef(null);
|
|
205
|
-
const { labelProps, elementProps, helperTextProps, errorTextProps } = useInputField(props, ref);
|
|
206
|
-
const { isHovered: isInputHovered, hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456(props);
|
|
207
|
-
const Component = getElementType(isMultiline);
|
|
208
|
-
const bothIconPropsDefined = !!iconAtEnd && !!iconAtStart;
|
|
209
|
-
const smallSizeTextarea = size === "sm" && Component === "textarea";
|
|
210
|
-
const definedIconsWithTextarea = (!!iconAtEnd || !!iconAtStart) && Component === "textarea";
|
|
211
|
-
logWarningsForInvalidPropConfiguration(bothIconPropsDefined, smallSizeTextarea, definedIconsWithTextarea);
|
|
212
|
-
const isPassword = type === "password";
|
|
213
|
-
const hasError = validationState === "invalid";
|
|
214
|
-
const showErrorText = hasError && errorText;
|
|
215
|
-
const showHelperText = !showErrorText && helperText;
|
|
216
|
-
const canUseIcon = !bothIconPropsDefined && !isPassword && !definedIconsWithTextarea;
|
|
217
|
-
const hasStartIcon = canUseIcon && iconAtStart;
|
|
218
|
-
const hasEndIcon = canUseIcon && iconAtEnd;
|
|
219
|
-
const isTypeAdjustedForPasswordVisibility = isPassword && isPasswordVisible;
|
|
220
|
-
const captionProps = showHelperText ? helperTextProps : errorTextProps;
|
|
221
|
-
const captionText = showHelperText ? helperText : errorText;
|
|
222
|
-
const adjustedSize = smallSizeTextarea ? "md" : size;
|
|
223
|
-
const className = classNames(styles.input, isInputHovered && styles.hovered, Component === "textarea" && styles.textArea, isPassword && styles.passwordInput, hasError && styles.errorInput, hasStartIcon && styles.iconStartInput, hasEndIcon && styles.iconEndInput, styles[variationName("inputSize", adjustedSize)]);
|
|
224
|
-
const inputType = Component === "textarea" ? void 0 : isTypeAdjustedForPasswordVisibility ? "text" : type;
|
|
225
|
-
return React__default.createElement("div", {
|
|
226
|
-
className: classNames(styles.root)
|
|
227
|
-
}, React__default.createElement(Label, __spreadValues({
|
|
228
|
-
isLabelVisuallyHidden,
|
|
229
|
-
fieldSize: adjustedSize,
|
|
230
|
-
hasError,
|
|
231
|
-
isLabelEmphasized
|
|
232
|
-
}, labelProps), label), React__default.createElement("div", {
|
|
233
|
-
className: styles.inputIconContainer
|
|
234
|
-
}, hasStartIcon && React__default.createElement(InputIcon, {
|
|
235
|
-
alignment: "start",
|
|
236
|
-
size: adjustedSize,
|
|
237
|
-
isDisabled,
|
|
238
|
-
icon: iconAtStart
|
|
239
|
-
}), React__default.createElement(Component, __spreadProps(__spreadValues(__spreadValues({}, elementProps), hoverProps), {
|
|
240
|
-
className,
|
|
241
|
-
ref,
|
|
242
|
-
type: inputType,
|
|
243
|
-
value,
|
|
244
|
-
required: isRequired,
|
|
245
|
-
disabled: isDisabled,
|
|
246
|
-
placeholder,
|
|
247
|
-
autoFocus,
|
|
248
|
-
defaultValue,
|
|
249
|
-
rows: Component === "textarea" ? rows : void 0
|
|
250
|
-
})), isPassword ? React__default.createElement(PasswordButton, {
|
|
251
|
-
isInputHovered,
|
|
252
|
-
hasError,
|
|
253
|
-
inputSize: adjustedSize,
|
|
254
|
-
isDisabled,
|
|
255
|
-
isPasswordVisible,
|
|
256
|
-
toggleVisibility: () => setIsPasswordVisible((prevVisibility) => !prevVisibility)
|
|
257
|
-
}) : hasEndIcon && React__default.createElement(InputIcon, {
|
|
258
|
-
alignment: "end",
|
|
259
|
-
size: adjustedSize,
|
|
260
|
-
isDisabled,
|
|
261
|
-
icon: iconAtEnd
|
|
262
|
-
})), (showErrorText || showHelperText) && React__default.createElement(InputCaption, __spreadValues({
|
|
263
|
-
variant: showHelperText ? "helper" : "error"
|
|
264
|
-
}, captionProps), captionText));
|
|
265
|
-
}
|
|
266
|
-
export {
|
|
267
|
-
InputField as I
|
|
268
|
-
};
|