@elliemae/ds-form-layout-blocks 2.2.0-alpha.5 → 2.2.0-next.1

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.
Files changed (57) hide show
  1. package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +46 -68
  2. package/cjs/form-layout-block-item/index.d.js +2 -27
  3. package/cjs/form-layout-block-item/index.js +10 -28
  4. package/cjs/form-layout-block-item/propTypes.js +21 -48
  5. package/cjs/form-layout-block-item/styles.js +91 -124
  6. package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +28 -50
  7. package/cjs/form-layout-checkbox-group/config/useValidateProps.js +25 -55
  8. package/cjs/form-layout-checkbox-group/defaultProps.js +7 -35
  9. package/cjs/form-layout-checkbox-group/index.d.js +2 -27
  10. package/cjs/form-layout-checkbox-group/index.js +10 -28
  11. package/cjs/form-layout-checkbox-group/propTypes.js +9 -36
  12. package/cjs/form-layout-checkbox-group/styles.js +45 -49
  13. package/cjs/index.d.js +2 -29
  14. package/cjs/index.js +13 -29
  15. package/esm/form-layout-block-item/DSFormLayoutBlockItem.js +34 -36
  16. package/esm/form-layout-block-item/index.d.js +1 -2
  17. package/esm/form-layout-block-item/index.js +1 -3
  18. package/esm/form-layout-block-item/propTypes.js +16 -18
  19. package/esm/form-layout-block-item/styles.js +80 -96
  20. package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +15 -17
  21. package/esm/form-layout-checkbox-group/config/useValidateProps.js +17 -26
  22. package/esm/form-layout-checkbox-group/defaultProps.js +3 -6
  23. package/esm/form-layout-checkbox-group/index.d.js +1 -2
  24. package/esm/form-layout-checkbox-group/index.js +1 -3
  25. package/esm/form-layout-checkbox-group/propTypes.js +5 -7
  26. package/esm/form-layout-checkbox-group/styles.js +38 -21
  27. package/esm/index.d.js +1 -4
  28. package/esm/index.js +2 -4
  29. package/package.json +2 -2
  30. package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
  31. package/cjs/form-layout-block-item/index.d.js.map +0 -7
  32. package/cjs/form-layout-block-item/index.js.map +0 -7
  33. package/cjs/form-layout-block-item/propTypes.js.map +0 -7
  34. package/cjs/form-layout-block-item/styles.js.map +0 -7
  35. package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
  36. package/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
  37. package/cjs/form-layout-checkbox-group/defaultProps.js.map +0 -7
  38. package/cjs/form-layout-checkbox-group/index.d.js.map +0 -7
  39. package/cjs/form-layout-checkbox-group/index.js.map +0 -7
  40. package/cjs/form-layout-checkbox-group/propTypes.js.map +0 -7
  41. package/cjs/form-layout-checkbox-group/styles.js.map +0 -7
  42. package/cjs/index.d.js.map +0 -7
  43. package/cjs/index.js.map +0 -7
  44. package/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
  45. package/esm/form-layout-block-item/index.d.js.map +0 -7
  46. package/esm/form-layout-block-item/index.js.map +0 -7
  47. package/esm/form-layout-block-item/propTypes.js.map +0 -7
  48. package/esm/form-layout-block-item/styles.js.map +0 -7
  49. package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
  50. package/esm/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
  51. package/esm/form-layout-checkbox-group/defaultProps.js.map +0 -7
  52. package/esm/form-layout-checkbox-group/index.d.js.map +0 -7
  53. package/esm/form-layout-checkbox-group/index.js.map +0 -7
  54. package/esm/form-layout-checkbox-group/propTypes.js.map +0 -7
  55. package/esm/form-layout-checkbox-group/styles.js.map +0 -7
  56. package/esm/index.d.js.map +0 -7
  57. package/esm/index.js.map +0 -7
@@ -1,66 +1,36 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 __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 useValidateProps_exports = {};
29
- __export(useValidateProps_exports, {
30
- useValidateProps: () => useValidateProps
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- const getVariableType = (arg) => {
35
- if (Array.isArray(arg))
36
- return "array";
37
- if (arg === null)
38
- return "null";
39
- if (arg === void 0)
40
- return "undefined";
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ const getVariableType = arg => {
12
+ if (Array.isArray(arg)) return 'array';
13
+ if (arg === null) return 'null';
14
+ if (arg === undefined) return 'undefined';
41
15
  return typeof arg;
42
16
  };
43
- const throwCheckboxGroupDirectionError = (invalidProp) => {
44
- throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
45
17
 
46
- Received: ${invalidProp} (${getVariableType(invalidProp)})
47
- Expected: "horizontal" or "vertical" (string)
48
- `);
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.\n\n Received: ".concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: \"horizontal\" or \"vertical\" (string)\n "));
49
20
  };
21
+
50
22
  const throwCheckboxGroupChildrenError = () => {
51
- throw new Error(`You are trying to use a checkbox group without any React children, please provide at least one children to use.
52
-
53
- Received: (null)
54
- Expected: React children
55
- `);
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 ");
56
24
  };
57
- const useValidateProps = (props) => {
58
- if (props.direction !== void 0 && props.direction !== "vertical" && props.direction !== "horizontal") {
25
+
26
+ const useValidateProps = props => {
27
+ if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {
59
28
  throwCheckboxGroupDirectionError(props.direction);
60
29
  }
61
- if (!import_react.default.Children.count(props.children)) {
30
+
31
+ if (!React__default["default"].Children.count(props.children)) {
62
32
  throwCheckboxGroupChildrenError();
63
33
  }
64
34
  };
65
- module.exports = __toCommonJS(useValidateProps_exports);
66
- //# sourceMappingURL=useValidateProps.js.map
35
+
36
+ exports.useValidateProps = useValidateProps;
@@ -1,37 +1,9 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 __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 defaultProps_exports = {};
29
- __export(defaultProps_exports, {
30
- defaultProps: () => defaultProps
31
- });
32
- var React = __toESM(require("react"));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
33
5
  const defaultProps = {
34
- direction: "horizontal"
6
+ direction: 'horizontal'
35
7
  };
36
- module.exports = __toCommonJS(defaultProps_exports);
37
- //# sourceMappingURL=defaultProps.js.map
8
+
9
+ exports.defaultProps = defaultProps;
@@ -1,27 +1,2 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 form_layout_checkbox_group_exports = {};
25
- var React = __toESM(require("react"));
26
- __reExport(form_layout_checkbox_group_exports, require("./DSFormLayoutCheckboxGroup"));
27
- module.exports = __toCommonJS(form_layout_checkbox_group_exports);
28
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DSFormLayoutCheckboxGroup = require('./DSFormLayoutCheckboxGroup.js');
6
+
7
+
8
+
9
+ exports.DSFormLayoutCheckboxGroup = DSFormLayoutCheckboxGroup.DSFormLayoutCheckboxGroup;
10
+ exports.DSFormLayoutCheckboxGroupWithSchema = DSFormLayoutCheckboxGroup.DSFormLayoutCheckboxGroupWithSchema;
@@ -1,38 +1,11 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 __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
- direction: import_react_desc.PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group.")
8
+ direction: reactDesc.PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.')
36
9
  };
37
- module.exports = __toCommonJS(propTypes_exports);
38
- //# sourceMappingURL=propTypes.js.map
10
+
11
+ exports.propTypes = propTypes;
@@ -1,50 +1,46 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 __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 styles_exports = {};
29
- __export(styles_exports, {
30
- StyledContainer: () => StyledContainer
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-1wopk9q-0"
13
+ })(["display:inline-flex;flex-wrap:wrap;flex-direction:", ";margin-left:", ";margin-right:", ";margin-top:", ";& div{padding:0;margin-bottom:", ";}& div:not(:last-child){margin-right:", ";}"], _ref => {
14
+ let {
15
+ direction
16
+ } = _ref;
17
+ return direction === 'horizontal' ? 'row' : 'column';
18
+ }, _ref2 => {
19
+ let {
20
+ theme
21
+ } = _ref2;
22
+ return theme.space.xs;
23
+ }, _ref3 => {
24
+ let {
25
+ theme
26
+ } = _ref3;
27
+ return theme.space.xs;
28
+ }, _ref4 => {
29
+ let {
30
+ theme
31
+ } = _ref4;
32
+ return theme.space.xxs;
33
+ }, _ref5 => {
34
+ let {
35
+ theme
36
+ } = _ref5;
37
+ return theme.space.xxs;
38
+ }, _ref6 => {
39
+ let {
40
+ theme,
41
+ direction
42
+ } = _ref6;
43
+ return direction === 'horizontal' ? theme.space.s : '0';
31
44
  });
32
- var React = __toESM(require("react"));
33
- var import_styled_components = __toESM(require("styled-components"));
34
- const StyledContainer = import_styled_components.default.div`
35
- display: inline-flex;
36
- flex-wrap: wrap;
37
- flex-direction: ${({ direction }) => direction === "horizontal" ? "row" : "column"};
38
- margin-left: ${({ theme }) => theme.space.xs};
39
- margin-right: ${({ theme }) => theme.space.xs};
40
- margin-top: ${({ theme }) => theme.space.xxs};
41
- & div {
42
- padding: 0;
43
- margin-bottom: ${({ theme }) => theme.space.xxs};
44
- }
45
- & div:not(:last-child) {
46
- margin-right: ${({ theme, direction }) => direction === "horizontal" ? theme.space.s : "0"};
47
- }
48
- `;
49
- module.exports = __toCommonJS(styles_exports);
50
- //# sourceMappingURL=styles.js.map
45
+
46
+ exports.StyledContainer = StyledContainer;
package/cjs/index.d.js CHANGED
@@ -1,29 +1,2 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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
- __reExport(index_d_exports, require("./form-layout-block-item/index.d"));
27
- __reExport(index_d_exports, require("./form-layout-checkbox-group/index.d"));
28
- module.exports = __toCommonJS(index_d_exports);
29
- //# sourceMappingURL=index.d.js.map
1
+ 'use strict';
2
+
package/cjs/index.js CHANGED
@@ -1,29 +1,13 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
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 src_exports = {};
25
- var React = __toESM(require("react"));
26
- __reExport(src_exports, require("./form-layout-block-item"));
27
- __reExport(src_exports, require("./form-layout-checkbox-group"));
28
- module.exports = __toCommonJS(src_exports);
29
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DSFormLayoutBlockItem = require('./form-layout-block-item/DSFormLayoutBlockItem.js');
6
+ var DSFormLayoutCheckboxGroup = require('./form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js');
7
+
8
+
9
+
10
+ exports.DSFormLayoutBlockItem = DSFormLayoutBlockItem.DSFormLayoutBlockItem;
11
+ exports.DSFormLayoutBlockItemWithSchema = DSFormLayoutBlockItem.DSFormLayoutBlockItemWithSchema;
12
+ exports.DSFormLayoutCheckboxGroup = DSFormLayoutCheckboxGroup.DSFormLayoutCheckboxGroup;
13
+ exports.DSFormLayoutCheckboxGroupWithSchema = DSFormLayoutCheckboxGroup.DSFormLayoutCheckboxGroupWithSchema;
@@ -1,10 +1,11 @@
1
- import * as React from "react";
2
- import React2, { useMemo } from "react";
3
- import { describe } from "react-desc";
4
- import { uid } from "uid";
5
- import { propTypes } from "./propTypes";
6
- import { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from "./styles";
7
- const DSFormLayoutBlockItem = (props) => {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import { useMemo } from 'react';
3
+ import { describe } from 'react-desc';
4
+ import { uid } from 'uid';
5
+ import { propTypes } from './propTypes.js';
6
+ import { StyledContainer, StyledLabel, StyledMark, ScreenReaderOnly, StyledMessage } from './styles.js';
7
+
8
+ const DSFormLayoutBlockItem = props => {
8
9
  const {
9
10
  label,
10
11
  feedbackMessage,
@@ -21,40 +22,37 @@ const DSFormLayoutBlockItem = (props) => {
21
22
  isGroup = false
22
23
  } = props;
23
24
  const instanceUID = useMemo(() => uid(6), []);
24
- return /* @__PURE__ */ React2.createElement(StyledContainer, {
25
- leftLabel,
26
- fitContent,
27
- hideLabel,
28
- withHighlight,
29
- as: isGroup ? "fieldset" : "div",
30
- isGroup,
31
- "aria-describedby": `${inputID || instanceUID}_feedback_message`
32
- }, /* @__PURE__ */ React2.createElement(StyledLabel, {
25
+ return /*#__PURE__*/_jsx(StyledContainer, {
26
+ leftLabel: leftLabel,
27
+ fitContent: fitContent,
28
+ hideLabel: hideLabel,
29
+ withHighlight: withHighlight,
30
+ as: isGroup ? 'fieldset' : 'div',
31
+ isGroup: isGroup,
32
+ "aria-describedby": "".concat(inputID || instanceUID, "_feedback_message")
33
+ }, void 0, /*#__PURE__*/_jsx(StyledLabel, {
33
34
  htmlFor: inputID,
34
- leftLabel,
35
- hideLabel,
35
+ leftLabel: leftLabel,
36
+ hideLabel: hideLabel,
36
37
  "aria-hidden": isGroup
37
- }, label, (required || optional) && /* @__PURE__ */ React2.createElement(StyledMark, {
38
- required
39
- })), isGroup && /* @__PURE__ */ React2.createElement(ScreenReaderOnly, {
38
+ }, void 0, label, (required || optional) && /*#__PURE__*/_jsx(StyledMark, {
39
+ required: required
40
+ })), isGroup && /*#__PURE__*/_jsx(ScreenReaderOnly, {
40
41
  as: "legend"
41
- }, label), children, feedbackMessage && !hasError && /* @__PURE__ */ React2.createElement(StyledMessage, {
42
- leftLabel,
43
- hideLabel,
42
+ }, void 0, label), children, feedbackMessage && !hasError && /*#__PURE__*/_jsx(StyledMessage, {
43
+ leftLabel: leftLabel,
44
+ hideLabel: hideLabel,
44
45
  "aria-hidden": isGroup,
45
- id: `${inputID || instanceUID}_feedback_message`
46
- }, feedbackMessage), validationMessage && hasError && /* @__PURE__ */ React2.createElement(StyledMessage, {
47
- hasError,
48
- leftLabel,
49
- hideLabel,
46
+ id: "".concat(inputID || instanceUID, "_feedback_message")
47
+ }, void 0, feedbackMessage), validationMessage && hasError && /*#__PURE__*/_jsx(StyledMessage, {
48
+ hasError: hasError,
49
+ leftLabel: leftLabel,
50
+ hideLabel: hideLabel,
50
51
  role: "alert"
51
- }, validationMessage));
52
+ }, void 0, validationMessage));
52
53
  };
53
- DSFormLayoutBlockItem.propTypes = propTypes;
54
+
54
55
  const DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);
55
56
  DSFormLayoutBlockItemWithSchema.propTypes = propTypes;
56
- export {
57
- DSFormLayoutBlockItem,
58
- DSFormLayoutBlockItemWithSchema
59
- };
60
- //# sourceMappingURL=DSFormLayoutBlockItem.js.map
57
+
58
+ export { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- //# sourceMappingURL=index.d.js.map
1
+
@@ -1,3 +1 @@
1
- import * as React from "react";
2
- export * from "./DSFormLayoutBlockItem";
3
- //# sourceMappingURL=index.js.map
1
+ export { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema } from './DSFormLayoutBlockItem.js';
@@ -1,21 +1,19 @@
1
- import * as React from "react";
2
- import { PropTypes } from "react-desc";
1
+ import { PropTypes } from 'react-desc';
2
+
3
3
  const propTypes = {
4
- children: PropTypes.node.isRequired.description("Input component. "),
5
- label: PropTypes.string.isRequired.description("Label property for the input component. This property is required for accesibility purposes."),
4
+ children: PropTypes.node.isRequired.description('Input component. '),
5
+ label: PropTypes.string.isRequired.description('Label property for the input component. This property is required for accesibility purposes.'),
6
6
  inputID: PropTypes.string.isRequired.description("String that matches the input component's id. This property is required for accesibility purposes."),
7
- feedbackMessage: PropTypes.string.description("Feedback message to show below the input component."),
8
- validationMessage: PropTypes.string.description("Validation message to show below the input component. It requires hasError property set to true to be visible."),
9
- hasError: PropTypes.bool.description("Helper boolean property for the validation message."),
10
- required: PropTypes.bool.description("Adds required extra styling."),
11
- optional: PropTypes.bool.description("Adds optional extra styling."),
12
- fitContent: PropTypes.bool.description("Set the width of the layout to the input component."),
13
- leftLabel: PropTypes.bool.description("Adds the label at the left of the input component."),
14
- hideLabel: PropTypes.bool.description("Hides the input label. It still requires label and labelFor property for accesibility purposes"),
15
- withHighlight: PropTypes.bool.description("Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab."),
16
- isGroup: PropTypes.bool.description("Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.")
7
+ feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),
8
+ validationMessage: PropTypes.string.description('Validation message to show below the input component. It requires hasError property set to true to be visible.'),
9
+ hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),
10
+ required: PropTypes.bool.description('Adds required extra styling.'),
11
+ optional: PropTypes.bool.description('Adds optional extra styling.'),
12
+ fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),
13
+ leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),
14
+ hideLabel: PropTypes.bool.description('Hides the input label. It still requires label and labelFor property for accesibility purposes'),
15
+ withHighlight: PropTypes.bool.description('Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.'),
16
+ isGroup: PropTypes.bool.description('Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.')
17
17
  };
18
- export {
19
- propTypes
20
- };
21
- //# sourceMappingURL=propTypes.js.map
18
+
19
+ export { propTypes };