@decisiv/ui-components 2.0.1-alpha.70 → 2.0.1-alpha.74
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/lib/atoms/BooleanInput/index.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/index.js +19 -2
- package/lib/atoms/BooleanInput/index.test.js +17 -6
- package/lib/atoms/BooleanInput/types.d.ts +2 -0
- package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +4 -3
- package/lib/atoms/InputField/index.test.js +91 -0
- package/lib/atoms/OptionsList/Option.js +2 -2
- package/lib/atoms/OptionsList/index.test.js +77 -14
- package/lib/atoms/RequiredIcon.d.ts +9 -0
- package/lib/atoms/RequiredIcon.d.ts.map +1 -0
- package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Checkbox/index.js +3 -1
- package/lib/components/Checkbox/schema.d.ts.map +1 -1
- package/lib/components/Checkbox/schema.js +2 -0
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +27 -18
- package/lib/components/Combobox/index.test.js +172 -52
- package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/index.js +5 -1
- package/package.json +2 -2
- package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
- package/lib/atoms/InputField/RequiredIcon.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/BooleanInput/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAKZ,sBAAsB,EACvB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/BooleanInput/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAKZ,sBAAsB,EACvB,MAAM,OAAO,CAAC;AAaf,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc,SAAS,CAAC;AAsGxB,QAAA,MAAM,mBAAmB,EAAE,sBAAsB,CAC/C,YAAY,EACZ,KAAK,CACqB,CAAC;AAE7B,eAAe,mBAAmB,CAAC"}
|
|
@@ -12,6 +12,12 @@ var _Check = _interopRequireDefault(require("@decisiv/iconix/lib/components/Chec
|
|
|
12
12
|
|
|
13
13
|
var _Message = _interopRequireDefault(require("../../components/Message"));
|
|
14
14
|
|
|
15
|
+
var _Tooltip = _interopRequireDefault(require("../../components/Tooltip"));
|
|
16
|
+
|
|
17
|
+
var _RequiredIcon = _interopRequireDefault(require("../RequiredIcon"));
|
|
18
|
+
|
|
19
|
+
var _useTranslations = _interopRequireDefault(require("../../utils/useTranslations"));
|
|
20
|
+
|
|
15
21
|
var _useUniqueId = _interopRequireDefault(require("../../utils/useUniqueId"));
|
|
16
22
|
|
|
17
23
|
var _elements = require("./elements");
|
|
@@ -50,6 +56,8 @@ var BooleanInput = function BooleanInput(props, ref) {
|
|
|
50
56
|
className = props.className,
|
|
51
57
|
disabled = props.disabled,
|
|
52
58
|
id = props.id,
|
|
59
|
+
required = props.required,
|
|
60
|
+
requiredMessageProp = props.requiredMessage,
|
|
53
61
|
label = props.label,
|
|
54
62
|
readOnly = props.readOnly,
|
|
55
63
|
size = props.size,
|
|
@@ -57,7 +65,7 @@ var BooleanInput = function BooleanInput(props, ref) {
|
|
|
57
65
|
inputRef = props.inputRef,
|
|
58
66
|
providedType = props.type,
|
|
59
67
|
warningMessage = props.warningMessage,
|
|
60
|
-
rest = _objectWithoutProperties(props, ["aria-describedby", "className", "disabled", "id", "label", "readOnly", "size", "status", "inputRef", "type", "warningMessage"]);
|
|
68
|
+
rest = _objectWithoutProperties(props, ["aria-describedby", "className", "disabled", "id", "required", "requiredMessage", "label", "readOnly", "size", "status", "inputRef", "type", "warningMessage"]);
|
|
61
69
|
|
|
62
70
|
var type = !validTypes.includes(providedType) ? 'checkbox' : providedType;
|
|
63
71
|
var uuid = (0, _useUniqueId.default)(id, 'input-');
|
|
@@ -67,6 +75,8 @@ var BooleanInput = function BooleanInput(props, ref) {
|
|
|
67
75
|
var Mark = (0, _react.useMemo)(function () {
|
|
68
76
|
return marks[type];
|
|
69
77
|
}, [type]);
|
|
78
|
+
var translate = (0, _useTranslations.default)();
|
|
79
|
+
var requiredMessage = translate(requiredMessageProp, 'textField.requiredMessage');
|
|
70
80
|
var warningMessageId = (0, _useUniqueId.default)(undefined, 'input-warning-', [warningMessage]);
|
|
71
81
|
return _react.default.createElement(_elements.Container, {
|
|
72
82
|
className: className,
|
|
@@ -78,6 +88,7 @@ var BooleanInput = function BooleanInput(props, ref) {
|
|
|
78
88
|
warningMessage: warningMessage
|
|
79
89
|
}, _react.default.createElement("input", _extends({}, rest, {
|
|
80
90
|
"aria-describedby": warningMessage ? "".concat(ariaDescribedBy || '', " ").concat(warningMessageId) : ariaDescribedBy,
|
|
91
|
+
required: required,
|
|
81
92
|
ref: inputRef,
|
|
82
93
|
id: uuid,
|
|
83
94
|
type: type // Checkbox/Radio inputs don't support read-only,
|
|
@@ -93,7 +104,13 @@ var BooleanInput = function BooleanInput(props, ref) {
|
|
|
93
104
|
}, _react.default.createElement(_elements.StyledInput, null, _react.default.createElement(Mark, {
|
|
94
105
|
size: size === 'small' ? 'small' : 'medium',
|
|
95
106
|
"aria-hidden": true
|
|
96
|
-
})), text && _react.default.createElement("span", null, text
|
|
107
|
+
})), text && _react.default.createElement("span", null, text, required && _react.default.createElement(_Tooltip.default, {
|
|
108
|
+
placement: "top",
|
|
109
|
+
target: _react.default.createElement(_RequiredIcon.default, {
|
|
110
|
+
marginTop: "-3px",
|
|
111
|
+
"aria-label": requiredMessage
|
|
112
|
+
})
|
|
113
|
+
}, requiredMessage))), warningMessage && _react.default.createElement(_Message.default, {
|
|
97
114
|
id: warningMessageId,
|
|
98
115
|
intent: "warning"
|
|
99
116
|
}, warningMessage));
|
|
@@ -95,35 +95,46 @@ describe('BooleanInput', function () {
|
|
|
95
95
|
var input = container.querySelector('input');
|
|
96
96
|
expect(input.checked).toBe(true);
|
|
97
97
|
});
|
|
98
|
-
it('renders correctly
|
|
98
|
+
it('renders correctly when required', function () {
|
|
99
99
|
var _render8 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
100
100
|
id: "input",
|
|
101
101
|
type: type,
|
|
102
|
-
|
|
102
|
+
required: true,
|
|
103
|
+
label: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
103
104
|
})),
|
|
104
105
|
container = _render8.container;
|
|
105
106
|
|
|
106
107
|
expect(container).toMatchSnapshot();
|
|
107
108
|
});
|
|
108
|
-
it('renders correctly with
|
|
109
|
+
it('renders correctly with status warning', function () {
|
|
109
110
|
var _render9 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
110
111
|
id: "input",
|
|
111
112
|
type: type,
|
|
112
|
-
|
|
113
|
+
status: "warning"
|
|
113
114
|
})),
|
|
114
115
|
container = _render9.container;
|
|
115
116
|
|
|
116
117
|
expect(container).toMatchSnapshot();
|
|
117
118
|
});
|
|
119
|
+
it('renders correctly with a warning message', function () {
|
|
120
|
+
var _render10 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
121
|
+
id: "input",
|
|
122
|
+
type: type,
|
|
123
|
+
warningMessage: "warning message"
|
|
124
|
+
})),
|
|
125
|
+
container = _render10.container;
|
|
126
|
+
|
|
127
|
+
expect(container).toMatchSnapshot();
|
|
128
|
+
});
|
|
118
129
|
});
|
|
119
130
|
});
|
|
120
131
|
it('falls back to type "checkbox" when provided an invalid type', function () {
|
|
121
|
-
var
|
|
132
|
+
var _render11 = (0, _react2.render)( // @ts-ignore invalid type
|
|
122
133
|
_react.default.createElement(_.default, {
|
|
123
134
|
type: "foo",
|
|
124
135
|
"data-testid": "input"
|
|
125
136
|
})),
|
|
126
|
-
getByTestId =
|
|
137
|
+
getByTestId = _render11.getByTestId;
|
|
127
138
|
|
|
128
139
|
expect(getByTestId('input').getAttribute('type')).toBe('checkbox');
|
|
129
140
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/BooleanInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEtD,oBAAY,QAAQ,GAAG,gBAAgB,CAAC;AACxC,oBAAY,YAAY,GAAG,cAAc,CAAC;AAE1C,aAAK,SAAS,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/BooleanInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEtD,oBAAY,QAAQ,GAAG,gBAAgB,CAAC;AACxC,oBAAY,YAAY,GAAG,cAAc,CAAC;AAE1C,aAAK,SAAS,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,GAAG,EACH,sBAAsB,EAGvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC;IACpC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAgKD,QAAA,MAAM,iBAAiB,EAAE,sBAAsB,CAC7C,GAAG,CAAC,GAAG,CAAC,EACR,mBAAmB,CACK,CAAC;AAQ3B,eAAe,iBAAiB,CAAC"}
|
|
@@ -29,7 +29,7 @@ var _Containers = require("./Containers");
|
|
|
29
29
|
|
|
30
30
|
var _InputLabel = _interopRequireDefault(require("./InputLabel"));
|
|
31
31
|
|
|
32
|
-
var _RequiredIcon = _interopRequireDefault(require("
|
|
32
|
+
var _RequiredIcon = _interopRequireDefault(require("../RequiredIcon"));
|
|
33
33
|
|
|
34
34
|
var _HelpMessage = _interopRequireDefault(require("./HelpMessage"));
|
|
35
35
|
|
|
@@ -132,8 +132,9 @@ function InputField(props, targetRef) {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
var onChangeHandler = function onChangeHandler(event) {
|
|
135
|
-
if (event && event.target
|
|
136
|
-
|
|
135
|
+
if (event && event.target) {
|
|
136
|
+
var targetValue = event.target.value;
|
|
137
|
+
setContentLength(targetValue ? targetValue.length : 0);
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
if (onChange) {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require("."));
|
|
10
|
+
|
|
11
|
+
var _providers = require("../../providers");
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }
|
|
16
|
+
|
|
17
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
18
|
+
|
|
19
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
|
|
21
|
+
describe('InputField', function () {
|
|
22
|
+
var wrapper = function wrapper(_ref) {
|
|
23
|
+
var children = _ref.children;
|
|
24
|
+
return _react.default.createElement(_providers.ConfigProvider, null, children);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var render = function render(ui, options) {
|
|
28
|
+
return (0, _react2.render)(ui, _objectSpread({}, options, {
|
|
29
|
+
wrapper: wrapper
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var Dummy = _styledComponents.default.textarea.attrs({
|
|
34
|
+
'data-testid': 'test-textarea'
|
|
35
|
+
}).withConfig({
|
|
36
|
+
displayName: "indextest__Dummy",
|
|
37
|
+
componentId: "i3buhi-0"
|
|
38
|
+
})([""]);
|
|
39
|
+
|
|
40
|
+
var textFinder = function textFinder(text) {
|
|
41
|
+
return function (content, node) {
|
|
42
|
+
var hasText = function hasText(n) {
|
|
43
|
+
return n.textContent === text;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var nodeHasText = hasText(node);
|
|
47
|
+
var childrenDontHaveText = Array.from(node.children).every(function (child) {
|
|
48
|
+
return !hasText(child);
|
|
49
|
+
});
|
|
50
|
+
return nodeHasText && childrenDontHaveText;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
describe('character counter', function () {
|
|
55
|
+
it('updates as text is entered', function () {
|
|
56
|
+
var label = 'label';
|
|
57
|
+
var initialValue = 'Initial text';
|
|
58
|
+
|
|
59
|
+
var _render = render(_react.default.createElement(_.default, {
|
|
60
|
+
label: label,
|
|
61
|
+
value: initialValue,
|
|
62
|
+
showCharacterCount: true,
|
|
63
|
+
maxLength: 100
|
|
64
|
+
}, function (p) {
|
|
65
|
+
return _react.default.createElement(Dummy, p);
|
|
66
|
+
})),
|
|
67
|
+
getByText = _render.getByText,
|
|
68
|
+
getByTestId = _render.getByTestId;
|
|
69
|
+
|
|
70
|
+
expect(getByText(textFinder("You have ".concat(100 - initialValue.length, " characters left (100 max).")))).toBeTruthy();
|
|
71
|
+
var textarea = getByTestId('test-textarea');
|
|
72
|
+
var newValue = "".concat(initialValue, " with some additional text");
|
|
73
|
+
|
|
74
|
+
_react2.fireEvent.change(textarea, {
|
|
75
|
+
target: {
|
|
76
|
+
value: newValue
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(getByText(textFinder("You have ".concat(100 - newValue.length, " characters left (100 max).")))).toBeTruthy();
|
|
81
|
+
|
|
82
|
+
_react2.fireEvent.change(textarea, {
|
|
83
|
+
target: {
|
|
84
|
+
value: ''
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
expect(getByText(textFinder("You have 100 characters left (100 max)."))).toBeTruthy();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -138,8 +138,8 @@ function Option(props) {
|
|
|
138
138
|
updateActiveId(disabled ? '' : id);
|
|
139
139
|
}, [setInputMethod, updateActiveId, disabled, id]);
|
|
140
140
|
var handleClick = (0, _react.useCallback)(function () {
|
|
141
|
-
toggleItemSelection(id);
|
|
142
|
-
}, [toggleItemSelection, id]);
|
|
141
|
+
if (!disabled) toggleItemSelection(id);
|
|
142
|
+
}, [toggleItemSelection, id, disabled]);
|
|
143
143
|
var LabelWrapper = (0, _react.useMemo)(function () {
|
|
144
144
|
return function (_ref2) {
|
|
145
145
|
var children = _ref2.children;
|
|
@@ -41,6 +41,8 @@ var item0Id = '0';
|
|
|
41
41
|
var item0Label = 'Option 0';
|
|
42
42
|
var item2Id = '2';
|
|
43
43
|
var item2Label = 'Option 2';
|
|
44
|
+
var disabledItemLabel = 'Option 4';
|
|
45
|
+
var disabledItemId = '4';
|
|
44
46
|
var items = [{
|
|
45
47
|
id: item0Id,
|
|
46
48
|
label: item0Label,
|
|
@@ -75,8 +77,8 @@ var items = [{
|
|
|
75
77
|
}, {
|
|
76
78
|
label: 'Category 2',
|
|
77
79
|
items: [{
|
|
78
|
-
id:
|
|
79
|
-
label:
|
|
80
|
+
id: disabledItemId,
|
|
81
|
+
label: disabledItemLabel,
|
|
80
82
|
value: '4',
|
|
81
83
|
disabled: true
|
|
82
84
|
}, {
|
|
@@ -189,15 +191,58 @@ describe('OptionsList', function () {
|
|
|
189
191
|
expect(onChange).toHaveBeenCalledWith(selectedItem.id);
|
|
190
192
|
expect(getByLabelText(selectedItem.label)).toBeChecked();
|
|
191
193
|
});
|
|
194
|
+
describe('selecting disabled element with keyboard', function () {
|
|
195
|
+
it('selects an item with Enter or Space key', function () {
|
|
196
|
+
var onChange = jest.fn();
|
|
197
|
+
var onlyDisabledItems = [{
|
|
198
|
+
id: '2',
|
|
199
|
+
label: 'Option 2',
|
|
200
|
+
value: '2',
|
|
201
|
+
disabled: true
|
|
202
|
+
}, {
|
|
203
|
+
id: disabledItemId,
|
|
204
|
+
label: disabledItemLabel,
|
|
205
|
+
value: '4',
|
|
206
|
+
disabled: true
|
|
207
|
+
}];
|
|
208
|
+
|
|
209
|
+
var _render5 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
210
|
+
items: onlyDisabledItems,
|
|
211
|
+
onChange: onChange
|
|
212
|
+
}))),
|
|
213
|
+
getByLabelText = _render5.getByLabelText,
|
|
214
|
+
container = _render5.container;
|
|
215
|
+
|
|
216
|
+
var optionsList = container.querySelector('ul'); // simulate it is focused while tabbing
|
|
217
|
+
|
|
218
|
+
_react2.fireEvent.keyDown(container, {
|
|
219
|
+
key: 'Tab'
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
_react2.fireEvent.focus(optionsList);
|
|
223
|
+
|
|
224
|
+
_react2.fireEvent.keyDown(optionsList, {
|
|
225
|
+
key: 'ArrowDown'
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
_react2.fireEvent.keyDown(optionsList, {
|
|
229
|
+
key: 'Enter'
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
expect(onChange).not.toHaveBeenCalledWith(disabledItemId);
|
|
233
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
234
|
+
expect(getByLabelText(disabledItemLabel)).not.toBeChecked();
|
|
235
|
+
});
|
|
236
|
+
});
|
|
192
237
|
describe('single selection', function () {
|
|
193
238
|
it('calls onChange with id when item is clicked', function () {
|
|
194
239
|
var onChange = jest.fn();
|
|
195
240
|
|
|
196
|
-
var
|
|
241
|
+
var _render6 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
197
242
|
onChange: onChange
|
|
198
243
|
}))),
|
|
199
|
-
getByText =
|
|
200
|
-
getByLabelText =
|
|
244
|
+
getByText = _render6.getByText,
|
|
245
|
+
getByLabelText = _render6.getByLabelText;
|
|
201
246
|
|
|
202
247
|
var item = items[0];
|
|
203
248
|
|
|
@@ -212,15 +257,33 @@ describe('OptionsList', function () {
|
|
|
212
257
|
|
|
213
258
|
expect(getByLabelText(subItem.label)).toBeChecked();
|
|
214
259
|
});
|
|
260
|
+
describe('disabled element', function () {
|
|
261
|
+
it('does not calls onChange when item is clicked', function () {
|
|
262
|
+
var onChange = jest.fn();
|
|
263
|
+
|
|
264
|
+
var _render7 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
265
|
+
onChange: onChange
|
|
266
|
+
}))),
|
|
267
|
+
getByText = _render7.getByText,
|
|
268
|
+
getByLabelText = _render7.getByLabelText;
|
|
269
|
+
|
|
270
|
+
_react2.fireEvent.click(getByText(disabledItemLabel));
|
|
271
|
+
|
|
272
|
+
expect(onChange).not.toHaveBeenLastCalledWith(disabledItemId);
|
|
273
|
+
expect(onChange).not.toHaveBeenCalled(); // the item shouldn't be marked as selected
|
|
274
|
+
|
|
275
|
+
expect(getByLabelText(disabledItemLabel)).not.toBeChecked();
|
|
276
|
+
});
|
|
277
|
+
});
|
|
215
278
|
describe('controlled', function () {
|
|
216
279
|
it('prefers value over internal', function () {
|
|
217
280
|
var selected = items[1];
|
|
218
281
|
|
|
219
|
-
var
|
|
282
|
+
var _render8 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
220
283
|
selected: selected.id
|
|
221
284
|
}))),
|
|
222
|
-
getByText =
|
|
223
|
-
getByLabelText =
|
|
285
|
+
getByText = _render8.getByText,
|
|
286
|
+
getByLabelText = _render8.getByLabelText;
|
|
224
287
|
|
|
225
288
|
var item = items[0];
|
|
226
289
|
|
|
@@ -235,12 +298,12 @@ describe('OptionsList', function () {
|
|
|
235
298
|
it('calls onChange with array of selected ids when item is clicked', function () {
|
|
236
299
|
var onChange = jest.fn();
|
|
237
300
|
|
|
238
|
-
var
|
|
301
|
+
var _render9 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
239
302
|
onChange: onChange,
|
|
240
303
|
multiple: true
|
|
241
304
|
}))),
|
|
242
|
-
getByText =
|
|
243
|
-
getByLabelText =
|
|
305
|
+
getByText = _render9.getByText,
|
|
306
|
+
getByLabelText = _render9.getByLabelText;
|
|
244
307
|
|
|
245
308
|
var item = items[0];
|
|
246
309
|
|
|
@@ -279,12 +342,12 @@ describe('OptionsList', function () {
|
|
|
279
342
|
onClick: onClick
|
|
280
343
|
}];
|
|
281
344
|
|
|
282
|
-
var
|
|
345
|
+
var _render10 = render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
283
346
|
actions: actions,
|
|
284
347
|
multiple: true
|
|
285
348
|
}))),
|
|
286
|
-
baseElement =
|
|
287
|
-
getByText =
|
|
349
|
+
baseElement = _render10.baseElement,
|
|
350
|
+
getByText = _render10.getByText;
|
|
288
351
|
|
|
289
352
|
actions.forEach(function (_ref5) {
|
|
290
353
|
var label = _ref5.text;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RefForwardingComponent, RefAttributes } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
marginLeft?: string;
|
|
4
|
+
marginTop?: string;
|
|
5
|
+
}
|
|
6
|
+
declare type RequiredIconType = RefForwardingComponent<HTMLDivElement, RefAttributes<HTMLDivElement> & Props>;
|
|
7
|
+
declare const RequiredIcon: RequiredIconType;
|
|
8
|
+
export default RequiredIcon;
|
|
9
|
+
//# sourceMappingURL=RequiredIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequiredIcon.d.ts","sourceRoot":"","sources":["../../src/atoms/RequiredIcon.tsx"],"names":[],"mappings":"AACA,OAAc,EACZ,sBAAsB,EAGtB,aAAa,EACd,MAAM,OAAO,CAAC;AAOf,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,aAAK,gBAAgB,GAAG,sBAAsB,CAC5C,cAAc,EACd,aAAa,CAAC,cAAc,CAAC,GAAG,KAAK,CACtC,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,gBASnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -21,10 +21,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
|
-
var RequiredIconContainer = _styledComponents.default.
|
|
24
|
+
var RequiredIconContainer = _styledComponents.default.div.withConfig({
|
|
25
25
|
displayName: "RequiredIcon__RequiredIconContainer",
|
|
26
|
-
componentId: "
|
|
27
|
-
})(["margin-left:
|
|
26
|
+
componentId: "sc-18pnvm5-0"
|
|
27
|
+
})(["display:inline;margin-left:", ";margin-top:", ";"], function (props) {
|
|
28
|
+
return props.marginLeft || '3px';
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.marginTop || '0px';
|
|
31
|
+
});
|
|
28
32
|
|
|
29
33
|
var RequiredIcon = (0, _react.forwardRef)(function (props, ref) {
|
|
30
34
|
return _react.default.createElement(RequiredIconContainer, _extends({}, props, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAGvE,OAAqB,EACnB,KAAK,IAAI,UAAU,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC,oBAAY,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAQ7C,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAEhE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAGvE,OAAqB,EACnB,KAAK,IAAI,UAAU,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC,oBAAY,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAQ7C,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAEhE,CAAC;AAmBF,eAAe,eAAe,CAAC"}
|
|
@@ -33,13 +33,15 @@ CheckboxWithRef.propTypes = {
|
|
|
33
33
|
label: _propTypes.default.string,
|
|
34
34
|
disabled: _propTypes.default.bool,
|
|
35
35
|
readOnly: _propTypes.default.bool,
|
|
36
|
+
required: _propTypes.default.bool,
|
|
36
37
|
size: _propTypes.default.oneOf(['normal', 'small']),
|
|
37
38
|
status: _propTypes.default.oneOf(['normal', 'warning']),
|
|
38
39
|
warningMessage: _propTypes.default.string
|
|
39
40
|
};
|
|
40
41
|
CheckboxWithRef.defaultProps = {
|
|
41
42
|
size: 'normal',
|
|
42
|
-
status: 'normal'
|
|
43
|
+
status: 'normal',
|
|
44
|
+
required: false
|
|
43
45
|
};
|
|
44
46
|
var _default = CheckboxWithRef;
|
|
45
47
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAwC,CAAC;AA4DrD,eAAe,MAAM,CAAC"}
|
|
@@ -18,6 +18,8 @@ schema.propTypes = {
|
|
|
18
18
|
defaultChecked: _reactDesc.PropTypes.bool.description('Whether or not the checkbox is initially checked. Use if you do not want to manually control the state.').defaultValue('false'),
|
|
19
19
|
disabled: _reactDesc.PropTypes.bool.description('If the checkbox should be disabled and ignore user interactions.').defaultValue('false'),
|
|
20
20
|
readOnly: _reactDesc.PropTypes.bool.description('Ignore user interactions, but still display the label in a readable manner.').defaultValue('false'),
|
|
21
|
+
required: _reactDesc.PropTypes.bool.description('Whether or not the checkbox should be required. Renders an indicator if true.').defaultValue('false'),
|
|
22
|
+
requiredMessage: _reactDesc.PropTypes.string.description('The text to display in the tooltip when hovering over the required icon. It displays "Required" by default').defaultValue('Required'),
|
|
21
23
|
size: _reactDesc.PropTypes.oneOf(['normal', 'small']).description('Controls the size of the checkbox and label.').defaultValue('normal'),
|
|
22
24
|
status: _reactDesc.PropTypes.oneOf(['normal', 'warning']).description('Whether or not to render the warning state.').defaultValue('normal'),
|
|
23
25
|
warningMessage: _reactDesc.PropTypes.string.description('The warning message to display below the checkbox. If provided, the `status` prop is automatically set to `warning`.')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.tsx"],"names":[],"mappings":"AASA,OAAc,EAGZ,sBAAsB,EAQvB,MAAM,OAAO,CAAC;AA2Bf,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAQ,MAAM,SAAS,CAAC;AAqiBhE,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAC3C,gBAAgB,EAChB,aAAa,CACS,CAAC;AAIzB,eAAe,eAAe,CAAC"}
|
|
@@ -13,6 +13,8 @@ var _get = _interopRequireDefault(require("lodash/get"));
|
|
|
13
13
|
|
|
14
14
|
var _union = _interopRequireDefault(require("lodash/union"));
|
|
15
15
|
|
|
16
|
+
var _isArray = _interopRequireDefault(require("lodash/isArray"));
|
|
17
|
+
|
|
16
18
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
17
19
|
|
|
18
20
|
var _last = _interopRequireDefault(require("lodash/last"));
|
|
@@ -175,17 +177,38 @@ function Combobox(props, ref) {
|
|
|
175
177
|
return !old;
|
|
176
178
|
});
|
|
177
179
|
}, [setIsPopoverVisibleState]);
|
|
180
|
+
/**
|
|
181
|
+
* This generates a flat list of the options (including those in categories)
|
|
182
|
+
* in the order they are presented in the dropdown list. Filtering disabled elements.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
var flatOptions = (0, _react.useMemo)(function () {
|
|
186
|
+
return options.reduce(function (acc, curr) {
|
|
187
|
+
if ((0, _utils.isCategory)(curr)) {
|
|
188
|
+
var items = (0, _isArray.default)(curr.items) ? curr.items.filter(function (option) {
|
|
189
|
+
return !option.disabled;
|
|
190
|
+
}) : [];
|
|
191
|
+
return acc.concat(items);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (!curr.disabled) {
|
|
195
|
+
return acc.concat(curr);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return acc;
|
|
199
|
+
}, []);
|
|
200
|
+
}, [options]);
|
|
178
201
|
(0, _react.useEffect)(function () {
|
|
179
|
-
// Set the "default" active ID to the first, if it exists.
|
|
180
|
-
if (!(0, _isEmpty.default)(
|
|
181
|
-
setActiveId((0, _get.default)(
|
|
202
|
+
// Set the "default" active ID to the first in flatOptions, if it exists.
|
|
203
|
+
if (!(0, _isEmpty.default)(flatOptions) && !activeId) {
|
|
204
|
+
setActiveId((0, _get.default)(flatOptions, '0.id'));
|
|
182
205
|
} // For async comboboxes, if the input is focused, the dropdown should be open.
|
|
183
206
|
|
|
184
207
|
|
|
185
208
|
if (isFocused && variant === 'async' || multiple && internalInputValue !== '') {
|
|
186
209
|
updateIsPopoverVisible(true);
|
|
187
210
|
}
|
|
188
|
-
}, [activeId, isFocused,
|
|
211
|
+
}, [activeId, isFocused, flatOptions, variant, multiple, internalInputValue, updateIsPopoverVisible]); // The selectedValue is the id of the selectedOption, or an empty string if none selected.
|
|
189
212
|
|
|
190
213
|
var _useState7 = (0, _react.useState)(!Array.isArray(propValue) && propValue || !Array.isArray(defaultValue) && defaultValue || undefined),
|
|
191
214
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
@@ -344,20 +367,6 @@ function Combobox(props, ref) {
|
|
|
344
367
|
setIsFocused(true);
|
|
345
368
|
onFocus && onFocus(event);
|
|
346
369
|
}, [onFocus, updateIsPopoverVisible, variant]);
|
|
347
|
-
/**
|
|
348
|
-
* This generates a flat list of the options (including those in categories)
|
|
349
|
-
* in the order they are presented in the dropdown list.
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
|
-
var flatOptions = (0, _react.useMemo)(function () {
|
|
353
|
-
return options.reduce(function (acc, curr) {
|
|
354
|
-
if ((0, _utils.isCategory)(curr)) {
|
|
355
|
-
return acc.concat(curr.items);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
return acc.concat(curr);
|
|
359
|
-
}, []);
|
|
360
|
-
}, [options]);
|
|
361
370
|
/**
|
|
362
371
|
* Pressing certain keys when focused on the Combobox component should trigger some actions.
|
|
363
372
|
*/
|
|
@@ -429,6 +429,54 @@ describe('Combobox', function () {
|
|
|
429
429
|
}));
|
|
430
430
|
expect(queryByLabelText('test')).toHaveValue(defaultOptions[0].label);
|
|
431
431
|
});
|
|
432
|
+
describe('with first element disabled', function () {
|
|
433
|
+
it('selects the first element that is not disabled', function () {
|
|
434
|
+
var onChangeValue = jest.fn();
|
|
435
|
+
var options = [{
|
|
436
|
+
id: '0',
|
|
437
|
+
label: 'option 0',
|
|
438
|
+
value: 'option 0',
|
|
439
|
+
disabled: true
|
|
440
|
+
}, {
|
|
441
|
+
id: '1',
|
|
442
|
+
label: 'option 1',
|
|
443
|
+
value: 'option 1'
|
|
444
|
+
}, {
|
|
445
|
+
id: '2',
|
|
446
|
+
label: 'option 2',
|
|
447
|
+
value: 'option 2'
|
|
448
|
+
}];
|
|
449
|
+
|
|
450
|
+
var _render14 = render(_react.default.createElement(_.default, {
|
|
451
|
+
label: "test",
|
|
452
|
+
onChangeValue: onChangeValue,
|
|
453
|
+
options: options
|
|
454
|
+
})),
|
|
455
|
+
baseElement = _render14.baseElement,
|
|
456
|
+
queryByText = _render14.queryByText,
|
|
457
|
+
queryByLabelText = _render14.queryByLabelText;
|
|
458
|
+
|
|
459
|
+
_react2.fireEvent.click(queryByText('test'));
|
|
460
|
+
|
|
461
|
+
_react2.fireEvent.change(queryByLabelText('test'), {
|
|
462
|
+
target: {
|
|
463
|
+
value: 'value'
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
expect((0, _react2.queryByText)(baseElement, options[1].label)).toBeInTheDocument();
|
|
468
|
+
|
|
469
|
+
_react2.fireEvent.keyDown(queryByLabelText('test'), {
|
|
470
|
+
key: 'Enter',
|
|
471
|
+
keyCode: 13
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
expect(onChangeValue).toHaveBeenCalledWith(options[1].id, expect.objectContaining({
|
|
475
|
+
removed: false
|
|
476
|
+
}));
|
|
477
|
+
expect(queryByLabelText('test')).toHaveValue(options[1].label);
|
|
478
|
+
});
|
|
479
|
+
});
|
|
432
480
|
});
|
|
433
481
|
describe('when pressing the TAB key', function () {
|
|
434
482
|
it('closes the dropdown, advances focus', function () {
|
|
@@ -437,14 +485,14 @@ describe('Combobox', function () {
|
|
|
437
485
|
|
|
438
486
|
var chevronDownPathD = chevronDownContainer.querySelector('svg path').getAttribute('d');
|
|
439
487
|
|
|
440
|
-
var
|
|
488
|
+
var _render15 = render(_react.default.createElement(_.default, {
|
|
441
489
|
label: "test",
|
|
442
490
|
options: defaultOptions
|
|
443
491
|
})),
|
|
444
|
-
baseElement =
|
|
445
|
-
container =
|
|
446
|
-
queryByText =
|
|
447
|
-
queryByLabelText =
|
|
492
|
+
baseElement = _render15.baseElement,
|
|
493
|
+
container = _render15.container,
|
|
494
|
+
queryByText = _render15.queryByText,
|
|
495
|
+
queryByLabelText = _render15.queryByLabelText;
|
|
448
496
|
|
|
449
497
|
_react2.fireEvent.click(queryByText('test'));
|
|
450
498
|
|
|
@@ -473,12 +521,12 @@ describe('Combobox', function () {
|
|
|
473
521
|
it('preserves the typed text, does NOT make a selection', function () {
|
|
474
522
|
var onChangeValue = jest.fn();
|
|
475
523
|
|
|
476
|
-
var
|
|
524
|
+
var _render16 = render(_react.default.createElement(_.default, {
|
|
477
525
|
label: "test",
|
|
478
526
|
onChangeValue: onChangeValue,
|
|
479
527
|
options: defaultOptions
|
|
480
528
|
})),
|
|
481
|
-
queryByLabelText =
|
|
529
|
+
queryByLabelText = _render16.queryByLabelText;
|
|
482
530
|
|
|
483
531
|
var value = 'value';
|
|
484
532
|
|
|
@@ -506,20 +554,20 @@ describe('Combobox', function () {
|
|
|
506
554
|
var onChangeInputValue = jest.fn();
|
|
507
555
|
var onChangeValue = jest.fn();
|
|
508
556
|
|
|
509
|
-
var
|
|
557
|
+
var _render17 = render(_react.default.createElement(_.default, {
|
|
510
558
|
label: "test",
|
|
511
559
|
onChangeInputValue: onChangeInputValue,
|
|
512
560
|
onChangeValue: onChangeValue,
|
|
513
561
|
options: defaultOptions
|
|
514
562
|
})),
|
|
515
|
-
baseElement =
|
|
516
|
-
queryByLabelText =
|
|
563
|
+
baseElement = _render17.baseElement,
|
|
564
|
+
queryByLabelText = _render17.queryByLabelText; // You can not fire an event on the input in the UI unless you are already focused on it.
|
|
517
565
|
// This click focuses on the input.
|
|
518
566
|
|
|
519
567
|
|
|
520
568
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
521
569
|
|
|
522
|
-
expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label)).toBeInTheDocument(); // The first element should be "active" by default.
|
|
570
|
+
expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label)).toBeInTheDocument(); // The first element should be "active" by default if it's not disabled.
|
|
523
571
|
|
|
524
572
|
expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
|
|
525
573
|
|
|
@@ -545,16 +593,88 @@ describe('Combobox', function () {
|
|
|
545
593
|
expect(onChangeInputValue).not.toHaveBeenCalled();
|
|
546
594
|
expect(onChangeValue).not.toHaveBeenCalled();
|
|
547
595
|
});
|
|
596
|
+
describe('with a disabled option', function () {
|
|
597
|
+
it('expands and navigates through the dropdown list, keeps focus on the input', function () {
|
|
598
|
+
var onChangeInputValue = jest.fn();
|
|
599
|
+
var onChangeValue = jest.fn();
|
|
600
|
+
var enabledElements = ['enabled 1', 'enabled 2'];
|
|
601
|
+
var options = [{
|
|
602
|
+
id: enabledElements[0],
|
|
603
|
+
label: enabledElements[0],
|
|
604
|
+
value: 'option 0'
|
|
605
|
+
}, {
|
|
606
|
+
id: '1',
|
|
607
|
+
label: 'option 1',
|
|
608
|
+
value: 'option 1',
|
|
609
|
+
disabled: true
|
|
610
|
+
}, {
|
|
611
|
+
label: 'category 0',
|
|
612
|
+
items: [{
|
|
613
|
+
id: 'cat0Opt0',
|
|
614
|
+
label: 'category 0 option 0',
|
|
615
|
+
value: 'category 0 option 0',
|
|
616
|
+
disabled: true
|
|
617
|
+
}, {
|
|
618
|
+
id: enabledElements[1],
|
|
619
|
+
label: enabledElements[1],
|
|
620
|
+
value: 'category 0 option 1'
|
|
621
|
+
}]
|
|
622
|
+
}];
|
|
623
|
+
|
|
624
|
+
var _render18 = render(_react.default.createElement(_.default, {
|
|
625
|
+
label: "test",
|
|
626
|
+
onChangeInputValue: onChangeInputValue,
|
|
627
|
+
onChangeValue: onChangeValue,
|
|
628
|
+
options: options
|
|
629
|
+
})),
|
|
630
|
+
baseElement = _render18.baseElement,
|
|
631
|
+
queryByLabelText = _render18.queryByLabelText; // You can not fire an event on the input in the UI unless you are already focused on it.
|
|
632
|
+
// This click focuses on the input.
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
_react2.fireEvent.click(queryByLabelText('test'));
|
|
636
|
+
|
|
637
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[0])).toBeInTheDocument(); // The first element should be "active" by default if it's not disabled.
|
|
638
|
+
|
|
639
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The focus should always remain on the input. The "active" item is kind of a fake.
|
|
640
|
+
|
|
641
|
+
expect(queryByLabelText('test')).toHaveFocus();
|
|
642
|
+
|
|
643
|
+
_react2.fireEvent.keyDown(queryByLabelText('test'), {
|
|
644
|
+
key: 'ArrowDown',
|
|
645
|
+
keyCode: 40
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The next active element should be the next element in the list
|
|
649
|
+
// that is not marked as disabled
|
|
650
|
+
|
|
651
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[1]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
|
|
652
|
+
expect(queryByLabelText('test')).toHaveFocus();
|
|
653
|
+
|
|
654
|
+
_react2.fireEvent.keyDown(queryByLabelText('test'), {
|
|
655
|
+
key: 'ArrowUp',
|
|
656
|
+
keyCode: 38
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[1]).parentElement.parentElement).not.toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n ")); // The next active element should be the previous element in the list
|
|
660
|
+
// that is not marked as disabled
|
|
661
|
+
|
|
662
|
+
expect((0, _react2.queryByText)(baseElement, enabledElements[0]).parentElement.parentElement).toHaveStyle("\n background: ".concat((0, _toColorString.default)(_color.default.interaction.pacificOcean15), ";\n color: ").concat((0, _toColorString.default)(_color.default.interaction.pacificOcean), ";\n "));
|
|
663
|
+
expect(queryByLabelText('test')).toHaveFocus();
|
|
664
|
+
expect(onChangeInputValue).not.toHaveBeenCalled();
|
|
665
|
+
expect(onChangeValue).not.toHaveBeenCalled();
|
|
666
|
+
});
|
|
667
|
+
});
|
|
548
668
|
});
|
|
549
669
|
describe('when pressing the ESCAPE key', function () {
|
|
550
670
|
it('closes the dropdown, keeps focus on input', function () {
|
|
551
|
-
var
|
|
671
|
+
var _render19 = render(_react.default.createElement(_.default, {
|
|
552
672
|
label: "test",
|
|
553
673
|
options: defaultOptions
|
|
554
674
|
})),
|
|
555
|
-
baseElement =
|
|
556
|
-
queryByLabelText =
|
|
557
|
-
queryByText =
|
|
675
|
+
baseElement = _render19.baseElement,
|
|
676
|
+
queryByLabelText = _render19.queryByLabelText,
|
|
677
|
+
queryByText = _render19.queryByText;
|
|
558
678
|
|
|
559
679
|
_react2.fireEvent.click(queryByText('test'));
|
|
560
680
|
|
|
@@ -572,13 +692,13 @@ describe('Combobox', function () {
|
|
|
572
692
|
it('preserves the typed text, does NOT make a selection', function () {
|
|
573
693
|
var onChangeValue = jest.fn();
|
|
574
694
|
|
|
575
|
-
var
|
|
695
|
+
var _render20 = render(_react.default.createElement(_.default, {
|
|
576
696
|
label: "test",
|
|
577
697
|
options: defaultOptions,
|
|
578
698
|
onChangeValue: onChangeValue
|
|
579
699
|
})),
|
|
580
|
-
queryByLabelText =
|
|
581
|
-
queryByText =
|
|
700
|
+
queryByLabelText = _render20.queryByLabelText,
|
|
701
|
+
queryByText = _render20.queryByText;
|
|
582
702
|
|
|
583
703
|
var value = 'value';
|
|
584
704
|
|
|
@@ -604,18 +724,18 @@ describe('Combobox', function () {
|
|
|
604
724
|
});
|
|
605
725
|
describe('when the input field has text', function () {
|
|
606
726
|
it('renders the "clear" button', function () {
|
|
607
|
-
var
|
|
608
|
-
timesContainer =
|
|
727
|
+
var _render21 = render(_react.default.createElement(_Times.default, null)),
|
|
728
|
+
timesContainer = _render21.container;
|
|
609
729
|
|
|
610
730
|
var timesPathD = timesContainer.querySelector('svg path').getAttribute('d');
|
|
611
731
|
|
|
612
|
-
var
|
|
732
|
+
var _render22 = render(_react.default.createElement(_.default, {
|
|
613
733
|
defaultInputValue: "value",
|
|
614
734
|
label: "test",
|
|
615
735
|
options: defaultOptions
|
|
616
736
|
})),
|
|
617
|
-
container =
|
|
618
|
-
queryByLabelText =
|
|
737
|
+
container = _render22.container,
|
|
738
|
+
queryByLabelText = _render22.queryByLabelText;
|
|
619
739
|
|
|
620
740
|
expect(queryByLabelText('test')).toHaveValue('value');
|
|
621
741
|
expect(container.querySelectorAll('svg path')[0]).toHaveAttribute('d', timesPathD);
|
|
@@ -627,12 +747,12 @@ describe('Combobox', function () {
|
|
|
627
747
|
inputValue = event ? event.target.value : '';
|
|
628
748
|
});
|
|
629
749
|
|
|
630
|
-
var
|
|
750
|
+
var _render23 = render(_react.default.createElement(_.default, {
|
|
631
751
|
label: "test",
|
|
632
752
|
onChangeInputValue: onChangeInputValue
|
|
633
753
|
})),
|
|
634
|
-
container =
|
|
635
|
-
queryByLabelText =
|
|
754
|
+
container = _render23.container,
|
|
755
|
+
queryByLabelText = _render23.queryByLabelText;
|
|
636
756
|
|
|
637
757
|
var value = 'value';
|
|
638
758
|
|
|
@@ -658,13 +778,13 @@ describe('Combobox', function () {
|
|
|
658
778
|
it('updates the input value with the label of the selection', function () {
|
|
659
779
|
var onChangeValue = jest.fn();
|
|
660
780
|
|
|
661
|
-
var
|
|
781
|
+
var _render24 = render(_react.default.createElement(_.default, {
|
|
662
782
|
label: "test",
|
|
663
783
|
options: defaultOptions,
|
|
664
784
|
onChangeValue: onChangeValue
|
|
665
785
|
})),
|
|
666
|
-
baseElement =
|
|
667
|
-
queryByLabelText =
|
|
786
|
+
baseElement = _render24.baseElement,
|
|
787
|
+
queryByLabelText = _render24.queryByLabelText;
|
|
668
788
|
|
|
669
789
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
670
790
|
|
|
@@ -678,13 +798,13 @@ describe('Combobox', function () {
|
|
|
678
798
|
expect((0, _react2.queryByText)(baseElement, defaultOptions[0].label)).not.toBeInTheDocument();
|
|
679
799
|
});
|
|
680
800
|
it('shows the selected tag when multiple select is enabled', function () {
|
|
681
|
-
var
|
|
801
|
+
var _render25 = render(_react.default.createElement(_.default, {
|
|
682
802
|
label: "test",
|
|
683
803
|
multiple: true,
|
|
684
804
|
options: defaultOptions
|
|
685
805
|
})),
|
|
686
|
-
baseElement =
|
|
687
|
-
queryByLabelText =
|
|
806
|
+
baseElement = _render25.baseElement,
|
|
807
|
+
queryByLabelText = _render25.queryByLabelText;
|
|
688
808
|
|
|
689
809
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
690
810
|
|
|
@@ -693,12 +813,12 @@ describe('Combobox', function () {
|
|
|
693
813
|
expect((0, _react2.queryByText)(baseElement, defaultOptions[1].label)).toBeInTheDocument();
|
|
694
814
|
});
|
|
695
815
|
it('renders as "selected" in the dropdown list', function () {
|
|
696
|
-
var
|
|
816
|
+
var _render26 = render(_react.default.createElement(_.default, {
|
|
697
817
|
label: "test",
|
|
698
818
|
options: defaultOptions
|
|
699
819
|
})),
|
|
700
|
-
baseElement =
|
|
701
|
-
queryByLabelText =
|
|
820
|
+
baseElement = _render26.baseElement,
|
|
821
|
+
queryByLabelText = _render26.queryByLabelText;
|
|
702
822
|
|
|
703
823
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
704
824
|
|
|
@@ -716,14 +836,14 @@ describe('Combobox', function () {
|
|
|
716
836
|
it('does NOT update the selection automatically', function () {
|
|
717
837
|
var onChangeValue = jest.fn();
|
|
718
838
|
|
|
719
|
-
var
|
|
839
|
+
var _render27 = render(_react.default.createElement(_.default, {
|
|
720
840
|
label: "test",
|
|
721
841
|
options: defaultOptions,
|
|
722
842
|
onChangeValue: onChangeValue
|
|
723
843
|
})),
|
|
724
|
-
baseElement =
|
|
725
|
-
queryByLabelText =
|
|
726
|
-
queryByText =
|
|
844
|
+
baseElement = _render27.baseElement,
|
|
845
|
+
queryByLabelText = _render27.queryByLabelText,
|
|
846
|
+
queryByText = _render27.queryByText;
|
|
727
847
|
|
|
728
848
|
_react2.fireEvent.click(queryByText('test'));
|
|
729
849
|
|
|
@@ -750,13 +870,13 @@ describe('Combobox', function () {
|
|
|
750
870
|
it('clears the selection', function () {
|
|
751
871
|
var onChangeValue = jest.fn();
|
|
752
872
|
|
|
753
|
-
var
|
|
873
|
+
var _render28 = render(_react.default.createElement(_.default, {
|
|
754
874
|
label: "test",
|
|
755
875
|
options: defaultOptions,
|
|
756
876
|
onChangeValue: onChangeValue
|
|
757
877
|
})),
|
|
758
|
-
baseElement =
|
|
759
|
-
queryByLabelText =
|
|
878
|
+
baseElement = _render28.baseElement,
|
|
879
|
+
queryByLabelText = _render28.queryByLabelText;
|
|
760
880
|
|
|
761
881
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
762
882
|
|
|
@@ -781,7 +901,7 @@ describe('Combobox', function () {
|
|
|
781
901
|
var onChangeInputValue = jest.fn();
|
|
782
902
|
var onChangeValue = jest.fn();
|
|
783
903
|
|
|
784
|
-
var
|
|
904
|
+
var _render29 = render(_react.default.createElement(_.default, {
|
|
785
905
|
label: "test",
|
|
786
906
|
options: defaultOptions,
|
|
787
907
|
defaultInputValue: "value",
|
|
@@ -789,9 +909,9 @@ describe('Combobox', function () {
|
|
|
789
909
|
onChangeInputValue: onChangeInputValue,
|
|
790
910
|
onChangeValue: onChangeValue
|
|
791
911
|
})),
|
|
792
|
-
baseElement =
|
|
793
|
-
queryByLabelText =
|
|
794
|
-
rerender =
|
|
912
|
+
baseElement = _render29.baseElement,
|
|
913
|
+
queryByLabelText = _render29.queryByLabelText,
|
|
914
|
+
rerender = _render29.rerender;
|
|
795
915
|
|
|
796
916
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
797
917
|
|
|
@@ -814,7 +934,7 @@ describe('Combobox', function () {
|
|
|
814
934
|
});
|
|
815
935
|
describe('when a controlled component', function () {
|
|
816
936
|
it('initializes with and prefers prop values', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
817
|
-
var newInputValue, onChangeInputValue, onChangeValue,
|
|
937
|
+
var newInputValue, onChangeInputValue, onChangeValue, _render30, baseElement, queryByLabelText, rerender;
|
|
818
938
|
|
|
819
939
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
820
940
|
while (1) {
|
|
@@ -824,7 +944,7 @@ describe('Combobox', function () {
|
|
|
824
944
|
newInputValue = event ? event.target.value : '';
|
|
825
945
|
});
|
|
826
946
|
onChangeValue = jest.fn();
|
|
827
|
-
|
|
947
|
+
_render30 = render(_react.default.createElement(_.default, {
|
|
828
948
|
label: "test",
|
|
829
949
|
options: defaultOptions,
|
|
830
950
|
inputValue: "value",
|
|
@@ -833,7 +953,7 @@ describe('Combobox', function () {
|
|
|
833
953
|
onChangeValue: onChangeValue,
|
|
834
954
|
autoComplete: "auto-complete-test",
|
|
835
955
|
type: "search"
|
|
836
|
-
})), baseElement =
|
|
956
|
+
})), baseElement = _render30.baseElement, queryByLabelText = _render30.queryByLabelText, rerender = _render30.rerender;
|
|
837
957
|
|
|
838
958
|
_react2.fireEvent.click(queryByLabelText('test'));
|
|
839
959
|
|
|
@@ -891,7 +1011,7 @@ describe('Combobox', function () {
|
|
|
891
1011
|
it('calls the onChangeValue prop with removed: true', function () {
|
|
892
1012
|
var onChangeValue = jest.fn();
|
|
893
1013
|
|
|
894
|
-
var
|
|
1014
|
+
var _render31 = render(_react.default.createElement(_.default, {
|
|
895
1015
|
label: "test",
|
|
896
1016
|
options: defaultOptions,
|
|
897
1017
|
inputValue: "",
|
|
@@ -899,8 +1019,8 @@ describe('Combobox', function () {
|
|
|
899
1019
|
onChangeValue: onChangeValue,
|
|
900
1020
|
multiple: true
|
|
901
1021
|
})),
|
|
902
|
-
queryByText =
|
|
903
|
-
queryByLabelText =
|
|
1022
|
+
queryByText = _render31.queryByText,
|
|
1023
|
+
queryByLabelText = _render31.queryByLabelText;
|
|
904
1024
|
|
|
905
1025
|
expect(queryByText(defaultOptions[1].label)).toBeInTheDocument();
|
|
906
1026
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigProvider/index.tsx"],"names":[],"mappings":"AACA,OAAc,EACZ,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAUf,OAAO,EAGL,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAQzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AAErC,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigProvider/index.tsx"],"names":[],"mappings":"AACA,OAAc,EACZ,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAUf,OAAO,EAGL,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAQzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AAErC,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,aAAa,CAwGpD,CAAC;AAQF,QAAA,MAAM,SAAS,qBACkB,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -166,7 +166,11 @@ var ConfigProvider = function ConfigProvider(props) {
|
|
|
166
166
|
var managerProps = {};
|
|
167
167
|
|
|
168
168
|
if (extraScope) {
|
|
169
|
-
|
|
169
|
+
var extraScopePlugin = (0, _stylisPluginExtraScope.default)(extraScope);
|
|
170
|
+
Object.defineProperty(extraScopePlugin, 'name', {
|
|
171
|
+
value: 'extraScopePlugin'
|
|
172
|
+
});
|
|
173
|
+
managerProps.stylisPlugins = [extraScopePlugin];
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
return managerProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decisiv/ui-components",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.74+9a06b08",
|
|
4
4
|
"description": "Decisiv's design system React components",
|
|
5
5
|
"author": "Decisiv UI Development Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"private": false,
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9a06b08f6ec5f760dc211acf0a795e031183034f"
|
|
75
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequiredIcon.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/RequiredIcon.tsx"],"names":[],"mappings":"AACA,OAAc,EAEZ,sBAAsB,EAEtB,aAAa,EACd,MAAM,OAAO,CAAC;AAWf,QAAA,MAAM,YAAY,EAAE,sBAAsB,CACxC,cAAc,EACd,aAAa,CAAC,cAAc,CAAC,CAU9B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|