@macive/ui 0.0.11 → 0.0.13
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/dist/locales/cs.json +1 -1
- package/dist/src/components/Input/Input.classnames.js +30 -3
- package/dist/src/components/Input/Input.js +29 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/components/Input/Input.classnames.d.ts +30 -3
- package/dist/types/src/components/Input/Input.classnames.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +70 -31
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/ui.min.css +2 -2
- package/locales/cs.json +1 -1
- package/package.json +1 -1
- package/dist/src/components/Icon/Icon.styles.js +0 -29
- package/dist/src/components/IndexTable/components/ScrollContainer/ScrollContainer.styles.js +0 -6
- package/dist/src/components/Modal/Modal.styles.js +0 -7
- package/dist/types/src/components/Icon/Icon.styles.d.ts +0 -28
- package/dist/types/src/components/Icon/Icon.styles.d.ts.map +0 -1
- package/dist/types/src/components/IndexTable/components/ScrollContainer/ScrollContainer.styles.d.ts +0 -5
- package/dist/types/src/components/IndexTable/components/ScrollContainer/ScrollContainer.styles.d.ts.map +0 -1
- package/dist/types/src/components/Modal/Modal.styles.d.ts +0 -6
- package/dist/types/src/components/Modal/Modal.styles.d.ts.map +0 -1
package/dist/locales/cs.json
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const InputClassnames = {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
4
|
+
"Backdrop-connectedLeft": "Input-connectedLeft",
|
|
5
|
+
"Backdrop-connectedRight": "Input-connectedRight",
|
|
6
|
+
"TextField": "Input-TextField",
|
|
7
|
+
"ClearButton": "Input-ClearButton",
|
|
8
|
+
"multiline": "Input-multiline",
|
|
9
|
+
"Input": "Input-Input",
|
|
10
|
+
"hasValue": "Input-hasValue",
|
|
11
|
+
"focus": "Input-focus",
|
|
12
|
+
"VerticalContent": "Input-VerticalContent",
|
|
13
|
+
"Backdrop": "Input-Backdrop",
|
|
14
|
+
"error": "Input-error",
|
|
15
|
+
"readOnly": "Input-readOnly",
|
|
16
|
+
"disabled": "Input-disabled",
|
|
17
|
+
"Prefix": "Input-Prefix",
|
|
18
|
+
"suggestion": "Input-suggestion",
|
|
19
|
+
"borderless": "Input-borderless",
|
|
20
|
+
"Input-hasClearButton": "Input-hasClearButton",
|
|
21
|
+
"Input-suffixed": "Input-suffixed",
|
|
22
|
+
"Input-alignRight": "Input-alignRight",
|
|
23
|
+
"Input-alignLeft": "Input-alignLeft",
|
|
24
|
+
"Input-alignCenter": "Input-alignCenter",
|
|
25
|
+
"Suffix": "Input-Suffix",
|
|
26
|
+
"CharacterCount": "Input-CharacterCount",
|
|
27
|
+
"AlignFieldBottom": "Input-AlignFieldBottom",
|
|
28
|
+
"Spinner": "Input-Spinner",
|
|
29
|
+
"SpinnerIcon": "Input-SpinnerIcon",
|
|
30
|
+
"Resizer": "Input-Resizer",
|
|
31
|
+
"DummyInput": "Input-DummyInput",
|
|
32
|
+
"Segment": "Input-Segment",
|
|
33
|
+
"monospaced": "Input-monospaced"
|
|
7
34
|
};
|
|
8
35
|
exports.default = InputClassnames;
|
|
@@ -6,19 +6,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Input = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const css_1 = require("../../
|
|
10
|
-
const
|
|
11
|
-
const
|
|
9
|
+
const css_1 = require("../../utilities/css");
|
|
10
|
+
const unique_id_1 = require("../../utilities/unique-id");
|
|
11
|
+
const Connected_1 = require("../Connected");
|
|
12
|
+
const Labelled_1 = require("../Labelled");
|
|
12
13
|
const Input_classnames_1 = __importDefault(require("./Input.classnames"));
|
|
13
|
-
/**
|
|
14
|
-
* A simple input component.
|
|
15
|
-
*
|
|
16
|
-
* @param props InputProps for the component.
|
|
17
|
-
* @returns A React functional component.
|
|
18
|
-
*/
|
|
19
|
-
// const Input: React.FC<InputProps> = (props) => {
|
|
20
14
|
exports.Input = react_1.default.forwardRef((props, ref) => {
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var _a;
|
|
16
|
+
const { prefix, suffix, verticalContent, placeholder,
|
|
17
|
+
// value = '',
|
|
18
|
+
helpText, label, labelAction, labelHidden, disabled, clearButton, readOnly, autoFocus, focused, error, connectedRight, connectedLeft, type = 'text', name, id: idProp, role, autoComplete, max, maxLength, min, showCharacterCount, requiredIndicator, monospaced, suggestion, onClearButtonClick, borderless, align, ...rest } = props;
|
|
19
|
+
const id = (0, unique_id_1.useUniqueId)('TextField', idProp);
|
|
20
|
+
const className = (0, css_1.classNames)(Input_classnames_1.default.TextField,
|
|
21
|
+
// Boolean(normalizedValue) && styles.hasValue,
|
|
22
|
+
disabled && Input_classnames_1.default.disabled, readOnly && Input_classnames_1.default.readOnly, error && Input_classnames_1.default.error, borderless && Input_classnames_1.default.borderless);
|
|
23
|
+
const inputClassName = (0, css_1.classNames)(Input_classnames_1.default.Input, suffix && Input_classnames_1.default['Input'], clearButton && Input_classnames_1.default['Input-hasClearButton'], monospaced && Input_classnames_1.default.monospaced, suggestion && Input_classnames_1.default.suggestion,
|
|
24
|
+
//@ts-expect-error
|
|
25
|
+
align && Input_classnames_1.default[variationName('Input-align', align)]);
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(Labelled_1.Labelled, { label: label, id: id, error: error, action: labelAction, labelHidden: labelHidden, helpText: helpText, requiredIndicator: requiredIndicator, children: (0, jsx_runtime_1.jsx)(Connected_1.Connected, { left: connectedLeft, right: connectedRight, children: (0, jsx_runtime_1.jsxs)("div", { className: className, children: [prefix ? ((0, jsx_runtime_1.jsx)("div", { className: Input_classnames_1.default.Prefix, id: `${id}-Prefix`, children: prefix })) : null, (0, jsx_runtime_1.jsx)("input", { ...{
|
|
27
|
+
name,
|
|
28
|
+
id,
|
|
29
|
+
disabled,
|
|
30
|
+
readOnly,
|
|
31
|
+
role,
|
|
32
|
+
autoFocus,
|
|
33
|
+
placeholder,
|
|
34
|
+
autoComplete,
|
|
35
|
+
className: inputClassName,
|
|
36
|
+
min,
|
|
37
|
+
max,
|
|
38
|
+
...rest,
|
|
39
|
+
}, ref: (_a = rest.ref) !== null && _a !== void 0 ? _a : ref }), suffix ? ((0, jsx_runtime_1.jsx)("div", { className: Input_classnames_1.default.Suffix, id: `${id}-Suffix`, children: suffix })) : null, showCharacterCount ? ((0, jsx_runtime_1.jsx)("div", { id: `${id}-CharacterCounter`, className: Input_classnames_1.default.CharacterCount, "aria-atomic": 'true', children: rest.value })) : null, (0, jsx_runtime_1.jsx)("div", { className: (0, css_1.classNames)(Input_classnames_1.default.Backdrop, connectedLeft && Input_classnames_1.default['Backdrop-connectedLeft'], connectedRight && Input_classnames_1.default['Backdrop-connectedRight']) })] }) }) }));
|
|
23
40
|
});
|
|
24
41
|
exports.Input.displayName = 'Input';
|