@elliemae/ds-form-layout-blocks 2.2.0-alpha.4 → 3.0.0-next.2
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 +46 -68
- package/cjs/form-layout-block-item/index.d.js +2 -27
- package/cjs/form-layout-block-item/index.js +10 -28
- package/cjs/form-layout-block-item/propTypes.js +21 -48
- package/cjs/form-layout-block-item/styles.js +91 -124
- package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +28 -50
- package/cjs/form-layout-checkbox-group/config/useValidateProps.js +25 -55
- package/cjs/form-layout-checkbox-group/defaultProps.js +7 -35
- package/cjs/form-layout-checkbox-group/index.d.js +2 -27
- package/cjs/form-layout-checkbox-group/index.js +10 -28
- package/cjs/form-layout-checkbox-group/propTypes.js +9 -36
- package/cjs/form-layout-checkbox-group/styles.js +45 -49
- package/cjs/index.d.js +2 -29
- package/cjs/index.js +13 -29
- package/esm/form-layout-block-item/DSFormLayoutBlockItem.js +34 -36
- package/esm/form-layout-block-item/index.d.js +1 -2
- package/esm/form-layout-block-item/index.js +1 -3
- package/esm/form-layout-block-item/propTypes.js +16 -18
- package/esm/form-layout-block-item/styles.js +80 -96
- package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +15 -17
- package/esm/form-layout-checkbox-group/config/useValidateProps.js +17 -26
- package/esm/form-layout-checkbox-group/defaultProps.js +3 -6
- package/esm/form-layout-checkbox-group/index.d.js +1 -2
- package/esm/form-layout-checkbox-group/index.js +1 -3
- package/esm/form-layout-checkbox-group/propTypes.js +5 -7
- package/esm/form-layout-checkbox-group/styles.js +38 -21
- package/esm/index.d.js +1 -4
- package/esm/index.js +2 -4
- package/package.json +2 -2
- package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
- package/cjs/form-layout-block-item/index.d.js.map +0 -7
- package/cjs/form-layout-block-item/index.js.map +0 -7
- package/cjs/form-layout-block-item/propTypes.js.map +0 -7
- package/cjs/form-layout-block-item/styles.js.map +0 -7
- package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
- package/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
- package/cjs/form-layout-checkbox-group/defaultProps.js.map +0 -7
- package/cjs/form-layout-checkbox-group/index.d.js.map +0 -7
- package/cjs/form-layout-checkbox-group/index.js.map +0 -7
- package/cjs/form-layout-checkbox-group/propTypes.js.map +0 -7
- package/cjs/form-layout-checkbox-group/styles.js.map +0 -7
- package/cjs/index.d.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
- package/esm/form-layout-block-item/index.d.js.map +0 -7
- package/esm/form-layout-block-item/index.js.map +0 -7
- package/esm/form-layout-block-item/propTypes.js.map +0 -7
- package/esm/form-layout-block-item/styles.js.map +0 -7
- package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
- package/esm/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
- package/esm/form-layout-checkbox-group/defaultProps.js.map +0 -7
- package/esm/form-layout-checkbox-group/index.d.js.map +0 -7
- package/esm/form-layout-checkbox-group/index.js.map +0 -7
- package/esm/form-layout-checkbox-group/propTypes.js.map +0 -7
- package/esm/form-layout-checkbox-group/styles.js.map +0 -7
- package/esm/index.d.js.map +0 -7
- package/esm/index.js.map +0 -7
|
@@ -1,42 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var DSFormLayoutBlockItem_exports = {};
|
|
29
|
-
__export(DSFormLayoutBlockItem_exports, {
|
|
30
|
-
DSFormLayoutBlockItem: () => DSFormLayoutBlockItem,
|
|
31
|
-
DSFormLayoutBlockItemWithSchema: () => DSFormLayoutBlockItemWithSchema
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_react_desc = require("react-desc");
|
|
36
|
-
var import_uid = require("uid");
|
|
37
|
-
var import_propTypes = require("./propTypes");
|
|
38
|
-
var import_styles = require("./styles");
|
|
39
|
-
const DSFormLayoutBlockItem = (props) => {
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactDesc = require('react-desc');
|
|
8
|
+
var uid = require('uid');
|
|
9
|
+
var propTypes = require('./propTypes.js');
|
|
10
|
+
var styles = require('./styles.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
15
|
+
|
|
16
|
+
const DSFormLayoutBlockItem = props => {
|
|
40
17
|
const {
|
|
41
18
|
label,
|
|
42
19
|
feedbackMessage,
|
|
@@ -52,38 +29,39 @@ const DSFormLayoutBlockItem = (props) => {
|
|
|
52
29
|
withHighlight,
|
|
53
30
|
isGroup = false
|
|
54
31
|
} = props;
|
|
55
|
-
const instanceUID =
|
|
56
|
-
return
|
|
57
|
-
leftLabel,
|
|
58
|
-
fitContent,
|
|
59
|
-
hideLabel,
|
|
60
|
-
withHighlight,
|
|
61
|
-
as: isGroup ?
|
|
62
|
-
isGroup,
|
|
63
|
-
"aria-describedby":
|
|
64
|
-
},
|
|
32
|
+
const instanceUID = React.useMemo(() => uid.uid(6), []);
|
|
33
|
+
return /*#__PURE__*/_jsx__default["default"](styles.StyledContainer, {
|
|
34
|
+
leftLabel: leftLabel,
|
|
35
|
+
fitContent: fitContent,
|
|
36
|
+
hideLabel: hideLabel,
|
|
37
|
+
withHighlight: withHighlight,
|
|
38
|
+
as: isGroup ? 'fieldset' : 'div',
|
|
39
|
+
isGroup: isGroup,
|
|
40
|
+
"aria-describedby": "".concat(inputID || instanceUID, "_feedback_message")
|
|
41
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styles.StyledLabel, {
|
|
65
42
|
htmlFor: inputID,
|
|
66
|
-
leftLabel,
|
|
67
|
-
hideLabel,
|
|
43
|
+
leftLabel: leftLabel,
|
|
44
|
+
hideLabel: hideLabel,
|
|
68
45
|
"aria-hidden": isGroup
|
|
69
|
-
}, label, (required || optional) &&
|
|
70
|
-
required
|
|
71
|
-
})), isGroup &&
|
|
46
|
+
}, void 0, label, (required || optional) && /*#__PURE__*/_jsx__default["default"](styles.StyledMark, {
|
|
47
|
+
required: required
|
|
48
|
+
})), isGroup && /*#__PURE__*/_jsx__default["default"](styles.ScreenReaderOnly, {
|
|
72
49
|
as: "legend"
|
|
73
|
-
}, label), children, feedbackMessage && !hasError &&
|
|
74
|
-
leftLabel,
|
|
75
|
-
hideLabel,
|
|
50
|
+
}, void 0, label), children, feedbackMessage && !hasError && /*#__PURE__*/_jsx__default["default"](styles.StyledMessage, {
|
|
51
|
+
leftLabel: leftLabel,
|
|
52
|
+
hideLabel: hideLabel,
|
|
76
53
|
"aria-hidden": isGroup,
|
|
77
|
-
id:
|
|
78
|
-
}, feedbackMessage), validationMessage && hasError &&
|
|
79
|
-
hasError,
|
|
80
|
-
leftLabel,
|
|
81
|
-
hideLabel,
|
|
54
|
+
id: "".concat(inputID || instanceUID, "_feedback_message")
|
|
55
|
+
}, void 0, feedbackMessage), validationMessage && hasError && /*#__PURE__*/_jsx__default["default"](styles.StyledMessage, {
|
|
56
|
+
hasError: hasError,
|
|
57
|
+
leftLabel: leftLabel,
|
|
58
|
+
hideLabel: hideLabel,
|
|
82
59
|
role: "alert"
|
|
83
|
-
}, validationMessage));
|
|
60
|
+
}, void 0, validationMessage));
|
|
84
61
|
};
|
|
85
|
-
|
|
86
|
-
const DSFormLayoutBlockItemWithSchema =
|
|
87
|
-
DSFormLayoutBlockItemWithSchema.propTypes =
|
|
88
|
-
|
|
89
|
-
|
|
62
|
+
|
|
63
|
+
const DSFormLayoutBlockItemWithSchema = reactDesc.describe(DSFormLayoutBlockItem);
|
|
64
|
+
DSFormLayoutBlockItemWithSchema.propTypes = propTypes.propTypes;
|
|
65
|
+
|
|
66
|
+
exports.DSFormLayoutBlockItem = DSFormLayoutBlockItem;
|
|
67
|
+
exports.DSFormLayoutBlockItemWithSchema = DSFormLayoutBlockItemWithSchema;
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var index_d_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
module.exports = __toCommonJS(index_d_exports);
|
|
27
|
-
//# sourceMappingURL=index.d.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var form_layout_block_item_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
__reExport(form_layout_block_item_exports, require("./DSFormLayoutBlockItem"));
|
|
27
|
-
module.exports = __toCommonJS(form_layout_block_item_exports);
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DSFormLayoutBlockItem = require('./DSFormLayoutBlockItem.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.DSFormLayoutBlockItem = DSFormLayoutBlockItem.DSFormLayoutBlockItem;
|
|
10
|
+
exports.DSFormLayoutBlockItemWithSchema = DSFormLayoutBlockItem.DSFormLayoutBlockItemWithSchema;
|
|
@@ -1,50 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var propTypes_exports = {};
|
|
29
|
-
__export(propTypes_exports, {
|
|
30
|
-
propTypes: () => propTypes
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react_desc = require("react-desc");
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
|
|
34
7
|
const propTypes = {
|
|
35
|
-
children:
|
|
36
|
-
label:
|
|
37
|
-
inputID:
|
|
38
|
-
feedbackMessage:
|
|
39
|
-
validationMessage:
|
|
40
|
-
hasError:
|
|
41
|
-
required:
|
|
42
|
-
optional:
|
|
43
|
-
fitContent:
|
|
44
|
-
leftLabel:
|
|
45
|
-
hideLabel:
|
|
46
|
-
withHighlight:
|
|
47
|
-
isGroup:
|
|
8
|
+
children: reactDesc.PropTypes.node.isRequired.description('Input component. '),
|
|
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."),
|
|
11
|
+
feedbackMessage: reactDesc.PropTypes.string.description('Feedback message to show below the input component.'),
|
|
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
|
+
hasError: reactDesc.PropTypes.bool.description('Helper boolean property for the validation message.'),
|
|
14
|
+
required: reactDesc.PropTypes.bool.description('Adds required extra styling.'),
|
|
15
|
+
optional: reactDesc.PropTypes.bool.description('Adds optional extra styling.'),
|
|
16
|
+
fitContent: reactDesc.PropTypes.bool.description('Set the width of the layout to the input component.'),
|
|
17
|
+
leftLabel: reactDesc.PropTypes.bool.description('Adds the label at the left of the input component.'),
|
|
18
|
+
hideLabel: reactDesc.PropTypes.bool.description('Hides the input label. It still requires label and labelFor property for accesibility purposes'),
|
|
19
|
+
withHighlight: reactDesc.PropTypes.bool.description('Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.'),
|
|
20
|
+
isGroup: reactDesc.PropTypes.bool.description('Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.')
|
|
48
21
|
};
|
|
49
|
-
|
|
50
|
-
|
|
22
|
+
|
|
23
|
+
exports.propTypes = propTypes;
|
|
@@ -1,125 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
+
|
|
11
|
+
const StyledContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
12
|
+
componentId: "sc-196zgtg-0"
|
|
13
|
+
})(["position:relative;padding:0;margin:0;display:grid;", " ", ";", " align-items:center;", ""], _ref => {
|
|
14
|
+
let {
|
|
15
|
+
fitContent
|
|
16
|
+
} = _ref;
|
|
17
|
+
return fitContent ? 'width: fit-content;' : undefined;
|
|
18
|
+
}, _ref2 => {
|
|
19
|
+
let {
|
|
20
|
+
isGroup
|
|
21
|
+
} = _ref2;
|
|
22
|
+
return isGroup ? 'border: none' : '';
|
|
23
|
+
}, _ref3 => {
|
|
24
|
+
let {
|
|
25
|
+
leftLabel,
|
|
26
|
+
hideLabel
|
|
27
|
+
} = _ref3;
|
|
28
|
+
return leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined;
|
|
29
|
+
}, _ref4 => {
|
|
30
|
+
let {
|
|
31
|
+
theme,
|
|
32
|
+
withHighlight
|
|
33
|
+
} = _ref4;
|
|
34
|
+
return 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;
|
|
35
35
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const StyledMessage = import_styled_components.default.div`
|
|
94
|
-
font-size: ${({ theme }) => theme.fontSizes.microText[200]};
|
|
95
|
-
font-style: italic;
|
|
96
|
-
text-align: right;
|
|
97
|
-
line-height: 15px;
|
|
98
|
-
height: 15px;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
text-overflow: ellipsis;
|
|
101
|
-
color: ${({ theme, hasError }) => hasError ? theme.colors.danger[900] : theme.colors.neutral[500]};
|
|
102
|
-
${({ leftLabel, hideLabel }) => leftLabel && !hideLabel ? "grid-column: 1/3;" : void 0}
|
|
103
|
-
`;
|
|
104
|
-
const StyledMark = import_styled_components.default.span`
|
|
105
|
-
width: 6px;
|
|
106
|
-
height: 6px;
|
|
107
|
-
border-radius: 50%;
|
|
108
|
-
margin-left: ${({ theme }) => theme.space.xxxs};
|
|
109
|
-
${({ theme, required }) => required ? `
|
|
110
|
-
background-color: ${theme.colors.danger[900]};
|
|
111
|
-
` : `
|
|
112
|
-
border: 1px solid ${theme.colors.brand[600]};
|
|
113
|
-
`}
|
|
114
|
-
`;
|
|
115
|
-
const ScreenReaderOnly = import_styled_components.default.div`
|
|
116
|
-
clip: rect(0 0 0 0);
|
|
117
|
-
clip-path: inset(50%);
|
|
118
|
-
height: 1px;
|
|
119
|
-
overflow: hidden;
|
|
120
|
-
position: absolute;
|
|
121
|
-
white-space: nowrap;
|
|
122
|
-
width: 1px;
|
|
123
|
-
`;
|
|
124
|
-
module.exports = __toCommonJS(styles_exports);
|
|
125
|
-
//# sourceMappingURL=styles.js.map
|
|
36
|
+
const StyledLabel = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
37
|
+
componentId: "sc-196zgtg-1"
|
|
38
|
+
})(["display:flex;", " ", ""], _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
theme,
|
|
41
|
+
leftLabel
|
|
42
|
+
} = _ref5;
|
|
43
|
+
return leftLabel ? "padding-right: ".concat(theme.space.xxs, ";") : undefined;
|
|
44
|
+
}, _ref6 => {
|
|
45
|
+
let {
|
|
46
|
+
hideLabel
|
|
47
|
+
} = _ref6;
|
|
48
|
+
return 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;
|
|
49
|
+
});
|
|
50
|
+
const StyledMessage = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
51
|
+
componentId: "sc-196zgtg-2"
|
|
52
|
+
})(["font-size:", ";font-style:italic;text-align:right;line-height:15px;height:15px;overflow:hidden;text-overflow:ellipsis;color:", ";", ""], _ref7 => {
|
|
53
|
+
let {
|
|
54
|
+
theme
|
|
55
|
+
} = _ref7;
|
|
56
|
+
return theme.fontSizes.microText[200];
|
|
57
|
+
}, _ref8 => {
|
|
58
|
+
let {
|
|
59
|
+
theme,
|
|
60
|
+
hasError
|
|
61
|
+
} = _ref8;
|
|
62
|
+
return hasError ? theme.colors.danger[900] : theme.colors.neutral[500];
|
|
63
|
+
}, _ref9 => {
|
|
64
|
+
let {
|
|
65
|
+
leftLabel,
|
|
66
|
+
hideLabel
|
|
67
|
+
} = _ref9;
|
|
68
|
+
return leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined;
|
|
69
|
+
});
|
|
70
|
+
const StyledMark = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
71
|
+
componentId: "sc-196zgtg-3"
|
|
72
|
+
})(["width:6px;height:6px;border-radius:50%;margin-left:", ";", ""], _ref10 => {
|
|
73
|
+
let {
|
|
74
|
+
theme
|
|
75
|
+
} = _ref10;
|
|
76
|
+
return theme.space.xxxs;
|
|
77
|
+
}, _ref11 => {
|
|
78
|
+
let {
|
|
79
|
+
theme,
|
|
80
|
+
required
|
|
81
|
+
} = _ref11;
|
|
82
|
+
return required ? "\n background-color: ".concat(theme.colors.danger[900], ";\n ") : "\n border: 1px solid ".concat(theme.colors.brand[600], ";\n ");
|
|
83
|
+
});
|
|
84
|
+
const ScreenReaderOnly = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
85
|
+
componentId: "sc-196zgtg-4"
|
|
86
|
+
})(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]);
|
|
87
|
+
|
|
88
|
+
exports.ScreenReaderOnly = ScreenReaderOnly;
|
|
89
|
+
exports.StyledContainer = StyledContainer;
|
|
90
|
+
exports.StyledLabel = StyledLabel;
|
|
91
|
+
exports.StyledMark = StyledMark;
|
|
92
|
+
exports.StyledMessage = StyledMessage;
|
|
@@ -1,52 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var DSFormLayoutCheckboxGroup_exports = {};
|
|
29
|
-
__export(DSFormLayoutCheckboxGroup_exports, {
|
|
30
|
-
DSFormLayoutCheckboxGroup: () => DSFormLayoutCheckboxGroup,
|
|
31
|
-
DSFormLayoutCheckboxGroupWithSchema: () => DSFormLayoutCheckboxGroupWithSchema
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_react_desc = require("react-desc");
|
|
36
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
-
var import_propTypes = require("./propTypes");
|
|
38
|
-
var import_styles = require("./styles");
|
|
39
|
-
var import_defaultProps = require("./defaultProps");
|
|
40
|
-
var import_useValidateProps = require("./config/useValidateProps");
|
|
41
|
-
const DSFormLayoutCheckboxGroup = (props) => {
|
|
42
|
-
(0, import_useValidateProps.useValidateProps)(props);
|
|
43
|
-
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_defaultProps.defaultProps);
|
|
44
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, {
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
|
+
var reactDesc = require('react-desc');
|
|
8
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
9
|
+
var propTypes = require('./propTypes.js');
|
|
10
|
+
var styles = require('./styles.js');
|
|
11
|
+
var defaultProps = require('./defaultProps.js');
|
|
12
|
+
var useValidateProps = require('./config/useValidateProps.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
17
|
+
|
|
18
|
+
const DSFormLayoutCheckboxGroup = props => {
|
|
19
|
+
useValidateProps.useValidateProps(props);
|
|
20
|
+
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, defaultProps.defaultProps);
|
|
21
|
+
return /*#__PURE__*/_jsx__default["default"](styles.StyledContainer, {
|
|
45
22
|
direction: propsWithDefault.direction
|
|
46
|
-
}, propsWithDefault.children);
|
|
23
|
+
}, void 0, propsWithDefault.children);
|
|
47
24
|
};
|
|
48
|
-
|
|
49
|
-
const DSFormLayoutCheckboxGroupWithSchema =
|
|
50
|
-
DSFormLayoutCheckboxGroupWithSchema.propTypes =
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
|
|
26
|
+
const DSFormLayoutCheckboxGroupWithSchema = reactDesc.describe(DSFormLayoutCheckboxGroup);
|
|
27
|
+
DSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes.propTypes;
|
|
28
|
+
|
|
29
|
+
exports.DSFormLayoutCheckboxGroup = DSFormLayoutCheckboxGroup;
|
|
30
|
+
exports.DSFormLayoutCheckboxGroupWithSchema = DSFormLayoutCheckboxGroupWithSchema;
|