@elliemae/ds-form-layout-blocks 2.2.0-alpha.2 → 2.2.0-beta.0

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 (59) 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/types/form-layout-block-item/DSFormLayoutBlockItem.d.ts +1 -1
  31. package/types/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.d.ts +1 -1
  32. package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
  33. package/cjs/form-layout-block-item/index.d.js.map +0 -7
  34. package/cjs/form-layout-block-item/index.js.map +0 -7
  35. package/cjs/form-layout-block-item/propTypes.js.map +0 -7
  36. package/cjs/form-layout-block-item/styles.js.map +0 -7
  37. package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
  38. package/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
  39. package/cjs/form-layout-checkbox-group/defaultProps.js.map +0 -7
  40. package/cjs/form-layout-checkbox-group/index.d.js.map +0 -7
  41. package/cjs/form-layout-checkbox-group/index.js.map +0 -7
  42. package/cjs/form-layout-checkbox-group/propTypes.js.map +0 -7
  43. package/cjs/form-layout-checkbox-group/styles.js.map +0 -7
  44. package/cjs/index.d.js.map +0 -7
  45. package/cjs/index.js.map +0 -7
  46. package/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -7
  47. package/esm/form-layout-block-item/index.d.js.map +0 -7
  48. package/esm/form-layout-block-item/index.js.map +0 -7
  49. package/esm/form-layout-block-item/propTypes.js.map +0 -7
  50. package/esm/form-layout-block-item/styles.js.map +0 -7
  51. package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -7
  52. package/esm/form-layout-checkbox-group/config/useValidateProps.js.map +0 -7
  53. package/esm/form-layout-checkbox-group/defaultProps.js.map +0 -7
  54. package/esm/form-layout-checkbox-group/index.d.js.map +0 -7
  55. package/esm/form-layout-checkbox-group/index.js.map +0 -7
  56. package/esm/form-layout-checkbox-group/propTypes.js.map +0 -7
  57. package/esm/form-layout-checkbox-group/styles.js.map +0 -7
  58. package/esm/index.d.js.map +0 -7
  59. package/esm/index.js.map +0 -7
@@ -1,96 +1,80 @@
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 : 1px 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
1
+ import styled from 'styled-components';
2
+
3
+ const StyledContainer = /*#__PURE__*/styled.div.withConfig({
4
+ componentId: "sc-196zgtg-0"
5
+ })(["position:relative;padding:0;margin:0;display:grid;", " ", ";", " align-items:center;", ""], _ref => {
6
+ let {
7
+ fitContent
8
+ } = _ref;
9
+ return fitContent ? 'width: fit-content;' : undefined;
10
+ }, _ref2 => {
11
+ let {
12
+ isGroup
13
+ } = _ref2;
14
+ return isGroup ? 'border: none' : '';
15
+ }, _ref3 => {
16
+ let {
17
+ leftLabel,
18
+ hideLabel
19
+ } = _ref3;
20
+ return leftLabel && !hideLabel ? 'grid-template-columns: max-content auto;' : undefined;
21
+ }, _ref4 => {
22
+ let {
23
+ theme,
24
+ withHighlight
25
+ } = _ref4;
26
+ 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 : 2px solid #8F6326;\n border-radius : 4px;\n box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);\n }\n }\n ") : undefined;
27
+ });
28
+ const StyledLabel = /*#__PURE__*/styled.label.withConfig({
29
+ componentId: "sc-196zgtg-1"
30
+ })(["display:flex;", " ", ""], _ref5 => {
31
+ let {
32
+ theme,
33
+ leftLabel
34
+ } = _ref5;
35
+ return leftLabel ? "padding-right: ".concat(theme.space.xxs, ";") : undefined;
36
+ }, _ref6 => {
37
+ let {
38
+ hideLabel
39
+ } = _ref6;
40
+ 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;
41
+ });
42
+ const StyledMessage = /*#__PURE__*/styled.div.withConfig({
43
+ componentId: "sc-196zgtg-2"
44
+ })(["font-size:", ";font-style:italic;text-align:right;line-height:15px;height:15px;overflow:hidden;text-overflow:ellipsis;color:", ";", ""], _ref7 => {
45
+ let {
46
+ theme
47
+ } = _ref7;
48
+ return theme.fontSizes.microText[200];
49
+ }, _ref8 => {
50
+ let {
51
+ theme,
52
+ hasError
53
+ } = _ref8;
54
+ return hasError ? theme.colors.danger[900] : theme.colors.neutral[500];
55
+ }, _ref9 => {
56
+ let {
57
+ leftLabel,
58
+ hideLabel
59
+ } = _ref9;
60
+ return leftLabel && !hideLabel ? 'grid-column: 1/3;' : undefined;
61
+ });
62
+ const StyledMark = /*#__PURE__*/styled.span.withConfig({
63
+ componentId: "sc-196zgtg-3"
64
+ })(["width:6px;height:6px;border-radius:50%;margin-left:", ";", ""], _ref10 => {
65
+ let {
66
+ theme
67
+ } = _ref10;
68
+ return theme.space.xxxs;
69
+ }, _ref11 => {
70
+ let {
71
+ theme,
72
+ required
73
+ } = _ref11;
74
+ return required ? "\n background-color: ".concat(theme.colors.danger[900], ";\n ") : "\n border: 1px solid ".concat(theme.colors.brand[600], ";\n ");
75
+ });
76
+ const ScreenReaderOnly = /*#__PURE__*/styled.div.withConfig({
77
+ componentId: "sc-196zgtg-4"
78
+ })(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]);
79
+
80
+ export { ScreenReaderOnly, StyledContainer, StyledLabel, StyledMark, StyledMessage };
@@ -1,23 +1,21 @@
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) => {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { describe } from 'react-desc';
4
+ import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';
5
+ import { propTypes } from './propTypes.js';
6
+ import { StyledContainer } from './styles.js';
7
+ import { defaultProps } from './defaultProps.js';
8
+ import { useValidateProps } from './config/useValidateProps.js';
9
+
10
+ const DSFormLayoutCheckboxGroup = props => {
10
11
  useValidateProps(props);
11
12
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
12
- return /* @__PURE__ */ React2.createElement(StyledContainer, {
13
+ return /*#__PURE__*/_jsx(StyledContainer, {
13
14
  direction: propsWithDefault.direction
14
- }, propsWithDefault.children);
15
+ }, void 0, propsWithDefault.children);
15
16
  };
16
- DSFormLayoutCheckboxGroup.propTypes = propTypes;
17
+
17
18
  const DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);
18
19
  DSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;
19
- export {
20
- DSFormLayoutCheckboxGroup,
21
- DSFormLayoutCheckboxGroupWithSchema
22
- };
23
- //# sourceMappingURL=DSFormLayoutCheckboxGroup.js.map
20
+
21
+ export { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };
@@ -1,37 +1,28 @@
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";
1
+ import React from 'react';
2
+
3
+ const getVariableType = arg => {
4
+ if (Array.isArray(arg)) return 'array';
5
+ if (arg === null) return 'null';
6
+ if (arg === undefined) return 'undefined';
10
7
  return typeof arg;
11
8
  };
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
9
 
15
- Received: ${invalidProp} (${getVariableType(invalidProp)})
16
- Expected: "horizontal" or "vertical" (string)
17
- `);
10
+ const throwCheckboxGroupDirectionError = invalidProp => {
11
+ throw new Error("You are trying to pass a not valid \"direction\" property value for a checkbox group, please provide a valid type.\n\n Received: ".concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: \"horizontal\" or \"vertical\" (string)\n "));
18
12
  };
13
+
19
14
  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
- `);
15
+ throw new Error("You are trying to use a checkbox group without any React children, please provide at least one children to use.\n \n Received: (null)\n Expected: React children\n ");
25
16
  };
26
- const useValidateProps = (props) => {
27
- if (props.direction !== void 0 && props.direction !== "vertical" && props.direction !== "horizontal") {
17
+
18
+ const useValidateProps = props => {
19
+ if (props.direction !== undefined && props.direction !== 'vertical' && props.direction !== 'horizontal') {
28
20
  throwCheckboxGroupDirectionError(props.direction);
29
21
  }
30
- if (!React2.Children.count(props.children)) {
22
+
23
+ if (!React.Children.count(props.children)) {
31
24
  throwCheckboxGroupChildrenError();
32
25
  }
33
26
  };
34
- export {
35
- useValidateProps
36
- };
37
- //# sourceMappingURL=useValidateProps.js.map
27
+
28
+ export { useValidateProps };
@@ -1,8 +1,5 @@
1
- import * as React from "react";
2
1
  const defaultProps = {
3
- direction: "horizontal"
2
+ direction: 'horizontal'
4
3
  };
5
- export {
6
- defaultProps
7
- };
8
- //# sourceMappingURL=defaultProps.js.map
4
+
5
+ export { defaultProps };
@@ -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 "./DSFormLayoutCheckboxGroup";
3
- //# sourceMappingURL=index.js.map
1
+ export { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema } from './DSFormLayoutCheckboxGroup.js';
@@ -1,9 +1,7 @@
1
- import * as React from "react";
2
- import { PropTypes } from "react-desc";
1
+ import { PropTypes } from 'react-desc';
2
+
3
3
  const propTypes = {
4
- direction: PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group.")
4
+ direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.')
5
5
  };
6
- export {
7
- propTypes
8
- };
9
- //# sourceMappingURL=propTypes.js.map
6
+
7
+ export { propTypes };
@@ -1,21 +1,38 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- const StyledContainer = styled.div`
4
- display: inline-flex;
5
- flex-wrap: wrap;
6
- flex-direction: ${({ direction }) => direction === "horizontal" ? "row" : "column"};
7
- margin-left: ${({ theme }) => theme.space.xs};
8
- margin-right: ${({ theme }) => theme.space.xs};
9
- margin-top: ${({ theme }) => theme.space.xxs};
10
- & div {
11
- padding: 0;
12
- margin-bottom: ${({ theme }) => theme.space.xxs};
13
- }
14
- & div:not(:last-child) {
15
- margin-right: ${({ theme, direction }) => direction === "horizontal" ? theme.space.s : "0"};
16
- }
17
- `;
18
- export {
19
- StyledContainer
20
- };
21
- //# sourceMappingURL=styles.js.map
1
+ import styled from 'styled-components';
2
+
3
+ const StyledContainer = /*#__PURE__*/styled.div.withConfig({
4
+ componentId: "sc-1wopk9q-0"
5
+ })(["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 => {
6
+ let {
7
+ direction
8
+ } = _ref;
9
+ return direction === 'horizontal' ? 'row' : 'column';
10
+ }, _ref2 => {
11
+ let {
12
+ theme
13
+ } = _ref2;
14
+ return theme.space.xs;
15
+ }, _ref3 => {
16
+ let {
17
+ theme
18
+ } = _ref3;
19
+ return theme.space.xs;
20
+ }, _ref4 => {
21
+ let {
22
+ theme
23
+ } = _ref4;
24
+ return theme.space.xxs;
25
+ }, _ref5 => {
26
+ let {
27
+ theme
28
+ } = _ref5;
29
+ return theme.space.xxs;
30
+ }, _ref6 => {
31
+ let {
32
+ theme,
33
+ direction
34
+ } = _ref6;
35
+ return direction === 'horizontal' ? theme.space.s : '0';
36
+ });
37
+
38
+ export { StyledContainer };
package/esm/index.d.js CHANGED
@@ -1,4 +1 @@
1
- import * as React from "react";
2
- export * from "./form-layout-block-item/index.d";
3
- export * from "./form-layout-checkbox-group/index.d";
4
- //# sourceMappingURL=index.d.js.map
1
+
package/esm/index.js CHANGED
@@ -1,4 +1,2 @@
1
- import * as React from "react";
2
- export * from "./form-layout-block-item";
3
- export * from "./form-layout-checkbox-group";
4
- //# sourceMappingURL=index.js.map
1
+ export { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema } from './form-layout-block-item/DSFormLayoutBlockItem.js';
2
+ export { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema } from './form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-layout-blocks",
3
- "version": "2.2.0-alpha.2",
3
+ "version": "2.2.0-beta.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Form Layout",
6
6
  "module": "./esm/index.js",
@@ -72,7 +72,7 @@
72
72
  "build": "node ../../scripts/build/build.js"
73
73
  },
74
74
  "dependencies": {
75
- "@elliemae/ds-props-helpers": "2.2.0-alpha.2",
75
+ "@elliemae/ds-props-helpers": "2.2.0-beta.0",
76
76
  "react-desc": "~4.1.3",
77
77
  "uid": "~2.0.0"
78
78
  },
@@ -70,7 +70,7 @@ declare const DSFormLayoutBlockItem: {
70
70
  };
71
71
  };
72
72
  declare const DSFormLayoutBlockItemWithSchema: {
73
- (props?: Props | undefined): JSX.Element;
73
+ (props?: unknown): JSX.Element;
74
74
  propTypes: unknown;
75
75
  toTypescript: () => import("react-desc").TypescriptSchema;
76
76
  };
@@ -13,7 +13,7 @@ declare const DSFormLayoutCheckboxGroup: {
13
13
  };
14
14
  };
15
15
  declare const DSFormLayoutCheckboxGroupWithSchema: {
16
- (props?: DSControlledCheckboxGroupT | undefined): JSX.Element;
16
+ (props?: unknown): JSX.Element;
17
17
  propTypes: unknown;
18
18
  toTypescript: () => import("react-desc").TypescriptSchema;
19
19
  };
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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}</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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,wBAAyB;AACzB,iBAAoB;AAEpB,uBAA0B;AAC1B,oBAA0F;AAE1F,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,0BAAQ,MAAM,oBAAI,IAAI;AAE1C,SACE,mDAAC,+BAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAI,UAAU,aAAa;AAAA,IAC3B;AAAA,IACA,oBAAkB,GAAG,WAAW;AAAA,KAEhC,mDAAC,2BAAD;AAAA,IAAa,SAAS;AAAA,IAAS;AAAA,IAAsB;AAAA,IAAsB,eAAa;AAAA,KACrF,OACC,aAAY,aAAa,mDAAC,0BAAD;AAAA,IAAY;AAAA,OAExC,WAAW,mDAAC,gCAAD;AAAA,IAAkB,IAAG;AAAA,KAAU,QAC1C,UACA,mBAAmB,CAAC,YACnB,mDAAC,6BAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,eAAa;AAAA,IACb,IAAI,GAAG,WAAW;AAAA,KAEjB,kBAGJ,qBAAqB,YACpB,mDAAC,6BAAD;AAAA,IAAe;AAAA,IAAoB;AAAA,IAAsB;AAAA,IAAsB,MAAK;AAAA,KACjF;AAAA;AAOX,sBAAsB,YAAY;AAClC,MAAM,kCAAkC,gCAAS;AACjD,gCAAgC,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-block-item/index.d.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export interface DSFormLayoutBlockItemPropsT {\n children: JSX.Element;\n label: string;\n inputID: string;\n validationMessage?: string;\n feedbackMessage?: string;\n hasError?: boolean;\n leftLabel?: boolean;\n required?: boolean;\n fitContent?: boolean;\n optional?: boolean;\n hideLabel?: boolean;\n withHighlight?: boolean;\n isGroup?: boolean;\n}\n\nexport interface DSFormLayoutBlockItemStyledMessageT {\n hasError?: boolean;\n leftLabel?: boolean;\n hideLabel?: boolean;\n}\n\nexport interface DSFormLayoutBlockItemStyledContainerT {\n leftLabel?: boolean;\n fitContent?: boolean;\n hideLabel?: boolean;\n withHighlight?: boolean;\n isGroup?: boolean;\n}\n\nexport interface DSFormLayoutBlockItemStyledLabelT {\n leftLabel?: boolean;\n hideLabel?: boolean;\n}\n\nexport interface DSFormLayoutBlockItemStyledMarkT {\n required?: boolean;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-block-item/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSFormLayoutBlockItem';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,2CAAc;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-block-item/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,UAAU,4BAAU,KAAK,WAAW,YAAY;AAAA,EAChD,OAAO,4BAAU,OAAO,WAAW,YACjC;AAAA,EAEF,SAAS,4BAAU,OAAO,WAAW,YACnC;AAAA,EAEF,iBAAiB,4BAAU,OAAO,YAAY;AAAA,EAC9C,mBAAmB,4BAAU,OAAO,YAClC;AAAA,EAEF,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,YAAY,4BAAU,KAAK,YAAY;AAAA,EACvC,WAAW,4BAAU,KAAK,YAAY;AAAA,EACtC,WAAW,4BAAU,KAAK,YACxB;AAAA,EAEF,eAAe,4BAAU,KAAK,YAC5B;AAAA,EAEF,SAAS,4BAAU,KAAK,YACtB;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-block-item/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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 : 1px 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAQZ,MAAM,kBAAkB,iCAAO;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,iCAAO;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,iCAAO;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,iCAAO;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,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AACzB,8BAA6C;AAC7C,uBAA0B;AAC1B,oBAAgC;AAChC,0BAA6B;AAE7B,8BAAiC;AAEjC,MAAM,4BAA4B,CAAC,UAAmD;AACpF,gDAAiB;AACjB,QAAM,mBAAmB,0DAA6B,OAAO;AAE7D,SAAO,mDAAC,+BAAD;AAAA,IAAiB,WAAW,iBAAiB;AAAA,KAAY,iBAAiB;AAAA;AAGnF,0BAA0B,YAAY;AACtC,MAAM,sCAAsC,gCAAS;AACrD,oCAAoC,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/form-layout-checkbox-group/config/useValidateProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAGlB,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,qBAAM,SAAS,MAAM,MAAM,WAAW;AACzC;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-checkbox-group/defaultProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const defaultProps = {\n direction: 'horizontal',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,WAAW;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/form-layout-checkbox-group/index.d.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["type DirectionsT = 'horizontal' | 'vertical';\n\nexport interface DSControlledCheckboxGroupT {\n direction: DirectionsT;\n children: React.ReactNode;\n}\n\nexport interface DSControlledCheckboxGroupStyledContainerT {\n direction: DirectionsT;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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}</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,QAC1C,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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
- "mappings": "AAAA;",
6
- "names": []
7
- }