@elliemae/ds-form-layout-blocks 3.21.2 → 3.22.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.
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +19 -13
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +2 -2
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItemDefinitions.js +16 -1
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItemDefinitions.js.map +2 -2
- package/dist/cjs/form-layout-block-item/config/useFormLayoutBlockItem.js +3 -3
- package/dist/cjs/form-layout-block-item/config/useFormLayoutBlockItem.js.map +2 -2
- package/dist/cjs/form-layout-block-item/index.js +1 -0
- package/dist/cjs/form-layout-block-item/index.js.map +2 -2
- package/dist/cjs/form-layout-block-item/{propTypes.js → react-desc-prop-types.js} +4 -4
- package/dist/cjs/form-layout-block-item/{propTypes.js.map → react-desc-prop-types.js.map} +1 -1
- package/dist/cjs/form-layout-block-item/styles.js +31 -5
- package/dist/cjs/form-layout-block-item/styles.js.map +2 -2
- package/dist/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +3 -3
- package/dist/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +2 -2
- package/dist/cjs/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.js +3 -3
- package/dist/cjs/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.js.map +2 -2
- package/dist/cjs/form-layout-checkbox-group/{propTypes.js → react-desc-prop-types.js} +6 -5
- package/dist/cjs/form-layout-checkbox-group/react-desc-prop-types.js.map +7 -0
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js +20 -13
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +2 -2
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItemDefinitions.js +16 -1
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItemDefinitions.js.map +2 -2
- package/dist/esm/form-layout-block-item/config/useFormLayoutBlockItem.js +1 -1
- package/dist/esm/form-layout-block-item/config/useFormLayoutBlockItem.js.map +1 -1
- package/dist/esm/form-layout-block-item/index.js +1 -0
- package/dist/esm/form-layout-block-item/index.js.map +2 -2
- package/dist/esm/form-layout-block-item/{propTypes.js → react-desc-prop-types.js} +1 -1
- package/dist/esm/form-layout-block-item/{propTypes.js.map → react-desc-prop-types.js.map} +1 -1
- package/dist/esm/form-layout-block-item/styles.js +32 -6
- package/dist/esm/form-layout-block-item/styles.js.map +2 -2
- package/dist/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +1 -1
- package/dist/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +1 -1
- package/dist/esm/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.js +1 -1
- package/dist/esm/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.js.map +1 -1
- package/dist/esm/form-layout-checkbox-group/{propTypes.js → react-desc-prop-types.js} +3 -2
- package/dist/esm/form-layout-checkbox-group/react-desc-prop-types.js.map +7 -0
- package/dist/types/form-layout-block-item/DSFormLayoutBlockItem.d.ts +1 -1
- package/dist/types/form-layout-block-item/DSFormLayoutBlockItemDefinitions.d.ts +9 -0
- package/dist/types/form-layout-block-item/config/useFormLayoutBlockItem.d.ts +1 -1
- package/dist/types/form-layout-block-item/index.d.ts +2 -1
- package/dist/types/form-layout-block-item/styles.d.ts +1 -0
- package/dist/types/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.d.ts +3 -448
- package/dist/types/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.d.ts +1 -1
- package/dist/types/form-layout-checkbox-group/react-desc-prop-types.d.ts +17 -0
- package/package.json +10 -10
- package/dist/cjs/exported-related/DSFormLayoutBlockItemDataTestId.js +0 -42
- package/dist/cjs/exported-related/DSFormLayoutBlockItemDataTestId.js.map +0 -7
- package/dist/cjs/form-layout-checkbox-group/propTypes.js.map +0 -7
- package/dist/esm/exported-related/DSFormLayoutBlockItemDataTestId.js +0 -12
- package/dist/esm/exported-related/DSFormLayoutBlockItemDataTestId.js.map +0 -7
- package/dist/esm/form-layout-checkbox-group/propTypes.js.map +0 -7
- package/dist/types/exported-related/DSFormLayoutBlockItemDataTestId.d.ts +0 -7
- package/dist/types/form-layout-checkbox-group/propTypes.d.ts +0 -465
- /package/dist/types/form-layout-block-item/{propTypes.d.ts → react-desc-prop-types.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 { Grid } from '@elliemae/ds-grid';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { AlertsSmallFill } from '@elliemae/ds-icons';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useMemo, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { AlertsSmallFill } from '@elliemae/ds-icons';\nimport type { DSFormLayoutBlockItemT } from './react-desc-prop-types.js';\nimport { propTypes } from './react-desc-prop-types.js';\nimport {\n StyledMessage,\n StyledLabel,\n StyledContainer,\n StyledMark,\n ScreenReaderOnly,\n StyledCharCount,\n StyledErrorMessage,\n} from './styles.js';\nimport { useFormLayoutBlockItem } from './config/useFormLayoutBlockItem.js';\n\nconst DSFormLayoutBlockItem = (props: DSFormLayoutBlockItemT.Props) => {\n const { globalAttributes, xstyledProps, propsWithDefault } = useFormLayoutBlockItem(props);\n const {\n label,\n feedbackMessage,\n maxCharCounter,\n currentChar,\n validationMessage,\n inputID,\n children,\n hasError,\n leftLabel,\n required,\n optional,\n hideLabel,\n fitContent,\n withHighlight,\n isGroup,\n } = propsWithDefault;\n\n // eslint-disable-next-line no-unused-vars\n const { className, label: globalLabel, ...othersGlobalAttributes } = globalAttributes;\n const instanceUID = useMemo(() => inputID ?? `form_layout_block_item_${uid(6)}`, [inputID]);\n\n const cols = useMemo(() => (maxCharCounter !== undefined ? ['1fr', 'auto'] : ['1fr']), [maxCharCounter]);\n\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\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={!isGroup ? `${instanceUID}_feedback_message` : undefined}\n className={className}\n {...xstyledProps}\n {...othersGlobalAttributes}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={cols} gutter=\"xxs\">\n {label ? (\n <StyledLabel\n id={`${instanceUID}_block_label`}\n htmlFor={instanceUID}\n leftLabel={leftLabel}\n hideLabel={hideLabel}\n aria-hidden={isGroup}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n ) : null}\n\n {maxCharCounter !== undefined && currentChar !== undefined ? (\n <StyledCharCount\n hasError={currentChar > maxCharCounter}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >{`${currentChar}/${maxCharCounter}`}</StyledCharCount>\n ) : null}\n </Grid>\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={`${instanceUID}_feedback_message`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {feedbackMessage}\n </StyledMessage>\n ) : (\n <ScreenReaderOnly id={`${instanceUID}_feedback_message`}>{feedbackMessage}</ScreenReaderOnly>\n )}\n {validationMessage && hasError ? (\n <StyledErrorMessage\n hasError={hasError}\n leftLabel={leftLabel}\n aria-label={`${label}`}\n hideLabel={hideLabel}\n role=\"alert\"\n id={`${instanceUID}_error_message`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <AlertsSmallFill width={8} height={8} color={['danger', '900']} style={{ marginBottom: '2px' }} />\n \n {`${validationMessage}`}\n </StyledErrorMessage>\n ) : (\n <ScreenReaderOnly id={`${instanceUID}_error_message`}>{validationMessage}</ScreenReaderOnly>\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.propTypes = propTypes;\nDSFormLayoutBlockItem.displayName = 'DSFormLayoutBlockItem';\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
2
3
|
const DSFormLayoutBlockItemName = "DSFormLayoutBlockItem";
|
|
4
|
+
const DSFormLayoutBlockItemSlots = {
|
|
5
|
+
CONTAINER: "container",
|
|
6
|
+
LABEL: "label",
|
|
7
|
+
MESSAGE: "message",
|
|
8
|
+
ERROR_MESSAGE: "error-message",
|
|
9
|
+
COUNTER: "counter",
|
|
10
|
+
MARK: "mark"
|
|
11
|
+
};
|
|
12
|
+
const DSFormLayoutBlockItemDataTestId = slotObjectToDataTestIds(
|
|
13
|
+
DSFormLayoutBlockItemName,
|
|
14
|
+
DSFormLayoutBlockItemSlots
|
|
15
|
+
);
|
|
3
16
|
export {
|
|
4
|
-
|
|
17
|
+
DSFormLayoutBlockItemDataTestId,
|
|
18
|
+
DSFormLayoutBlockItemName,
|
|
19
|
+
DSFormLayoutBlockItemSlots
|
|
5
20
|
};
|
|
6
21
|
//# sourceMappingURL=DSFormLayoutBlockItemDefinitions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/DSFormLayoutBlockItemDefinitions.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFormLayoutBlockItemName = 'DSFormLayoutBlockItem';\n\nexport const DSFormLayoutBlockItemSlots = {\n CONTAINER: 'container',\n LABEL: 'label',\n MESSAGE: 'message',\n ERROR_MESSAGE: 'error-message',\n COUNTER: 'counter',\n MARK: 'mark',\n};\n\nexport const DSFormLayoutBlockItemDataTestId = slotObjectToDataTestIds(\n DSFormLayoutBlockItemName,\n DSFormLayoutBlockItemSlots,\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,4BAA4B;AAElC,MAAM,6BAA6B;AAAA,EACxC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,SAAS;AAAA,EACT,eAAe;AAAA,EACf,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useMemoMergePropsWithDefault,
|
|
7
7
|
useValidateTypescriptPropTypes
|
|
8
8
|
} from "@elliemae/ds-props-helpers";
|
|
9
|
-
import { propTypes, defaultProps } from "../
|
|
9
|
+
import { propTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
10
10
|
import { DSFormLayoutBlockItemName } from "../DSFormLayoutBlockItemDefinitions.js";
|
|
11
11
|
const useFormLayoutBlockItem = (props) => {
|
|
12
12
|
useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutBlockItemName);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/form-layout-block-item/config/useFormLayoutBlockItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps, type DSFormLayoutBlockItemT } from '../
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps, type DSFormLayoutBlockItemT } from '../react-desc-prop-types.js';\nimport { DSFormLayoutBlockItemName } from '../DSFormLayoutBlockItemDefinitions.js';\n\ninterface UseFormLayoutBlockItemT {\n propsWithDefault: DSFormLayoutBlockItemT.InternalProps;\n globalAttributes: GlobalAttributesT;\n xstyledProps: XstyledProps;\n}\n\nexport const useFormLayoutBlockItem = (props: DSFormLayoutBlockItemT.Props): UseFormLayoutBlockItemT => {\n useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutBlockItemName);\n const propsWithDefault = useMemoMergePropsWithDefault<DSFormLayoutBlockItemT.InternalProps>(props, defaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return React.useMemo(\n () => ({ globalAttributes, xstyledProps, propsWithDefault }),\n [globalAttributes, xstyledProps, propsWithDefault],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAGlB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,oBAAiD;AACrE,SAAS,iCAAiC;AAQnC,MAAM,yBAAyB,CAAC,UAAiE;AACtG,iCAA+B,OAAO,WAAW,yBAAyB;AAC1E,QAAM,mBAAmB,6BAAmE,OAAO,YAAY;AAC/G,QAAM,mBAAmB,uBAAuB,gBAAgB;AAEhE,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,SAAOA,OAAM;AAAA,IACX,OAAO,EAAE,kBAAkB,cAAc,iBAAiB;AAAA,IAC1D,CAAC,kBAAkB,cAAc,gBAAgB;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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.js';\nexport type { DSFormLayoutBlockItemT } from './
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFormLayoutBlockItem.js';\nexport * from './DSFormLayoutBlockItemDefinitions.js';\nexport type { DSFormLayoutBlockItemT } from './react-desc-prop-types.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-block-item/react-desc-prop-types.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport const defaultProps = {\n isGroup: false,\n};\n\nexport declare namespace DSFormLayoutBlockItemT {\n export interface PropsOptional {\n maxCharCounter?: number;\n currentChar?: number;\n inputID?: string;\n iconError?: boolean;\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 }\n\n export interface DefaultProps {\n isGroup: boolean;\n }\n\n export interface PropsRequired {\n children: JSX.Element;\n label: string;\n }\n\n export interface Props extends PropsOptional, PropsRequired, Partial<DefaultProps> {}\n export interface InternalProps extends PropsOptional, PropsRequired, DefaultProps {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description('Input component. '),\n label: PropTypes.string.description(\n 'Label property for the input component. This property is required for accesibility purposes.',\n ),\n inputID: PropTypes.string.description(\n \"String that matches the input component's id. This property is required for accesibility purposes.\",\n ),\n maxCharCounter: PropTypes.number.description('Max of characters allowed.'),\n currentChar: PropTypes.number.description('Current counter of input text area'),\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 iconError: PropTypes.bool.description('Adds icon error extra styling.'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,2BAA2B,wBAAwB;AAGhE,MAAM,eAAe;AAAA,EAC1B,SAAS;AACX;AAgCO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,WAAW,YAAY,mBAAmB;AAAA,EACnE,OAAO,UAAU,OAAO;AAAA,IACtB;AAAA,EACF;AAAA,EACA,SAAS,UAAU,OAAO;AAAA,IACxB;AAAA,EACF;AAAA,EACA,gBAAgB,UAAU,OAAO,YAAY,4BAA4B;AAAA,EACzE,aAAa,UAAU,OAAO,YAAY,oCAAoC;AAAA,EAC9E,iBAAiB,UAAU,OAAO,YAAY,qDAAqD;AAAA,EACnG,mBAAmB,UAAU,OAAO;AAAA,IAClC;AAAA,EACF;AAAA,EACA,UAAU,UAAU,KAAK,YAAY,qDAAqD;AAAA,EAC1F,UAAU,UAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,UAAU,UAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,YAAY,UAAU,KAAK,YAAY,qDAAqD;AAAA,EAC5F,WAAW,UAAU,KAAK,YAAY,oDAAoD;AAAA,EAC1F,WAAW,UAAU,KAAK;AAAA,IACxB;AAAA,EACF;AAAA,EACA,eAAe,UAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,SAAS,UAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EACA,WAAW,UAAU,KAAK,YAAY,gCAAgC;AACxE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { styled, xStyledCommonProps } from "@elliemae/ds-system";
|
|
3
|
-
|
|
2
|
+
import { styled, css, xStyledCommonProps } from "@elliemae/ds-system";
|
|
3
|
+
import { DSFormLayoutBlockItemSlots, DSFormLayoutBlockItemName } from "./DSFormLayoutBlockItemDefinitions.js";
|
|
4
|
+
const StyledContainer = styled("div", {
|
|
5
|
+
name: DSFormLayoutBlockItemName,
|
|
6
|
+
slot: DSFormLayoutBlockItemSlots.CONTAINER
|
|
7
|
+
})`
|
|
4
8
|
position: relative;
|
|
5
9
|
padding: 0;
|
|
6
10
|
margin: 0;
|
|
@@ -42,7 +46,10 @@ const StyledContainer = styled("div")`
|
|
|
42
46
|
}
|
|
43
47
|
` : void 0}
|
|
44
48
|
`;
|
|
45
|
-
const StyledLabel = styled
|
|
49
|
+
const StyledLabel = styled("label", {
|
|
50
|
+
name: DSFormLayoutBlockItemName,
|
|
51
|
+
slot: DSFormLayoutBlockItemSlots.LABEL
|
|
52
|
+
})`
|
|
46
53
|
display: flex;
|
|
47
54
|
${({ theme, leftLabel }) => leftLabel ? `padding-right: ${theme.space.xxxs};` : void 0}
|
|
48
55
|
${({ hideLabel }) => hideLabel ? `position: absolute;
|
|
@@ -56,7 +63,7 @@ const StyledLabel = styled.label`
|
|
|
56
63
|
border: 0;
|
|
57
64
|
` : void 0}
|
|
58
65
|
`;
|
|
59
|
-
const
|
|
66
|
+
const messageCss = css`
|
|
60
67
|
font-size: ${({ theme }) => theme.fontSizes.microText[200]};
|
|
61
68
|
text-align: right;
|
|
62
69
|
line-height: 15px;
|
|
@@ -67,7 +74,22 @@ const StyledMessage = styled("div")`
|
|
|
67
74
|
${({ leftLabel, hideLabel }) => leftLabel && !hideLabel ? "grid-column: 1/3;" : void 0}
|
|
68
75
|
font-style: normal;
|
|
69
76
|
`;
|
|
70
|
-
const
|
|
77
|
+
const StyledMessage = styled("div", {
|
|
78
|
+
name: DSFormLayoutBlockItemName,
|
|
79
|
+
slot: DSFormLayoutBlockItemSlots.MESSAGE
|
|
80
|
+
})`
|
|
81
|
+
${messageCss}
|
|
82
|
+
`;
|
|
83
|
+
const StyledErrorMessage = styled("div", {
|
|
84
|
+
name: DSFormLayoutBlockItemName,
|
|
85
|
+
slot: DSFormLayoutBlockItemSlots.ERROR_MESSAGE
|
|
86
|
+
})`
|
|
87
|
+
${messageCss}
|
|
88
|
+
`;
|
|
89
|
+
const StyledMark = styled("span", {
|
|
90
|
+
name: DSFormLayoutBlockItemName,
|
|
91
|
+
slot: DSFormLayoutBlockItemSlots.MARK
|
|
92
|
+
})`
|
|
71
93
|
width: 6px;
|
|
72
94
|
height: 6px;
|
|
73
95
|
border-radius: 50%;
|
|
@@ -87,7 +109,10 @@ const ScreenReaderOnly = styled.div`
|
|
|
87
109
|
white-space: nowrap;
|
|
88
110
|
width: 1px;
|
|
89
111
|
`;
|
|
90
|
-
const StyledCharCount = styled
|
|
112
|
+
const StyledCharCount = styled("span", {
|
|
113
|
+
name: DSFormLayoutBlockItemName,
|
|
114
|
+
slot: DSFormLayoutBlockItemSlots.COUNTER
|
|
115
|
+
})`
|
|
91
116
|
justify-self: flex-end;
|
|
92
117
|
margin-left: 16px;
|
|
93
118
|
color: ${({ theme, hasError }) => hasError ? theme.colors.danger[900] : theme.colors.neutral[500]};
|
|
@@ -96,6 +121,7 @@ export {
|
|
|
96
121
|
ScreenReaderOnly,
|
|
97
122
|
StyledCharCount,
|
|
98
123
|
StyledContainer,
|
|
124
|
+
StyledErrorMessage,
|
|
99
125
|
StyledLabel,
|
|
100
126
|
StyledMark,
|
|
101
127
|
StyledMessage
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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, xStyledCommonProps } from '@elliemae/ds-system';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSFormLayoutBlockItemSlots, DSFormLayoutBlockItemName } from './DSFormLayoutBlockItemDefinitions.js';\ninterface DSFormLayoutBlockItemStyledMessageT {\n hasError?: boolean;\n leftLabel?: boolean;\n hideLabel?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledContainerT {\n leftLabel?: boolean;\n fitContent?: boolean;\n hideLabel?: boolean;\n withHighlight?: boolean;\n isGroup?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledLabelT {\n leftLabel?: boolean;\n hideLabel?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledMarkT {\n required?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledCharCounterT {\n hasError?: boolean;\n}\nexport const StyledContainer = styled('div', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.CONTAINER,\n})<DSFormLayoutBlockItemStyledContainerT>`\n position: relative;\n padding: 0;\n margin: 0;\n display: grid;\n ${xStyledCommonProps}\n ${({ fitContent }) => (fitContent ? 'width: fit-content;' : undefined)}\n ${({ isGroup }) => (isGroup ? 'border: none' : '')};\n ${({ leftLabel, hideLabel }) => (leftLabel && !hideLabel ? 'grid-template-columns: auto 1fr;' : 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`;\nexport const StyledLabel = styled('label', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.LABEL,\n})<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ theme, leftLabel }) => (leftLabel ? `padding-right: ${theme.space.xxxs};` : 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\nconst messageCss = css<DSFormLayoutBlockItemStyledMessageT>`\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n text-align: right;\n line-height: 15px;\n min-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 font-style: normal;\n`;\nexport const StyledMessage = styled('div', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.MESSAGE,\n})<DSFormLayoutBlockItemStyledMessageT>`\n ${messageCss}\n`;\n\nexport const StyledErrorMessage = styled('div', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.ERROR_MESSAGE,\n})<DSFormLayoutBlockItemStyledMessageT>`\n ${messageCss}\n`;\n\nexport const StyledMark = styled('span', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.MARK,\n})<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`;\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`;\nexport const StyledCharCount = styled('span', {\n name: DSFormLayoutBlockItemName,\n slot: DSFormLayoutBlockItemSlots.COUNTER,\n})<DSFormLayoutBlockItemStyledCharCounterT>`\n justify-self: flex-end;\n margin-left: 16px;\n color: ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[500])};\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,KAAK,0BAA0B;AAChD,SAAS,4BAA4B,iCAAiC;AA2B/D,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG;AAAA,IACA,CAAC,EAAE,WAAW,MAAO,aAAa,wBAAwB;AAAA,IAC1D,CAAC,EAAE,QAAQ,MAAO,UAAU,iBAAiB;AAAA,IAC7C,CAAC,EAAE,WAAW,UAAU,MAAO,aAAa,CAAC,YAAY,qCAAqC;AAAA;AAAA,IAE9F,CAAC,EAAE,OAAO,cAAc,MACxB,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;AAED,MAAM,cAAc,OAAO,SAAS;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA;AAAA,IAEG,CAAC,EAAE,OAAO,UAAU,MAAO,YAAY,kBAAkB,MAAM,MAAM,UAAU;AAAA,IAC/E,CAAC,EAAE,UAAU,MACb,YACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA;AAAA;AAGR,MAAM,aAAa;AAAA,eACJ,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,UAAU,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMhD,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,MAAM,OAAO,OAAO,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG;AAAA,IAC/F,CAAC,EAAE,WAAW,UAAU,MAAO,aAAa,CAAC,YAAY,sBAAsB;AAAA;AAAA;AAG5E,MAAM,gBAAgB,OAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,aAAa,OAAO,QAAQ;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA;AAAA;AAAA;AAAA,iBAIgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACxC,CAAC,EAAE,OAAO,SAAS,MACnB,WACI;AAAA,sBACc,MAAM,OAAO,OAAO,GAAG;AAAA,MAErC;AAAA,sBACc,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAGrC,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShC,MAAM,kBAAkB,OAAO,QAAQ;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,2BAA2B;AACnC,CAAC;AAAA;AAAA;AAAA,WAGU,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,MAAM,OAAO,OAAO,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { StyledContainer } from "./styles.js";
|
|
5
|
-
import { propTypes } from "./
|
|
5
|
+
import { propTypes } from "./react-desc-prop-types.js";
|
|
6
6
|
import { useFormLayoutCheckboxGroup } from "./config/useFormLayoutCheckboxGroup.js";
|
|
7
7
|
const DSFormLayoutCheckboxGroup = (props) => {
|
|
8
8
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles.js';\nimport type { DSFormLayoutCheckboxGroupT } from './
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles.js';\nimport type { DSFormLayoutCheckboxGroupT } from './react-desc-prop-types.js';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { useFormLayoutCheckboxGroup } from './config/useFormLayoutCheckboxGroup.js';\n\nconst DSFormLayoutCheckboxGroup = (props: DSFormLayoutCheckboxGroupT.Props): JSX.Element => {\n const {\n globalAttributes: { ...othersGlobalAttributes },\n xstyledProps,\n propsWithDefault,\n } = useFormLayoutCheckboxGroup(props);\n return (\n <StyledContainer role=\"group\" direction={propsWithDefault.direction} {...othersGlobalAttributes} {...xstyledProps}>\n {propsWithDefault.children}\n </StyledContainer>\n );\n};\n\nDSFormLayoutCheckboxGroup.propTypes = propTypes;\nDSFormLayoutCheckboxGroup.displayName = 'DSFormLayoutCheckboxGroup';\nconst DSFormLayoutCheckboxGroupWithSchema = describe(DSFormLayoutCheckboxGroup);\nDSFormLayoutCheckboxGroupWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutCheckboxGroup, DSFormLayoutCheckboxGroupWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACcnB;AAbJ,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAEhC,SAAS,iBAAiB;AAC1B,SAAS,kCAAkC;AAE3C,MAAM,4BAA4B,CAAC,UAAyD;AAC1F,QAAM;AAAA,IACJ,kBAAkB,EAAE,GAAG,uBAAuB;AAAA,IAC9C;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B,KAAK;AACpC,SACE,oBAAC,mBAAgB,MAAK,SAAQ,WAAW,iBAAiB,WAAY,GAAG,wBAAyB,GAAG,cAClG,2BAAiB,UACpB;AAEJ;AAEA,0BAA0B,YAAY;AACtC,0BAA0B,cAAc;AACxC,MAAM,sCAAsC,SAAS,yBAAyB;AAC9E,oCAAoC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useMemoMergePropsWithDefault,
|
|
7
7
|
useValidateTypescriptPropTypes
|
|
8
8
|
} from "@elliemae/ds-props-helpers";
|
|
9
|
-
import { propTypes, defaultProps } from "../
|
|
9
|
+
import { propTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
10
10
|
import { DSFormLayoutCheckboxGroupName } from "../DSFormLayoutCheckboxGroupDefinitions.js";
|
|
11
11
|
const useFormLayoutCheckboxGroup = (props) => {
|
|
12
12
|
useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutCheckboxGroupName);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/form-layout-checkbox-group/config/useFormLayoutCheckboxGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps, type DSFormLayoutCheckboxGroupT } from '../
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps, type DSFormLayoutCheckboxGroupT } from '../react-desc-prop-types.js';\nimport { DSFormLayoutCheckboxGroupName } from '../DSFormLayoutCheckboxGroupDefinitions.js';\n\ninterface UseFormLayoutCheckboxGroupT {\n propsWithDefault: DSFormLayoutCheckboxGroupT.InternalProps;\n globalAttributes: GlobalAttributesT;\n xstyledProps: XstyledProps;\n}\n\nexport const useFormLayoutCheckboxGroup = (props: DSFormLayoutCheckboxGroupT.Props): UseFormLayoutCheckboxGroupT => {\n useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutCheckboxGroupName);\n const propsWithDefault = useMemoMergePropsWithDefault<DSFormLayoutCheckboxGroupT.InternalProps>(props, defaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return React.useMemo(\n () => ({ globalAttributes, xstyledProps, propsWithDefault }),\n [globalAttributes, xstyledProps, propsWithDefault],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAGlB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,oBAAqD;AACzE,SAAS,qCAAqC;AAQvC,MAAM,6BAA6B,CAAC,UAAyE;AAClH,iCAA+B,OAAO,WAAW,6BAA6B;AAC9E,QAAM,mBAAmB,6BAAuE,OAAO,YAAY;AACnH,QAAM,mBAAmB,uBAAuB,gBAAgB;AAEhE,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,SAAOA,OAAM;AAAA,IACX,OAAO,EAAE,kBAAkB,cAAc,iBAAiB;AAAA,IAC1D,CAAC,kBAAkB,cAAc,gBAAgB;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -6,10 +6,11 @@ const defaultProps = {
|
|
|
6
6
|
const propTypes = {
|
|
7
7
|
...globalAttributesPropTypes,
|
|
8
8
|
...xstyledPropTypes,
|
|
9
|
-
direction: PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group.")
|
|
9
|
+
direction: PropTypes.oneOf(["horizontal", "vertical"]).description("Set direction for the checkbox group."),
|
|
10
|
+
children: PropTypes.node.isRequired.description("The content of the component.")
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
13
|
defaultProps,
|
|
13
14
|
propTypes
|
|
14
15
|
};
|
|
15
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/form-layout-checkbox-group/react-desc-prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\ntype DirectionsT = 'horizontal' | 'vertical';\n\nexport declare namespace DSFormLayoutCheckboxGroupT {\n export interface PropsRequired {\n children: JSX.Element;\n }\n\n export interface DefaultProps {\n direction: DirectionsT;\n }\n\n export interface Props extends PropsRequired, DefaultProps {}\n export interface InternalProps extends PropsRequired, Required<DefaultProps> {}\n}\n\nexport const defaultProps: DSFormLayoutCheckboxGroupT.DefaultProps = {\n direction: 'horizontal',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n direction: PropTypes.oneOf(['horizontal', 'vertical']).description('Set direction for the checkbox group.'),\n children: PropTypes.node.isRequired.description('The content of the component.'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAiBhE,MAAM,eAAwD;AAAA,EACnE,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,WAAW,UAAU,MAAM,CAAC,cAAc,UAAU,CAAC,EAAE,YAAY,uCAAuC;AAAA,EAC1G,UAAU,UAAU,KAAK,WAAW,YAAY,+BAA+B;AACjF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { DSFormLayoutBlockItemT } from './
|
|
2
|
+
import type { DSFormLayoutBlockItemT } from './react-desc-prop-types.js';
|
|
3
3
|
declare const DSFormLayoutBlockItem: {
|
|
4
4
|
(props: DSFormLayoutBlockItemT.Props): import("react/jsx-runtime.js").JSX.Element;
|
|
5
5
|
propTypes: React.WeakValidationMap<unknown>;
|
|
@@ -1 +1,10 @@
|
|
|
1
1
|
export declare const DSFormLayoutBlockItemName = "DSFormLayoutBlockItem";
|
|
2
|
+
export declare const DSFormLayoutBlockItemSlots: {
|
|
3
|
+
CONTAINER: string;
|
|
4
|
+
LABEL: string;
|
|
5
|
+
MESSAGE: string;
|
|
6
|
+
ERROR_MESSAGE: string;
|
|
7
|
+
COUNTER: string;
|
|
8
|
+
MARK: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const DSFormLayoutBlockItemDataTestId: Record<string, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
2
|
-
import { type DSFormLayoutBlockItemT } from '../
|
|
2
|
+
import { type DSFormLayoutBlockItemT } from '../react-desc-prop-types.js';
|
|
3
3
|
interface UseFormLayoutBlockItemT {
|
|
4
4
|
propsWithDefault: DSFormLayoutBlockItemT.InternalProps;
|
|
5
5
|
globalAttributes: GlobalAttributesT;
|
|
@@ -23,6 +23,7 @@ interface DSFormLayoutBlockItemStyledCharCounterT {
|
|
|
23
23
|
export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledContainerT & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
24
24
|
export declare const StyledLabel: import("styled-components").StyledComponent<"label", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledLabelT & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
25
25
|
export declare const StyledMessage: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledMessageT & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
26
|
+
export declare const StyledErrorMessage: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledMessageT & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
26
27
|
export declare const StyledMark: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledMarkT & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
27
28
|
export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
28
29
|
export declare const StyledCharCount: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, DSFormLayoutBlockItemStyledCharCounterT & import("@elliemae/ds-system").OwnerInterface, never>;
|