@elliemae/ds-form-layout-blocks 2.0.0-next.1 → 2.0.0-next.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.
@@ -37,7 +37,7 @@ const DSFormLayoutBlockItem = props => {
37
37
  withHighlight: withHighlight,
38
38
  as: isGroup ? 'fieldset' : 'div',
39
39
  isGroup: isGroup,
40
- "aria-describedby": `${inputID || instanceUID}_feedback_message`
40
+ "aria-describedby": "".concat(inputID || instanceUID, "_feedback_message")
41
41
  }, void 0, /*#__PURE__*/_jsx__default["default"](styles.StyledLabel, {
42
42
  htmlFor: inputID,
43
43
  leftLabel: leftLabel,
@@ -51,7 +51,7 @@ const DSFormLayoutBlockItem = props => {
51
51
  leftLabel: leftLabel,
52
52
  hideLabel: hideLabel,
53
53
  "aria-hidden": isGroup,
54
- id: `${inputID || instanceUID}_feedback_message`
54
+ id: "".concat(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,
@@ -7,7 +7,7 @@ var reactDesc = require('react-desc');
7
7
  const propTypes = {
8
8
  children: reactDesc.PropTypes.node.isRequired.description('Input component. '),
9
9
  label: reactDesc.PropTypes.string.isRequired.description('Label property for the input component. This property is required for accesibility purposes.'),
10
- inputID: reactDesc.PropTypes.string.isRequired.description("String that matches the input component's id. This property is required for accesibility purposes."),
10
+ inputID: reactDesc.PropTypes.string.description("String that matches the input component's id. If you are not using an isGroup property, you should provide an inputID for accesibility purposes. "),
11
11
  feedbackMessage: reactDesc.PropTypes.string.description('Feedback message to show below the input component.'),
12
12
  validationMessage: reactDesc.PropTypes.string.description('Validation message to show below the input component. It requires hasError property set to true to be visible.'),
13
13
  hasError: reactDesc.PropTypes.bool.description('Helper boolean property for the validation message.'),
@@ -20,54 +20,15 @@ const StyledContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
20
20
  }) => leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined, ({
21
21
  theme,
22
22
  withHighlight
23
- }) => withHighlight ? `
24
- &::after {
25
- position: absolute;
26
- content: '';
27
- left: -${theme.space.xxs};
28
- top: -${theme.space.xxxs};
29
- z-index: -1;
30
- width: calc(100% + ${theme.space.xs});
31
- height: calc(100% + ${theme.space.xxs});
32
- background-color: #FEFBEE;
33
- border : 1px solid #8F6326;
34
- border-radius : 4px;
35
- box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
36
- }
37
- &:hover,
38
- &:focus-within {
39
- &::after {
40
- position: absolute;
41
- content: '';
42
- left: -${theme.space.xxs};
43
- top: -${theme.space.xxxs};
44
- z-index: -1;
45
- width: calc(100% + ${theme.space.xs});
46
- height: calc(100% + ${theme.space.xxs});
47
- background-color: #FFF9D3;
48
- border : 1px solid #8F6326;
49
- border-radius : 4px;
50
- box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
51
- }
52
- }
53
- ` : undefined);
23
+ }) => withHighlight ? "\n &::after {\n position: absolute;\n content: '';\n left: -".concat(theme.space.xxs, ";\n top: -").concat(theme.space.xxxs, ";\n z-index: -1;\n width: calc(100% + ").concat(theme.space.xs, ");\n height: calc(100% + ").concat(theme.space.xxs, ");\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -").concat(theme.space.xxs, ";\n top: -").concat(theme.space.xxxs, ";\n z-index: -1;\n width: calc(100% + ").concat(theme.space.xs, ");\n height: calc(100% + ").concat(theme.space.xxs, ");\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n ") : undefined);
54
24
  const StyledLabel = /*#__PURE__*/styled__default["default"].label.withConfig({
55
25
  componentId: "sc-196zgtg-1"
56
26
  })(["display:flex;", " ", ""], ({
57
27
  theme,
58
28
  leftLabel
59
- }) => leftLabel ? `padding-right: ${theme.space.xxs};` : undefined, ({
29
+ }) => leftLabel ? "padding-right: ".concat(theme.space.xxs, ";") : undefined, ({
60
30
  hideLabel
61
- }) => hideLabel ? `position: absolute;
62
- width: 1px;
63
- height: 1px;
64
- padding: 0;
65
- margin: -1px;
66
- overflow: hidden;
67
- clip: rect(0, 0, 0, 0);
68
- white-space: nowrap;
69
- border: 0;
70
- ` : undefined);
31
+ }) => hideLabel ? "position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n " : undefined);
71
32
  const StyledMessage = /*#__PURE__*/styled__default["default"].div.withConfig({
72
33
  componentId: "sc-196zgtg-2"
73
34
  })(["font-size:", ";font-style:italic;text-align:right;line-height:15px;height:15px;overflow:hidden;text-overflow:ellipsis;color:", ";", ""], ({
@@ -86,11 +47,7 @@ const StyledMark = /*#__PURE__*/styled__default["default"].span.withConfig({
86
47
  }) => theme.space.xxxs, ({
87
48
  theme,
88
49
  required
89
- }) => required ? `
90
- background-color: ${theme.colors.danger[900]};
91
- ` : `
92
- border: 1px solid ${theme.colors.brand[600]};
93
- `);
50
+ }) => required ? "\n background-color: ".concat(theme.colors.danger[900], ";\n ") : "\n border: 1px solid ".concat(theme.colors.brand[600], ";\n "));
94
51
  const ScreenReaderOnly = /*#__PURE__*/styled__default["default"].div.withConfig({
95
52
  componentId: "sc-196zgtg-4"
96
53
  })(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]);
@@ -16,19 +16,11 @@ const getVariableType = arg => {
16
16
  };
17
17
 
18
18
  const throwCheckboxGroupDirectionError = invalidProp => {
19
- throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
20
-
21
- Received: ${invalidProp} (${getVariableType(invalidProp)})
22
- Expected: "horizontal" or "vertical" (string)
23
- `);
19
+ throw new Error("You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ".concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: \"horizontal\" or \"vertical\" (string)\n "));
24
20
  };
25
21
 
26
22
  const throwCheckboxGroupChildrenError = () => {
27
- throw new Error(`You are trying to use a checkbox group without any React children, please provide at least one children to use.
28
-
29
- Received: (null)
30
- Expected: React children
31
- `);
23
+ throw new Error("You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n ");
32
24
  };
33
25
 
34
26
  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": `${inputID || instanceUID}_feedback_message`
32
+ "aria-describedby": "".concat(inputID || instanceUID, "_feedback_message")
33
33
  }, void 0, /*#__PURE__*/_jsx(StyledLabel, {
34
34
  htmlFor: inputID,
35
35
  leftLabel: leftLabel,
@@ -43,7 +43,7 @@ const DSFormLayoutBlockItem = props => {
43
43
  leftLabel: leftLabel,
44
44
  hideLabel: hideLabel,
45
45
  "aria-hidden": isGroup,
46
- id: `${inputID || instanceUID}_feedback_message`
46
+ id: "".concat(inputID || instanceUID, "_feedback_message")
47
47
  }, void 0, feedbackMessage), validationMessage && hasError && /*#__PURE__*/_jsx(StyledMessage, {
48
48
  hasError: hasError,
49
49
  leftLabel: leftLabel,
@@ -3,7 +3,7 @@ import { PropTypes } from 'react-desc';
3
3
  const propTypes = {
4
4
  children: PropTypes.node.isRequired.description('Input component. '),
5
5
  label: PropTypes.string.isRequired.description('Label property for the input component. This property is required for accesibility purposes.'),
6
- inputID: PropTypes.string.isRequired.description("String that matches the input component's id. This property is required for accesibility purposes."),
6
+ inputID: PropTypes.string.description("String that matches the input component's id. If you are not using an isGroup property, you should provide an inputID for accesibility purposes. "),
7
7
  feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),
8
8
  validationMessage: PropTypes.string.description('Validation message to show below the input component. It requires hasError property set to true to be visible.'),
9
9
  hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),
@@ -12,54 +12,15 @@ const StyledContainer = /*#__PURE__*/styled.div.withConfig({
12
12
  }) => leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined, ({
13
13
  theme,
14
14
  withHighlight
15
- }) => withHighlight ? `
16
- &::after {
17
- position: absolute;
18
- content: '';
19
- left: -${theme.space.xxs};
20
- top: -${theme.space.xxxs};
21
- z-index: -1;
22
- width: calc(100% + ${theme.space.xs});
23
- height: calc(100% + ${theme.space.xxs});
24
- background-color: #FEFBEE;
25
- border : 1px solid #8F6326;
26
- border-radius : 4px;
27
- box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
28
- }
29
- &:hover,
30
- &:focus-within {
31
- &::after {
32
- position: absolute;
33
- content: '';
34
- left: -${theme.space.xxs};
35
- top: -${theme.space.xxxs};
36
- z-index: -1;
37
- width: calc(100% + ${theme.space.xs});
38
- height: calc(100% + ${theme.space.xxs});
39
- background-color: #FFF9D3;
40
- border : 1px solid #8F6326;
41
- border-radius : 4px;
42
- box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
43
- }
44
- }
45
- ` : undefined);
15
+ }) => withHighlight ? "\n &::after {\n position: absolute;\n content: '';\n left: -".concat(theme.space.xxs, ";\n top: -").concat(theme.space.xxxs, ";\n z-index: -1;\n width: calc(100% + ").concat(theme.space.xs, ");\n height: calc(100% + ").concat(theme.space.xxs, ");\n background-color: #FEFBEE;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);\n }\n &:hover, \n &:focus-within {\n &::after {\n position: absolute;\n content: '';\n left: -").concat(theme.space.xxs, ";\n top: -").concat(theme.space.xxxs, ";\n z-index: -1;\n width: calc(100% + ").concat(theme.space.xs, ");\n height: calc(100% + ").concat(theme.space.xxs, ");\n background-color: #FFF9D3;\n border : 1px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n ") : undefined);
46
16
  const StyledLabel = /*#__PURE__*/styled.label.withConfig({
47
17
  componentId: "sc-196zgtg-1"
48
18
  })(["display:flex;", " ", ""], ({
49
19
  theme,
50
20
  leftLabel
51
- }) => leftLabel ? `padding-right: ${theme.space.xxs};` : undefined, ({
21
+ }) => leftLabel ? "padding-right: ".concat(theme.space.xxs, ";") : undefined, ({
52
22
  hideLabel
53
- }) => hideLabel ? `position: absolute;
54
- width: 1px;
55
- height: 1px;
56
- padding: 0;
57
- margin: -1px;
58
- overflow: hidden;
59
- clip: rect(0, 0, 0, 0);
60
- white-space: nowrap;
61
- border: 0;
62
- ` : undefined);
23
+ }) => hideLabel ? "position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n " : undefined);
63
24
  const StyledMessage = /*#__PURE__*/styled.div.withConfig({
64
25
  componentId: "sc-196zgtg-2"
65
26
  })(["font-size:", ";font-style:italic;text-align:right;line-height:15px;height:15px;overflow:hidden;text-overflow:ellipsis;color:", ";", ""], ({
@@ -78,11 +39,7 @@ const StyledMark = /*#__PURE__*/styled.span.withConfig({
78
39
  }) => theme.space.xxxs, ({
79
40
  theme,
80
41
  required
81
- }) => required ? `
82
- background-color: ${theme.colors.danger[900]};
83
- ` : `
84
- border: 1px solid ${theme.colors.brand[600]};
85
- `);
42
+ }) => required ? "\n background-color: ".concat(theme.colors.danger[900], ";\n ") : "\n border: 1px solid ".concat(theme.colors.brand[600], ";\n "));
86
43
  const ScreenReaderOnly = /*#__PURE__*/styled.div.withConfig({
87
44
  componentId: "sc-196zgtg-4"
88
45
  })(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]);
@@ -8,19 +8,11 @@ const getVariableType = arg => {
8
8
  };
9
9
 
10
10
  const throwCheckboxGroupDirectionError = invalidProp => {
11
- throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
12
-
13
- Received: ${invalidProp} (${getVariableType(invalidProp)})
14
- Expected: "horizontal" or "vertical" (string)
15
- `);
11
+ throw new Error("You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ".concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: \"horizontal\" or \"vertical\" (string)\n "));
16
12
  };
17
13
 
18
14
  const throwCheckboxGroupChildrenError = () => {
19
- throw new Error(`You are trying to use a checkbox group without any React children, please provide at least one children to use.
20
-
21
- Received: (null)
22
- Expected: React children
23
- `);
15
+ throw new Error("You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n ");
24
16
  };
25
17
 
26
18
  const useValidateProps = props => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-layout-blocks",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.6",
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.0.0-next.1",
75
+ "@elliemae/ds-props-helpers": "2.0.0-next.6",
76
76
  "react-desc": "~4.1.3"
77
77
  },
78
78
  "devDependencies": {
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }