@elliemae/ds-form-layout-blocks 2.4.2-rc.1 → 2.4.2-rc.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/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +3 -3
- package/cjs/form-layout-block-item/styles.js +47 -4
- package/cjs/form-layout-checkbox-group/config/useValidateProps.js +11 -2
- package/esm/form-layout-block-item/DSFormLayoutBlockItem.js +3 -3
- package/esm/form-layout-block-item/styles.js +47 -4
- package/esm/form-layout-checkbox-group/config/useValidateProps.js +11 -2
- package/package.json +2 -2
|
@@ -37,7 +37,7 @@ const DSFormLayoutBlockItem = props => {
|
|
|
37
37
|
withHighlight: withHighlight,
|
|
38
38
|
as: isGroup ? 'fieldset' : 'div',
|
|
39
39
|
isGroup: isGroup,
|
|
40
|
-
"aria-describedby":
|
|
40
|
+
"aria-describedby": `${inputID || instanceUID}_feedback_message`
|
|
41
41
|
}, void 0, /*#__PURE__*/_jsx__default["default"](styles.StyledLabel, {
|
|
42
42
|
htmlFor: inputID,
|
|
43
43
|
leftLabel: leftLabel,
|
|
@@ -47,11 +47,11 @@ const DSFormLayoutBlockItem = props => {
|
|
|
47
47
|
required: required
|
|
48
48
|
})), isGroup && /*#__PURE__*/_jsx__default["default"](styles.ScreenReaderOnly, {
|
|
49
49
|
as: "legend"
|
|
50
|
-
}, void 0,
|
|
50
|
+
}, void 0, `${label}. ${feedbackMessage || ''}`), children, feedbackMessage && !hasError && /*#__PURE__*/_jsx__default["default"](styles.StyledMessage, {
|
|
51
51
|
leftLabel: leftLabel,
|
|
52
52
|
hideLabel: hideLabel,
|
|
53
53
|
"aria-hidden": isGroup,
|
|
54
|
-
id:
|
|
54
|
+
id: `${inputID || instanceUID}_feedback_message`
|
|
55
55
|
}, void 0, feedbackMessage), validationMessage && hasError && /*#__PURE__*/_jsx__default["default"](styles.StyledMessage, {
|
|
56
56
|
hasError: hasError,
|
|
57
57
|
leftLabel: leftLabel,
|
|
@@ -31,7 +31,37 @@ const StyledContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
31
31
|
theme,
|
|
32
32
|
withHighlight
|
|
33
33
|
} = _ref4;
|
|
34
|
-
return withHighlight ?
|
|
34
|
+
return withHighlight ? `
|
|
35
|
+
&::after {
|
|
36
|
+
position: absolute;
|
|
37
|
+
content: '';
|
|
38
|
+
left: -${theme.space.xxs};
|
|
39
|
+
top: -${theme.space.xxxs};
|
|
40
|
+
z-index: -1;
|
|
41
|
+
width: calc(100% + ${theme.space.xs});
|
|
42
|
+
height: calc(100% + ${theme.space.xxs});
|
|
43
|
+
background-color: #FEFBEE;
|
|
44
|
+
border : 1px solid #8F6326;
|
|
45
|
+
border-radius : 4px;
|
|
46
|
+
box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
|
|
47
|
+
}
|
|
48
|
+
&:hover,
|
|
49
|
+
&:focus-within {
|
|
50
|
+
&::after {
|
|
51
|
+
position: absolute;
|
|
52
|
+
content: '';
|
|
53
|
+
left: -${theme.space.xxs};
|
|
54
|
+
top: -${theme.space.xxxs};
|
|
55
|
+
z-index: -1;
|
|
56
|
+
width: calc(100% + ${theme.space.xs});
|
|
57
|
+
height: calc(100% + ${theme.space.xxs});
|
|
58
|
+
background-color: #FFF9D3;
|
|
59
|
+
border : 2px solid #8F6326;
|
|
60
|
+
border-radius : 4px;
|
|
61
|
+
box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
` : undefined;
|
|
35
65
|
});
|
|
36
66
|
const StyledLabel = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
37
67
|
componentId: "sc-196zgtg-1"
|
|
@@ -40,12 +70,21 @@ const StyledLabel = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
|
40
70
|
theme,
|
|
41
71
|
leftLabel
|
|
42
72
|
} = _ref5;
|
|
43
|
-
return leftLabel ?
|
|
73
|
+
return leftLabel ? `padding-right: ${theme.space.xxs};` : undefined;
|
|
44
74
|
}, _ref6 => {
|
|
45
75
|
let {
|
|
46
76
|
hideLabel
|
|
47
77
|
} = _ref6;
|
|
48
|
-
return hideLabel ?
|
|
78
|
+
return hideLabel ? `position: absolute;
|
|
79
|
+
width: 1px;
|
|
80
|
+
height: 1px;
|
|
81
|
+
padding: 0;
|
|
82
|
+
margin: -1px;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
clip: rect(0, 0, 0, 0);
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
border: 0;
|
|
87
|
+
` : undefined;
|
|
49
88
|
});
|
|
50
89
|
const StyledMessage = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
51
90
|
componentId: "sc-196zgtg-2"
|
|
@@ -79,7 +118,11 @@ const StyledMark = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
|
79
118
|
theme,
|
|
80
119
|
required
|
|
81
120
|
} = _ref11;
|
|
82
|
-
return required ?
|
|
121
|
+
return required ? `
|
|
122
|
+
background-color: ${theme.colors.danger[900]};
|
|
123
|
+
` : `
|
|
124
|
+
border: 1px solid ${theme.colors.brand[600]};
|
|
125
|
+
`;
|
|
83
126
|
});
|
|
84
127
|
const ScreenReaderOnly = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
85
128
|
componentId: "sc-196zgtg-4"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/es.error.cause.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -16,11 +17,19 @@ const getVariableType = arg => {
|
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
const throwCheckboxGroupDirectionError = invalidProp => {
|
|
19
|
-
throw new Error(
|
|
20
|
+
throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
|
|
21
|
+
|
|
22
|
+
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
23
|
+
Expected: "horizontal" or "vertical" (string)
|
|
24
|
+
`);
|
|
20
25
|
};
|
|
21
26
|
|
|
22
27
|
const throwCheckboxGroupChildrenError = () => {
|
|
23
|
-
throw new Error(
|
|
28
|
+
throw new Error(`You are trying to use a checkbox group without any React children, please provide at least one children to use.
|
|
29
|
+
|
|
30
|
+
Received: (null)
|
|
31
|
+
Expected: React children
|
|
32
|
+
`);
|
|
24
33
|
};
|
|
25
34
|
|
|
26
35
|
const useValidateProps = props => {
|
|
@@ -29,7 +29,7 @@ const DSFormLayoutBlockItem = props => {
|
|
|
29
29
|
withHighlight: withHighlight,
|
|
30
30
|
as: isGroup ? 'fieldset' : 'div',
|
|
31
31
|
isGroup: isGroup,
|
|
32
|
-
"aria-describedby":
|
|
32
|
+
"aria-describedby": `${inputID || instanceUID}_feedback_message`
|
|
33
33
|
}, void 0, /*#__PURE__*/_jsx(StyledLabel, {
|
|
34
34
|
htmlFor: inputID,
|
|
35
35
|
leftLabel: leftLabel,
|
|
@@ -39,11 +39,11 @@ const DSFormLayoutBlockItem = props => {
|
|
|
39
39
|
required: required
|
|
40
40
|
})), isGroup && /*#__PURE__*/_jsx(ScreenReaderOnly, {
|
|
41
41
|
as: "legend"
|
|
42
|
-
}, void 0,
|
|
42
|
+
}, void 0, `${label}. ${feedbackMessage || ''}`), children, feedbackMessage && !hasError && /*#__PURE__*/_jsx(StyledMessage, {
|
|
43
43
|
leftLabel: leftLabel,
|
|
44
44
|
hideLabel: hideLabel,
|
|
45
45
|
"aria-hidden": isGroup,
|
|
46
|
-
id:
|
|
46
|
+
id: `${inputID || instanceUID}_feedback_message`
|
|
47
47
|
}, void 0, feedbackMessage), validationMessage && hasError && /*#__PURE__*/_jsx(StyledMessage, {
|
|
48
48
|
hasError: hasError,
|
|
49
49
|
leftLabel: leftLabel,
|
|
@@ -23,7 +23,37 @@ const StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
23
23
|
theme,
|
|
24
24
|
withHighlight
|
|
25
25
|
} = _ref4;
|
|
26
|
-
return withHighlight ?
|
|
26
|
+
return withHighlight ? `
|
|
27
|
+
&::after {
|
|
28
|
+
position: absolute;
|
|
29
|
+
content: '';
|
|
30
|
+
left: -${theme.space.xxs};
|
|
31
|
+
top: -${theme.space.xxxs};
|
|
32
|
+
z-index: -1;
|
|
33
|
+
width: calc(100% + ${theme.space.xs});
|
|
34
|
+
height: calc(100% + ${theme.space.xxs});
|
|
35
|
+
background-color: #FEFBEE;
|
|
36
|
+
border : 1px solid #8F6326;
|
|
37
|
+
border-radius : 4px;
|
|
38
|
+
box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
|
|
39
|
+
}
|
|
40
|
+
&:hover,
|
|
41
|
+
&:focus-within {
|
|
42
|
+
&::after {
|
|
43
|
+
position: absolute;
|
|
44
|
+
content: '';
|
|
45
|
+
left: -${theme.space.xxs};
|
|
46
|
+
top: -${theme.space.xxxs};
|
|
47
|
+
z-index: -1;
|
|
48
|
+
width: calc(100% + ${theme.space.xs});
|
|
49
|
+
height: calc(100% + ${theme.space.xxs});
|
|
50
|
+
background-color: #FFF9D3;
|
|
51
|
+
border : 2px solid #8F6326;
|
|
52
|
+
border-radius : 4px;
|
|
53
|
+
box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
` : undefined;
|
|
27
57
|
});
|
|
28
58
|
const StyledLabel = /*#__PURE__*/styled.label.withConfig({
|
|
29
59
|
componentId: "sc-196zgtg-1"
|
|
@@ -32,12 +62,21 @@ const StyledLabel = /*#__PURE__*/styled.label.withConfig({
|
|
|
32
62
|
theme,
|
|
33
63
|
leftLabel
|
|
34
64
|
} = _ref5;
|
|
35
|
-
return leftLabel ?
|
|
65
|
+
return leftLabel ? `padding-right: ${theme.space.xxs};` : undefined;
|
|
36
66
|
}, _ref6 => {
|
|
37
67
|
let {
|
|
38
68
|
hideLabel
|
|
39
69
|
} = _ref6;
|
|
40
|
-
return hideLabel ?
|
|
70
|
+
return hideLabel ? `position: absolute;
|
|
71
|
+
width: 1px;
|
|
72
|
+
height: 1px;
|
|
73
|
+
padding: 0;
|
|
74
|
+
margin: -1px;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
clip: rect(0, 0, 0, 0);
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
border: 0;
|
|
79
|
+
` : undefined;
|
|
41
80
|
});
|
|
42
81
|
const StyledMessage = /*#__PURE__*/styled.div.withConfig({
|
|
43
82
|
componentId: "sc-196zgtg-2"
|
|
@@ -71,7 +110,11 @@ const StyledMark = /*#__PURE__*/styled.span.withConfig({
|
|
|
71
110
|
theme,
|
|
72
111
|
required
|
|
73
112
|
} = _ref11;
|
|
74
|
-
return required ?
|
|
113
|
+
return required ? `
|
|
114
|
+
background-color: ${theme.colors.danger[900]};
|
|
115
|
+
` : `
|
|
116
|
+
border: 1px solid ${theme.colors.brand[600]};
|
|
117
|
+
`;
|
|
75
118
|
});
|
|
76
119
|
const ScreenReaderOnly = /*#__PURE__*/styled.div.withConfig({
|
|
77
120
|
componentId: "sc-196zgtg-4"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'core-js/modules/es.error.cause.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
4
|
const getVariableType = arg => {
|
|
@@ -8,11 +9,19 @@ const getVariableType = arg => {
|
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const throwCheckboxGroupDirectionError = invalidProp => {
|
|
11
|
-
throw new Error(
|
|
12
|
+
throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
|
|
13
|
+
|
|
14
|
+
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
15
|
+
Expected: "horizontal" or "vertical" (string)
|
|
16
|
+
`);
|
|
12
17
|
};
|
|
13
18
|
|
|
14
19
|
const throwCheckboxGroupChildrenError = () => {
|
|
15
|
-
throw new Error(
|
|
20
|
+
throw new Error(`You are trying to use a checkbox group without any React children, please provide at least one children to use.
|
|
21
|
+
|
|
22
|
+
Received: (null)
|
|
23
|
+
Expected: React children
|
|
24
|
+
`);
|
|
16
25
|
};
|
|
17
26
|
|
|
18
27
|
const useValidateProps = props => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-layout-blocks",
|
|
3
|
-
"version": "2.4.2-rc.
|
|
3
|
+
"version": "2.4.2-rc.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form Layout",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"build": "node ../../scripts/build/build.js"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@elliemae/ds-props-helpers": "2.4.2-rc.
|
|
75
|
+
"@elliemae/ds-props-helpers": "2.4.2-rc.13",
|
|
76
76
|
"react-desc": "~4.1.3",
|
|
77
77
|
"uid": "~2.0.0"
|
|
78
78
|
},
|