@elliemae/ds-form-layout-blocks 2.3.1 → 3.0.0-alpha.3
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/dist/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +89 -0
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +7 -0
- package/dist/cjs/form-layout-block-item/index.d.js +27 -0
- package/dist/cjs/form-layout-block-item/index.d.js.map +7 -0
- package/dist/cjs/form-layout-block-item/index.js +28 -0
- package/dist/cjs/form-layout-block-item/index.js.map +7 -0
- package/dist/cjs/form-layout-block-item/propTypes.js +50 -0
- package/dist/cjs/form-layout-block-item/propTypes.js.map +7 -0
- package/dist/cjs/form-layout-block-item/styles.js +125 -0
- package/dist/cjs/form-layout-block-item/styles.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +52 -0
- package/dist/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/config/useValidateProps.js +66 -0
- package/dist/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/defaultProps.js +37 -0
- package/dist/cjs/form-layout-checkbox-group/defaultProps.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/index.d.js +27 -0
- package/dist/cjs/form-layout-checkbox-group/index.d.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/index.js +28 -0
- package/dist/cjs/form-layout-checkbox-group/index.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/propTypes.js +38 -0
- package/dist/cjs/form-layout-checkbox-group/propTypes.js.map +7 -0
- package/dist/cjs/form-layout-checkbox-group/styles.js +50 -0
- package/dist/cjs/form-layout-checkbox-group/styles.js.map +7 -0
- package/dist/cjs/index.d.js +29 -0
- package/dist/cjs/index.d.js.map +7 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js +60 -0
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +7 -0
- package/dist/esm/form-layout-block-item/index.d.js +2 -0
- package/dist/esm/form-layout-block-item/index.d.js.map +7 -0
- package/dist/esm/form-layout-block-item/index.js +3 -0
- package/dist/esm/form-layout-block-item/index.js.map +7 -0
- package/dist/esm/form-layout-block-item/propTypes.js +21 -0
- package/dist/esm/form-layout-block-item/propTypes.js.map +7 -0
- package/dist/esm/form-layout-block-item/styles.js +96 -0
- package/dist/esm/form-layout-block-item/styles.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +23 -0
- package/dist/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/config/useValidateProps.js +37 -0
- package/dist/esm/form-layout-checkbox-group/config/useValidateProps.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/defaultProps.js +8 -0
- package/dist/esm/form-layout-checkbox-group/defaultProps.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/index.d.js +2 -0
- package/dist/esm/form-layout-checkbox-group/index.d.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/index.js +3 -0
- package/dist/esm/form-layout-checkbox-group/index.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/propTypes.js +9 -0
- package/dist/esm/form-layout-checkbox-group/propTypes.js.map +7 -0
- package/dist/esm/form-layout-checkbox-group/styles.js +21 -0
- package/dist/esm/form-layout-checkbox-group/styles.js.map +7 -0
- package/dist/esm/index.d.js +4 -0
- package/dist/esm/index.d.js.map +7 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +7 -0
- package/package.json +45 -36
- package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +0 -67
- package/cjs/form-layout-block-item/index.d.js +0 -2
- package/cjs/form-layout-block-item/index.js +0 -10
- package/cjs/form-layout-block-item/propTypes.js +0 -23
- package/cjs/form-layout-block-item/styles.js +0 -92
- package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +0 -30
- package/cjs/form-layout-checkbox-group/config/useValidateProps.js +0 -36
- package/cjs/form-layout-checkbox-group/defaultProps.js +0 -9
- package/cjs/form-layout-checkbox-group/index.d.js +0 -2
- package/cjs/form-layout-checkbox-group/index.js +0 -10
- package/cjs/form-layout-checkbox-group/propTypes.js +0 -11
- package/cjs/form-layout-checkbox-group/styles.js +0 -46
- package/cjs/index.d.js +0 -2
- package/cjs/index.js +0 -13
- package/esm/form-layout-block-item/DSFormLayoutBlockItem.js +0 -58
- package/esm/form-layout-block-item/index.d.js +0 -1
- package/esm/form-layout-block-item/index.js +0 -1
- package/esm/form-layout-block-item/propTypes.js +0 -19
- package/esm/form-layout-block-item/styles.js +0 -80
- package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +0 -21
- package/esm/form-layout-checkbox-group/config/useValidateProps.js +0 -28
- package/esm/form-layout-checkbox-group/defaultProps.js +0 -5
- package/esm/form-layout-checkbox-group/index.d.js +0 -1
- package/esm/form-layout-checkbox-group/index.js +0 -1
- package/esm/form-layout-checkbox-group/propTypes.js +0 -7
- package/esm/form-layout-checkbox-group/styles.js +0 -38
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -2
- package/types/form-layout-block-item/DSFormLayoutBlockItem.d.ts +0 -77
- package/types/form-layout-block-item/index.d.d.ts +0 -35
- package/types/form-layout-block-item/index.d.ts +0 -1
- package/types/form-layout-block-item/propTypes.d.ts +0 -66
- package/types/form-layout-block-item/styles.d.ts +0 -6
- package/types/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.d.ts +0 -20
- package/types/form-layout-checkbox-group/config/useValidateProps.d.ts +0 -2
- package/types/form-layout-checkbox-group/defaultProps.d.ts +0 -3
- package/types/form-layout-checkbox-group/index.d.d.ts +0 -10
- package/types/form-layout-checkbox-group/index.d.ts +0 -1
- package/types/form-layout-checkbox-group/propTypes.d.ts +0 -9
- package/types/form-layout-checkbox-group/styles.d.ts +0 -2
- package/types/index.d.ts +0 -2
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/form-layout-checkbox-group/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSFormLayoutCheckboxGroup';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,+CAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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");
|
|
34
|
+
const propTypes = {
|
|
35
|
+
direction: import_react_desc.PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group.")
|
|
36
|
+
};
|
|
37
|
+
module.exports = __toCommonJS(propTypes_exports);
|
|
38
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/form-layout-checkbox-group/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,WAAW,4BAAU,MAAM,CAAC,cAAc,aAAa,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
|
31
|
+
});
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/form-layout-checkbox-group/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import styled from 'styled-components';\nimport type { DSControlledCheckboxGroupStyledContainerT } from './index.d';\n\nexport const StyledContainer = styled.div<DSControlledCheckboxGroupStyledContainerT>`\n display: inline-flex;\n flex-wrap: wrap;\n flex-direction: ${({ direction }) => (direction === 'horizontal' ? 'row' : 'column')};\n margin-left: ${({ theme }) => theme.space.xs};\n margin-right: ${({ theme }) => theme.space.xs};\n margin-top: ${({ theme }) => theme.space.xxs};\n & div {\n padding: 0;\n margin-bottom: ${({ theme }) => theme.space.xxs};\n }\n & div:not(:last-child) {\n margin-right: ${({ theme, direction }) => (direction === 'horizontal' ? theme.space.s : '0')};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAGZ,MAAM,kBAAkB,iCAAO;AAAA;AAAA;AAAA,oBAGlB,CAAC,EAAE,gBAAiB,cAAc,eAAe,QAAQ;AAAA,iBAC5D,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,kBAC1B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,gBAC7B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA,qBAGtB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA,oBAG5B,CAAC,EAAE,OAAO,gBAAiB,cAAc,eAAe,MAAM,MAAM,IAAI;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './form-layout-block-item/index.d'\nexport * from './form-layout-checkbox-group/index.d'", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,4BAAc;AACd,4BAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './form-layout-block-item';\nexport * from './form-layout-checkbox-group';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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) => {
|
|
8
|
+
const {
|
|
9
|
+
label,
|
|
10
|
+
feedbackMessage,
|
|
11
|
+
validationMessage,
|
|
12
|
+
inputID,
|
|
13
|
+
children,
|
|
14
|
+
hasError,
|
|
15
|
+
leftLabel,
|
|
16
|
+
required,
|
|
17
|
+
optional,
|
|
18
|
+
hideLabel,
|
|
19
|
+
fitContent,
|
|
20
|
+
withHighlight,
|
|
21
|
+
isGroup = false
|
|
22
|
+
} = props;
|
|
23
|
+
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, {
|
|
33
|
+
htmlFor: inputID,
|
|
34
|
+
leftLabel,
|
|
35
|
+
hideLabel,
|
|
36
|
+
"aria-hidden": isGroup
|
|
37
|
+
}, label, (required || optional) && /* @__PURE__ */ React2.createElement(StyledMark, {
|
|
38
|
+
required
|
|
39
|
+
})), isGroup && /* @__PURE__ */ React2.createElement(ScreenReaderOnly, {
|
|
40
|
+
as: "legend"
|
|
41
|
+
}, `${label}. ${feedbackMessage || ""}`), children, feedbackMessage && !hasError && /* @__PURE__ */ React2.createElement(StyledMessage, {
|
|
42
|
+
leftLabel,
|
|
43
|
+
hideLabel,
|
|
44
|
+
"aria-hidden": isGroup,
|
|
45
|
+
id: `${inputID || instanceUID}_feedback_message`
|
|
46
|
+
}, feedbackMessage), validationMessage && hasError && /* @__PURE__ */ React2.createElement(StyledMessage, {
|
|
47
|
+
hasError,
|
|
48
|
+
leftLabel,
|
|
49
|
+
hideLabel,
|
|
50
|
+
role: "alert"
|
|
51
|
+
}, validationMessage));
|
|
52
|
+
};
|
|
53
|
+
DSFormLayoutBlockItem.propTypes = propTypes;
|
|
54
|
+
const DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);
|
|
55
|
+
DSFormLayoutBlockItemWithSchema.propTypes = propTypes;
|
|
56
|
+
export {
|
|
57
|
+
DSFormLayoutBlockItem,
|
|
58
|
+
DSFormLayoutBlockItemWithSchema
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=DSFormLayoutBlockItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport type { DSFormLayoutBlockItemPropsT as Props } from './index.d';\nimport { propTypes } from './propTypes';\nimport { StyledMessage, StyledLabel, StyledContainer, StyledMark, ScreenReaderOnly } from './styles';\n\nconst DSFormLayoutBlockItem = (props: Props): JSX.Element => {\n const {\n label,\n feedbackMessage,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup = false,\n } = props;\n\n const instanceUID = useMemo(() => uid(6), []);\n\n return (\n <StyledContainer\n leftLabel={leftLabel}\n fitContent={fitContent}\n hideLabel={hideLabel}\n withHighlight={withHighlight}\n as={isGroup ? 'fieldset' : 'div'}\n isGroup={isGroup}\n aria-describedby={`${inputID || instanceUID}_feedback_message`}\n >\n <StyledLabel htmlFor={inputID} leftLabel={leftLabel} hideLabel={hideLabel} aria-hidden={isGroup}>\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n {isGroup && <ScreenReaderOnly as=\"legend\">{`${label}. ${feedbackMessage || ''}`}</ScreenReaderOnly>}\n {children}\n {feedbackMessage && !hasError && (\n <StyledMessage\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n id={`${inputID || instanceUID}_feedback_message`}\n >\n {feedbackMessage}\n </StyledMessage>\n )}\n {validationMessage && hasError && (\n <StyledMessage hasError={hasError} leftLabel={leftLabel} hideLabel={hideLabel} role=\"alert\">\n {validationMessage}\n </StyledMessage>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AAEA;AACA;AAEA,MAAM,wBAAwB,CAAC,UAA8B;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR;AAEJ,QAAM,cAAc,QAAQ,MAAM,IAAI,IAAI;AAE1C,SACE,qCAAC,iBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAI,UAAU,aAAa;AAAA,IAC3B;AAAA,IACA,oBAAkB,GAAG,WAAW;AAAA,KAEhC,qCAAC,aAAD;AAAA,IAAa,SAAS;AAAA,IAAS;AAAA,IAAsB;AAAA,IAAsB,eAAa;AAAA,KACrF,OACC,aAAY,aAAa,qCAAC,YAAD;AAAA,IAAY;AAAA,OAExC,WAAW,qCAAC,kBAAD;AAAA,IAAkB,IAAG;AAAA,KAAU,GAAG,UAAU,mBAAmB,OAC1E,UACA,mBAAmB,CAAC,YACnB,qCAAC,eAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,eAAa;AAAA,IACb,IAAI,GAAG,WAAW;AAAA,KAEjB,kBAGJ,qBAAqB,YACpB,qCAAC,eAAD;AAAA,IAAe;AAAA,IAAoB;AAAA,IAAsB;AAAA,IAAsB,MAAK;AAAA,KACjF;AAAA;AAOX,sBAAsB,YAAY;AAClC,MAAM,kCAAkC,SAAS;AACjD,gCAAgC,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFormLayoutBlockItem';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "react-desc";
|
|
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."),
|
|
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.")
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
propTypes
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/propTypes.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.isRequired.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.isRequired.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n feedbackMessage: PropTypes.string.description('Feedback message to show below the input component.'),\n validationMessage: PropTypes.string.description(\n 'Validation message to show below the input component. It requires hasError property set to true to be visible.',\n ),\n hasError: PropTypes.bool.description('Helper boolean property for the validation message.'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n fitContent: PropTypes.bool.description('Set the width of the layout to the input component.'),\n leftLabel: PropTypes.bool.description('Adds the label at the left of the input component.'),\n hideLabel: PropTypes.bool.description(\n 'Hides the input label. It still requires label and labelFor property for accesibility purposes',\n ),\n withHighlight: PropTypes.bool.description(\n 'Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab.',\n ),\n isGroup: PropTypes.bool.description(\n 'Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input.',\n ),\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AAAA,EACvB,UAAU,UAAU,KAAK,WAAW,YAAY;AAAA,EAChD,OAAO,UAAU,OAAO,WAAW,YACjC;AAAA,EAEF,SAAS,UAAU,OAAO,WAAW,YACnC;AAAA,EAEF,iBAAiB,UAAU,OAAO,YAAY;AAAA,EAC9C,mBAAmB,UAAU,OAAO,YAClC;AAAA,EAEF,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,YAAY,UAAU,KAAK,YAAY;AAAA,EACvC,WAAW,UAAU,KAAK,YAAY;AAAA,EACtC,WAAW,UAAU,KAAK,YACxB;AAAA,EAEF,eAAe,UAAU,KAAK,YAC5B;AAAA,EAEF,SAAS,UAAU,KAAK,YACtB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
const StyledContainer = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
display: grid;
|
|
8
|
+
${({ fitContent }) => fitContent ? "width: fit-content;" : void 0}
|
|
9
|
+
${({ isGroup }) => isGroup ? "border: none" : ""};
|
|
10
|
+
${({ leftLabel, hideLabel }) => leftLabel && !hideLabel ? "grid-template-columns: max-content auto;" : void 0}
|
|
11
|
+
align-items: center;
|
|
12
|
+
${({ theme, withHighlight }) => withHighlight ? `
|
|
13
|
+
&::after {
|
|
14
|
+
position: absolute;
|
|
15
|
+
content: '';
|
|
16
|
+
left: -${theme.space.xxs};
|
|
17
|
+
top: -${theme.space.xxxs};
|
|
18
|
+
z-index: -1;
|
|
19
|
+
width: calc(100% + ${theme.space.xs});
|
|
20
|
+
height: calc(100% + ${theme.space.xxs});
|
|
21
|
+
background-color: #FEFBEE;
|
|
22
|
+
border : 1px solid #8F6326;
|
|
23
|
+
border-radius : 4px;
|
|
24
|
+
box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
|
|
25
|
+
}
|
|
26
|
+
&:hover,
|
|
27
|
+
&:focus-within {
|
|
28
|
+
&::after {
|
|
29
|
+
position: absolute;
|
|
30
|
+
content: '';
|
|
31
|
+
left: -${theme.space.xxs};
|
|
32
|
+
top: -${theme.space.xxxs};
|
|
33
|
+
z-index: -1;
|
|
34
|
+
width: calc(100% + ${theme.space.xs});
|
|
35
|
+
height: calc(100% + ${theme.space.xxs});
|
|
36
|
+
background-color: #FFF9D3;
|
|
37
|
+
border : 2px solid #8F6326;
|
|
38
|
+
border-radius : 4px;
|
|
39
|
+
box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
` : void 0}
|
|
43
|
+
`;
|
|
44
|
+
const StyledLabel = styled.label`
|
|
45
|
+
display: flex;
|
|
46
|
+
${({ theme, leftLabel }) => leftLabel ? `padding-right: ${theme.space.xxs};` : void 0}
|
|
47
|
+
${({ hideLabel }) => hideLabel ? `position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: 1px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: -1px;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
clip: rect(0, 0, 0, 0);
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
border: 0;
|
|
56
|
+
` : void 0}
|
|
57
|
+
`;
|
|
58
|
+
const StyledMessage = styled.div`
|
|
59
|
+
font-size: ${({ theme }) => theme.fontSizes.microText[200]};
|
|
60
|
+
font-style: italic;
|
|
61
|
+
text-align: right;
|
|
62
|
+
line-height: 15px;
|
|
63
|
+
height: 15px;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
color: ${({ theme, hasError }) => hasError ? theme.colors.danger[900] : theme.colors.neutral[500]};
|
|
67
|
+
${({ leftLabel, hideLabel }) => leftLabel && !hideLabel ? "grid-column: 1/3;" : void 0}
|
|
68
|
+
`;
|
|
69
|
+
const StyledMark = styled.span`
|
|
70
|
+
width: 6px;
|
|
71
|
+
height: 6px;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
margin-left: ${({ theme }) => theme.space.xxxs};
|
|
74
|
+
${({ theme, required }) => required ? `
|
|
75
|
+
background-color: ${theme.colors.danger[900]};
|
|
76
|
+
` : `
|
|
77
|
+
border: 1px solid ${theme.colors.brand[600]};
|
|
78
|
+
`}
|
|
79
|
+
`;
|
|
80
|
+
const ScreenReaderOnly = styled.div`
|
|
81
|
+
clip: rect(0 0 0 0);
|
|
82
|
+
clip-path: inset(50%);
|
|
83
|
+
height: 1px;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
position: absolute;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
width: 1px;
|
|
88
|
+
`;
|
|
89
|
+
export {
|
|
90
|
+
ScreenReaderOnly,
|
|
91
|
+
StyledContainer,
|
|
92
|
+
StyledLabel,
|
|
93
|
+
StyledMark,
|
|
94
|
+
StyledMessage
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/styles.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport type {\n DSFormLayoutBlockItemStyledContainerT,\n DSFormLayoutBlockItemStyledLabelT,\n DSFormLayoutBlockItemStyledMessageT,\n DSFormLayoutBlockItemStyledMarkT,\n} from './index.d';\n\nexport const StyledContainer = styled.div<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined)}\n align-items: center;\n ${({ theme, withHighlight }) =>\n withHighlight\n ? `\n &::after {\n position: absolute;\n content: '';\n left: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${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: -${theme.space.xxs};\n top: -${theme.space.xxxs};\n z-index: -1;\n width: calc(100% + ${theme.space.xs});\n height: calc(100% + ${theme.space.xxs});\n background-color: #FFF9D3;\n border : 2px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n `\n : undefined}\n`;\n\nexport const StyledLabel = styled.label<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxs};` : undefined)}\n ${({ hideLabel }) =>\n hideLabel\n ? `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 `\n : undefined}\n`;\n\nexport const StyledMessage = styled.div<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n font-style: italic;\n text-align: right;\n line-height: 15px;\n height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined)}\n`;\n\nexport const StyledMark = styled.span<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n\nexport const ScreenReaderOnly = styled.div`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAQO,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKlC,CAAC,EAAE,iBAAkB,aAAa,wBAAwB;AAAA,IAC1D,CAAC,EAAE,cAAe,UAAU,iBAAiB;AAAA,IAC7C,CAAC,EAAE,WAAW,gBAAiB,aAAa,CAAC,YAAY,6CAA6C;AAAA;AAAA,IAEtG,CAAC,EAAE,OAAO,oBACV,gBACI;AAAA;AAAA;AAAA;AAAA,iBAIS,MAAM,MAAM;AAAA,gBACb,MAAM,MAAM;AAAA;AAAA,6BAEC,MAAM,MAAM;AAAA,+BACV,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAWtB,MAAM,MAAM;AAAA,oBACb,MAAM,MAAM;AAAA;AAAA,iCAEC,MAAM,MAAM;AAAA,mCACV,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQvC;AAAA;AAGD,MAAM,cAAc,OAAO;AAAA;AAAA,IAE9B,CAAC,EAAE,OAAO,gBAAiB,YAAY,kBAAkB,MAAM,MAAM,SAAS;AAAA,IAC9E,CAAC,EAAE,gBACH,YACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA;AAAA;AAGD,MAAM,gBAAgB,OAAO;AAAA,eACrB,CAAC,EAAE,YAAY,MAAM,UAAU,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAO7C,CAAC,EAAE,OAAO,eAAgB,WAAW,MAAM,OAAO,OAAO,OAAO,MAAM,OAAO,QAAQ;AAAA,IAC5F,CAAC,EAAE,WAAW,gBAAiB,aAAa,CAAC,YAAY,sBAAsB;AAAA;AAG5E,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA,iBAIhB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,IACxC,CAAC,EAAE,OAAO,eACV,WACI;AAAA,sBACc,MAAM,OAAO,OAAO;AAAA,MAElC;AAAA,sBACc,MAAM,OAAO,MAAM;AAAA;AAAA;AAIlC,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
5
|
+
import { propTypes } from "./propTypes";
|
|
6
|
+
import { StyledContainer } from "./styles";
|
|
7
|
+
import { defaultProps } from "./defaultProps";
|
|
8
|
+
import { useValidateProps } from "./config/useValidateProps";
|
|
9
|
+
const DSFormLayoutCheckboxGroup = (props) => {
|
|
10
|
+
useValidateProps(props);
|
|
11
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
12
|
+
return /* @__PURE__ */ React2.createElement(StyledContainer, {
|
|
13
|
+
direction: propsWithDefault.direction
|
|
14
|
+
}, propsWithDefault.children);
|
|
15
|
+
};
|
|
16
|
+
DSFormLayoutCheckboxGroup.propTypes = propTypes;
|
|
17
|
+
const DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);
|
|
18
|
+
DSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;
|
|
19
|
+
export {
|
|
20
|
+
DSFormLayoutCheckboxGroup,
|
|
21
|
+
DSFormLayoutCheckboxGroupWithSchema
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=DSFormLayoutCheckboxGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes';\nimport { StyledContainer } from './styles';\nimport { defaultProps } from './defaultProps';\nimport type { DSControlledCheckboxGroupT } from './index.d';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst DSFormLayoutCheckboxGroup = (props: DSControlledCheckboxGroupT): JSX.Element => {\n useValidateProps(props);\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n return <StyledContainer direction={propsWithDefault.direction}>{propsWithDefault.children}</StyledContainer>;\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA,MAAM,4BAA4B,CAAC,UAAmD;AACpF,mBAAiB;AACjB,QAAM,mBAAmB,6BAA6B,OAAO;AAE7D,SAAO,qCAAC,iBAAD;AAAA,IAAiB,WAAW,iBAAiB;AAAA,KAAY,iBAAiB;AAAA;AAGnF,0BAA0B,YAAY;AACtC,MAAM,sCAAsC,SAAS;AACrD,oCAAoC,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
const getVariableType = (arg) => {
|
|
4
|
+
if (Array.isArray(arg))
|
|
5
|
+
return "array";
|
|
6
|
+
if (arg === null)
|
|
7
|
+
return "null";
|
|
8
|
+
if (arg === void 0)
|
|
9
|
+
return "undefined";
|
|
10
|
+
return typeof arg;
|
|
11
|
+
};
|
|
12
|
+
const throwCheckboxGroupDirectionError = (invalidProp) => {
|
|
13
|
+
throw new Error(`You are trying to pass a not valid "direction" property value for a checkbox group, please provide a valid type.
|
|
14
|
+
|
|
15
|
+
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
16
|
+
Expected: "horizontal" or "vertical" (string)
|
|
17
|
+
`);
|
|
18
|
+
};
|
|
19
|
+
const throwCheckboxGroupChildrenError = () => {
|
|
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
|
+
`);
|
|
25
|
+
};
|
|
26
|
+
const useValidateProps = (props) => {
|
|
27
|
+
if (props.direction !== void 0 && props.direction !== "vertical" && props.direction !== "horizontal") {
|
|
28
|
+
throwCheckboxGroupDirectionError(props.direction);
|
|
29
|
+
}
|
|
30
|
+
if (!React2.Children.count(props.children)) {
|
|
31
|
+
throwCheckboxGroupChildrenError();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
useValidateProps
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { DSControlledCheckboxGroupT } from '../index.d';\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwCheckboxGroupDirectionError = (invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: \"horizontal\" or \"vertical\" (string)\n `,\n );\n};\n\nconst throwCheckboxGroupChildrenError = (): void => {\n throw new Error(\n `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 `,\n );\n};\n\nexport const useValidateProps = (props: DSControlledCheckboxGroupT): void => {\n if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {\n throwCheckboxGroupDirectionError(props.direction);\n }\n if (!React.Children.count(props.children)) {\n throwCheckboxGroupChildrenError();\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAGA,MAAM,kBAAkB,CAAC,QAAyB;AAChD,MAAI,MAAM,QAAQ;AAAM,WAAO;AAC/B,MAAI,QAAQ;AAAM,WAAO;AACzB,MAAI,QAAQ;AAAW,WAAO;AAC9B,SAAO,OAAO;AAAA;AAGhB,MAAM,mCAAmC,CAAC,gBAA+B;AACvE,QAAM,IAAI,MACR;AAAA;AAAA,cAEU,gBAAgB,gBAAgB;AAAA;AAAA;AAAA;AAM9C,MAAM,kCAAkC,MAAY;AAClD,QAAM,IAAI,MACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAQG,MAAM,mBAAmB,CAAC,UAA4C;AAC3E,MAAI,MAAM,cAAc,UAAa,MAAM,cAAc,cAAc,MAAM,cAAc,cAAc;AACvG,qCAAiC,MAAM;AAAA;AAEzC,MAAI,CAAC,OAAM,SAAS,MAAM,MAAM,WAAW;AACzC;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-checkbox-group/defaultProps.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const defaultProps = {\n direction: 'horizontal',\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,eAAe;AAAA,EAC1B,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-checkbox-group/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFormLayoutCheckboxGroup';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "react-desc";
|
|
3
|
+
const propTypes = {
|
|
4
|
+
direction: PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group.")
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
propTypes
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-checkbox-group/propTypes.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AAAA,EACvB,WAAW,UAAU,MAAM,CAAC,cAAc,aAAa,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|