@elliemae/ds-form-layout-blocks 3.57.0-next.5 → 3.57.0-next.51
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 +1 -1
- package/dist/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +2 -2
- package/dist/cjs/form-layout-block-item/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/package.json +4 -1
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js +1 -1
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +2 -2
- package/dist/esm/form-layout-block-item/react-desc-prop-types.js.map +1 -1
- package/dist/esm/package.json +4 -1
- package/dist/types/form-layout-block-item/react-desc-prop-types.d.ts +1 -1
- package/package.json +30 -29
|
@@ -111,7 +111,7 @@ const DSFormLayoutBlockItem = (props) => {
|
|
|
111
111
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { children: currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : "" })
|
|
112
112
|
] }) : null
|
|
113
113
|
] }),
|
|
114
|
-
isGroup && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { as: "legend", children: `${label}. ${hasError && validationMessage || !hasError && feedbackMessage || ""}` }),
|
|
114
|
+
isGroup && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { as: "legend", id: `${instanceUID}_legend`, children: `${label}. ${hasError && validationMessage || !hasError && feedbackMessage || ""}` }),
|
|
115
115
|
children,
|
|
116
116
|
feedbackMessage && !hasError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
117
|
import_styles.StyledMessage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/form-layout-block-item/DSFormLayoutBlockItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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 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 className={className}\n {...xstyledProps}\n {...othersGlobalAttributes}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={cols} gutter=\"xxs\" aria-live=\"polite\" id={`${instanceUID}_remaining_characters`}>\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) && (\n <StyledMark required={required} aria-hidden={required}>\n {optional ? <ScreenReaderOnly>Optional</ScreenReaderOnly> : null}\n </StyledMark>\n )}\n </StyledLabel>\n ) : null}\n\n {maxCharCounter !== undefined && currentChar !== undefined ? (\n <>\n <StyledCharCount\n hasError={currentChar > maxCharCounter}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {`${currentChar}/${maxCharCounter}`}\n </StyledCharCount>\n <ScreenReaderOnly>\n {currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : ''}\n </ScreenReaderOnly>\n </>\n ) : null}\n </Grid>\n {isGroup && (\n <ScreenReaderOnly as=\"legend\">{`${label}. ${\n (hasError && validationMessage) || (!hasError && feedbackMessage) || ''\n }`}</ScreenReaderOnly>\n )}\n {children}\n {feedbackMessage && !hasError ? (\n <StyledMessage\n aria-live=\"polite\"\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`} />\n )}\n {validationMessage && hasError ? (\n <StyledErrorMessage\n hasError={hasError}\n leftLabel={leftLabel}\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`} />\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.displayName = 'DSFormLayoutBlockItem';\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;AAAA;ACAA,YAAuB;AD8Db;AA7DV,mBAA4C;AAC5C,qBAAqB;AACrB,8BAAyB;AACzB,iBAAoB;AACpB,sBAAgC;AAEhC,mCAA0B;AAC1B,oBAQO;AACP,oCAAuC;AAEvC,MAAM,wBAAwB,CAAC,UAAwC;AACrE,QAAM,EAAE,kBAAkB,cAAc,iBAAiB,QAAI,sDAAuB,KAAK;AACzF,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;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,WAAW,OAAO,aAAa,GAAG,uBAAuB,IAAI;AACrE,QAAM,kBAAc,sBAAQ,MAAM,WAAW,8BAA0B,gBAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;AAE1F,QAAM,WAAO,sBAAQ,MAAO,mBAAmB,SAAY,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,GAAI,CAAC,cAAc,CAAC;AAEvG,QAAM,oBAAgB,0BAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,6BAAyB,0BAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AACzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,IAAI,UAAU,aAAa;AAAA,MAC3B;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,qDAAC,uBAAK,MAAY,QAAO,OAAM,aAAU,UAAS,IAAI,GAAG,WAAW,yBACjE;AAAA,kBACC;AAAA,YAAC;AAAA;AAAA,cACC,IAAI,GAAG,WAAW;AAAA,cAClB,SAAS;AAAA,cACT;AAAA,cACA;AAAA,cACA,eAAa;AAAA,cACb;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,iBACC,YAAY,aACZ,4CAAC,4BAAW,UAAoB,eAAa,UAC1C,qBAAW,4CAAC,kCAAiB,sBAAQ,IAAsB,MAC9D;AAAA;AAAA;AAAA,UAEJ,IACE;AAAA,UAEH,mBAAmB,UAAa,gBAAgB,SAC/C,4EACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU,cAAc;AAAA,gBACxB;AAAA,gBACA;AAAA,gBAEC,aAAG,WAAW,IAAI,cAAc;AAAA;AAAA,YACnC;AAAA,YACA,4CAAC,kCACE,wBAAc,iBAAiB,GAAG,iBAAiB,WAAW,0BAA0B,IAC3F;AAAA,aACF,IACE;AAAA,WACN;AAAA,QACC,WACC,4CAAC,kCAAiB,IAAG,
|
|
4
|
+
"sourcesContent": ["/* 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 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 className={className}\n {...xstyledProps}\n {...othersGlobalAttributes}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={cols} gutter=\"xxs\" aria-live=\"polite\" id={`${instanceUID}_remaining_characters`}>\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) && (\n <StyledMark required={required} aria-hidden={required}>\n {optional ? <ScreenReaderOnly>Optional</ScreenReaderOnly> : null}\n </StyledMark>\n )}\n </StyledLabel>\n ) : null}\n\n {maxCharCounter !== undefined && currentChar !== undefined ? (\n <>\n <StyledCharCount\n hasError={currentChar > maxCharCounter}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {`${currentChar}/${maxCharCounter}`}\n </StyledCharCount>\n <ScreenReaderOnly>\n {currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : ''}\n </ScreenReaderOnly>\n </>\n ) : null}\n </Grid>\n {isGroup && (\n <ScreenReaderOnly as=\"legend\" id={`${instanceUID}_legend`}>{`${label}. ${\n (hasError && validationMessage) || (!hasError && feedbackMessage) || ''\n }`}</ScreenReaderOnly>\n )}\n {children}\n {feedbackMessage && !hasError ? (\n <StyledMessage\n aria-live=\"polite\"\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`} />\n )}\n {validationMessage && hasError ? (\n <StyledErrorMessage\n hasError={hasError}\n leftLabel={leftLabel}\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`} />\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.displayName = 'DSFormLayoutBlockItem';\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;AAAA;ACAA,YAAuB;AD8Db;AA7DV,mBAA4C;AAC5C,qBAAqB;AACrB,8BAAyB;AACzB,iBAAoB;AACpB,sBAAgC;AAEhC,mCAA0B;AAC1B,oBAQO;AACP,oCAAuC;AAEvC,MAAM,wBAAwB,CAAC,UAAwC;AACrE,QAAM,EAAE,kBAA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", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots } from './DSFormLayoutBlockItemDefinitions.js';\nexport const defaultProps = {\n isGroup: false,\n};\n\nexport declare namespace DSFormLayoutBlockItemT {\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFormLayoutBlockItemName,\n typeof DSFormLayoutBlockItemSlots\n > {\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 RequiredProps {\n children: React.ReactNode;\n
|
|
4
|
+
"sourcesContent": ["import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots } from './DSFormLayoutBlockItemDefinitions.js';\nexport const defaultProps = {\n isGroup: false,\n};\n\nexport declare namespace DSFormLayoutBlockItemT {\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFormLayoutBlockItemName,\n typeof DSFormLayoutBlockItemSlots\n > {\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 label?: string; // this has been made optional when we created DSFormLayoutLabel component with atomic composition approach\n }\n\n export interface DefaultProps {\n isGroup: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n RequiredProps,\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps | keyof RequiredProps | keyof DefaultProps>,\n XstyledProps {}\n export interface InternalProps\n extends OptionalProps,\n RequiredProps,\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps | keyof RequiredProps | keyof DefaultProps>,\n XstyledProps {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...getPropsPerSlotPropTypes(DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots),\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 ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAEP,8CAAsE;AAC/D,MAAM,eAAe;AAAA,EAC1B,SAAS;AACX;AA8CO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAG,kDAAyB,mEAA2B,kEAA0B;AAAA,EACjF,UAAU,kCAAU,KAAK,WAAW,YAAY,mBAAmB;AAAA,EACnE,OAAO,kCAAU,OAAO;AAAA,IACtB;AAAA,EACF;AAAA,EACA,SAAS,kCAAU,OAAO;AAAA,IACxB;AAAA,EACF;AAAA,EACA,gBAAgB,kCAAU,OAAO,YAAY,4BAA4B;AAAA,EACzE,aAAa,kCAAU,OAAO,YAAY,oCAAoC;AAAA,EAC9E,iBAAiB,kCAAU,OAAO,YAAY,qDAAqD;AAAA,EACnG,mBAAmB,kCAAU,OAAO;AAAA,IAClC;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,KAAK,YAAY,qDAAqD;AAAA,EAC1F,UAAU,kCAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,UAAU,kCAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,YAAY,kCAAU,KAAK,YAAY,qDAAqD;AAAA,EAC5F,WAAW,kCAAU,KAAK,YAAY,oDAAoD;AAAA,EAC1F,WAAW,kCAAU,KAAK;AAAA,IACxB;AAAA,EACF;AAAA,EACA,eAAe,kCAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,SAAS,kCAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EACA,WAAW,kCAAU,KAAK,YAAY,gCAAgC;AACxE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/package.json
CHANGED
|
@@ -85,7 +85,7 @@ const DSFormLayoutBlockItem = (props) => {
|
|
|
85
85
|
/* @__PURE__ */ jsx(ScreenReaderOnly, { children: currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : "" })
|
|
86
86
|
] }) : null
|
|
87
87
|
] }),
|
|
88
|
-
isGroup && /* @__PURE__ */ jsx(ScreenReaderOnly, { as: "legend", children: `${label}. ${hasError && validationMessage || !hasError && feedbackMessage || ""}` }),
|
|
88
|
+
isGroup && /* @__PURE__ */ jsx(ScreenReaderOnly, { as: "legend", id: `${instanceUID}_legend`, children: `${label}. ${hasError && validationMessage || !hasError && feedbackMessage || ""}` }),
|
|
89
89
|
children,
|
|
90
90
|
feedbackMessage && !hasError ? /* @__PURE__ */ jsx(
|
|
91
91
|
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/DSFormLayoutBlockItem.tsx"],
|
|
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 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 className={className}\n {...xstyledProps}\n {...othersGlobalAttributes}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={cols} gutter=\"xxs\" aria-live=\"polite\" id={`${instanceUID}_remaining_characters`}>\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) && (\n <StyledMark required={required} aria-hidden={required}>\n {optional ? <ScreenReaderOnly>Optional</ScreenReaderOnly> : null}\n </StyledMark>\n )}\n </StyledLabel>\n ) : null}\n\n {maxCharCounter !== undefined && currentChar !== undefined ? (\n <>\n <StyledCharCount\n hasError={currentChar > maxCharCounter}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {`${currentChar}/${maxCharCounter}`}\n </StyledCharCount>\n <ScreenReaderOnly>\n {currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : ''}\n </ScreenReaderOnly>\n </>\n ) : null}\n </Grid>\n {isGroup && (\n <ScreenReaderOnly as=\"legend\">{`${label}. ${\n (hasError && validationMessage) || (!hasError && feedbackMessage) || ''\n }`}</ScreenReaderOnly>\n )}\n {children}\n {feedbackMessage && !hasError ? (\n <StyledMessage\n aria-live=\"polite\"\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`} />\n )}\n {validationMessage && hasError ? (\n <StyledErrorMessage\n hasError={hasError}\n leftLabel={leftLabel}\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`} />\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.displayName = 'DSFormLayoutBlockItem';\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC8Db,SAmBA,UAPkB,KAZlB;AA7DV,SAAgB,SAAS,mBAAmB;AAC5C,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAEhC,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;AAEvC,MAAM,wBAAwB,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SAC/C,iCACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU,cAAc;AAAA,gBACxB;AAAA,gBACA;AAAA,gBAEC,aAAG,WAAW,IAAI,cAAc;AAAA;AAAA,YACnC;AAAA,YACA,oBAAC,oBACE,wBAAc,iBAAiB,GAAG,iBAAiB,WAAW,0BAA0B,IAC3F;AAAA,aACF,IACE;AAAA,WACN;AAAA,QACC,WACC,oBAAC,oBAAiB,IAAG,
|
|
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 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 className={className}\n {...xstyledProps}\n {...othersGlobalAttributes}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={cols} gutter=\"xxs\" aria-live=\"polite\" id={`${instanceUID}_remaining_characters`}>\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) && (\n <StyledMark required={required} aria-hidden={required}>\n {optional ? <ScreenReaderOnly>Optional</ScreenReaderOnly> : null}\n </StyledMark>\n )}\n </StyledLabel>\n ) : null}\n\n {maxCharCounter !== undefined && currentChar !== undefined ? (\n <>\n <StyledCharCount\n hasError={currentChar > maxCharCounter}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {`${currentChar}/${maxCharCounter}`}\n </StyledCharCount>\n <ScreenReaderOnly>\n {currentChar < maxCharCounter ? `${maxCharCounter - currentChar} characters remaining` : ''}\n </ScreenReaderOnly>\n </>\n ) : null}\n </Grid>\n {isGroup && (\n <ScreenReaderOnly as=\"legend\" id={`${instanceUID}_legend`}>{`${label}. ${\n (hasError && validationMessage) || (!hasError && feedbackMessage) || ''\n }`}</ScreenReaderOnly>\n )}\n {children}\n {feedbackMessage && !hasError ? (\n <StyledMessage\n aria-live=\"polite\"\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`} />\n )}\n {validationMessage && hasError ? (\n <StyledErrorMessage\n hasError={hasError}\n leftLabel={leftLabel}\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`} />\n )}\n </StyledContainer>\n );\n};\n\nDSFormLayoutBlockItem.displayName = 'DSFormLayoutBlockItem';\nconst DSFormLayoutBlockItemWithSchema = describe(DSFormLayoutBlockItem);\nDSFormLayoutBlockItemWithSchema.propTypes = propTypes;\n\nexport { DSFormLayoutBlockItem, DSFormLayoutBlockItemWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8Db,SAmBA,UAPkB,KAZlB;AA7DV,SAAgB,SAAS,mBAAmB;AAC5C,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAEhC,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;AAEvC,MAAM,wBAAwB,CAAC,UAAwC;AACrE,QAAM,EAAE,kBAAkB,cAAc,iBAAiB,IAAI,uBAAuB,KAAK;AACzF,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;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,WAAW,OAAO,aAAa,GAAG,uBAAuB,IAAI;AACrE,QAAM,cAAc,QAAQ,MAAM,WAAW,0BAA0B,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;AAE1F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B;AAAA,UAAC;AAAA;AAAA,YACC,aAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA,eAAa;AAAA,YACb,IAAI,GAAG,WAAW;AAAA,YAClB;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH,IAEA,oBAAC,oBAAiB,IAAI,GAAG,WAAW,qBAAqB;AAAA,QAE1D,qBAAqB,WACpB;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA,MAAK;AAAA,YACL,IAAI,GAAG,WAAW;AAAA,YAClB;AAAA,YACA;AAAA,YAEA;AAAA,kCAAC,mBAAgB,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,UAAU,KAAK,GAAG,OAAO,EAAE,cAAc,MAAM,GAAG;AAAA,cAAE;AAAA,cAEjG,GAAG,iBAAiB;AAAA;AAAA;AAAA,QACvB,IAEA,oBAAC,oBAAiB,IAAI,GAAG,WAAW,kBAAkB;AAAA;AAAA;AAAA,EAE1D;AAEJ;AAEA,sBAAsB,cAAc;AACpC,MAAM,kCAAkC,SAAS,qBAAqB;AACtE,gCAAgC,YAAY;",
|
|
6
6
|
"names": []
|
|
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/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots } from './DSFormLayoutBlockItemDefinitions.js';\nexport const defaultProps = {\n isGroup: false,\n};\n\nexport declare namespace DSFormLayoutBlockItemT {\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFormLayoutBlockItemName,\n typeof DSFormLayoutBlockItemSlots\n > {\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 RequiredProps {\n children: React.ReactNode;\n
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots } from './DSFormLayoutBlockItemDefinitions.js';\nexport const defaultProps = {\n isGroup: false,\n};\n\nexport declare namespace DSFormLayoutBlockItemT {\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFormLayoutBlockItemName,\n typeof DSFormLayoutBlockItemSlots\n > {\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 label?: string; // this has been made optional when we created DSFormLayoutLabel component with atomic composition approach\n }\n\n export interface DefaultProps {\n isGroup: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n RequiredProps,\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps | keyof RequiredProps | keyof DefaultProps>,\n XstyledProps {}\n export interface InternalProps\n extends OptionalProps,\n RequiredProps,\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps | keyof RequiredProps | keyof DefaultProps>,\n XstyledProps {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...getPropsPerSlotPropTypes(DSFormLayoutBlockItemName, DSFormLayoutBlockItemSlots),\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 ValidationMap<unknown>;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,2BAA2B,kCAAkC;AAC/D,MAAM,eAAe;AAAA,EAC1B,SAAS;AACX;AA8CO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG,yBAAyB,2BAA2B,0BAA0B;AAAA,EACjF,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": []
|
|
7
7
|
}
|
package/dist/esm/package.json
CHANGED
|
@@ -19,13 +19,13 @@ export declare namespace DSFormLayoutBlockItemT {
|
|
|
19
19
|
optional?: boolean;
|
|
20
20
|
hideLabel?: boolean;
|
|
21
21
|
withHighlight?: boolean;
|
|
22
|
+
label?: string;
|
|
22
23
|
}
|
|
23
24
|
interface DefaultProps {
|
|
24
25
|
isGroup: boolean;
|
|
25
26
|
}
|
|
26
27
|
interface RequiredProps {
|
|
27
28
|
children: React.ReactNode;
|
|
28
|
-
label: string;
|
|
29
29
|
}
|
|
30
30
|
interface Props extends OptionalProps, RequiredProps, Partial<DefaultProps>, Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps | keyof RequiredProps | keyof DefaultProps>, XstyledProps {
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-layout-blocks",
|
|
3
|
-
"version": "3.57.0-next.
|
|
3
|
+
"version": "3.57.0-next.51",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form Layout",
|
|
6
6
|
"files": [
|
|
@@ -35,41 +35,42 @@
|
|
|
35
35
|
"reportFile": "tests.xml",
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
40
|
+
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
41
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
42
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
43
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
44
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
45
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
46
|
+
},
|
|
38
47
|
"dependencies": {
|
|
39
|
-
"
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-props-helpers": "3.57.0-next.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"
|
|
48
|
+
"@elliemae/ds-grid": "3.57.0-next.51",
|
|
49
|
+
"@elliemae/ds-icons": "3.57.0-next.51",
|
|
50
|
+
"@elliemae/ds-props-helpers": "3.57.0-next.51",
|
|
51
|
+
"@elliemae/ds-system": "3.57.0-next.51",
|
|
52
|
+
"@elliemae/ds-typescript-helpers": "3.57.0-next.51",
|
|
53
|
+
"uid": "catalog:"
|
|
45
54
|
},
|
|
46
55
|
"devDependencies": {
|
|
47
|
-
"@elliemae/
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"@elliemae/ds-form-
|
|
51
|
-
"@elliemae/ds-
|
|
52
|
-
"@elliemae/ds-
|
|
53
|
-
"@elliemae/
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
+
"@elliemae/ds-form-checkbox": "3.57.0-next.51",
|
|
57
|
+
"@elliemae/ds-form-input-text": "3.57.0-next.51",
|
|
58
|
+
"@elliemae/ds-form-input-textarea": "3.57.0-next.51",
|
|
59
|
+
"@elliemae/ds-form-radio": "3.57.0-next.51",
|
|
60
|
+
"@elliemae/ds-monorepo-devops": "3.57.0-next.51",
|
|
61
|
+
"@elliemae/ds-test-utils": "3.57.0-next.51",
|
|
62
|
+
"@elliemae/pui-cli": "catalog:",
|
|
63
|
+
"jest": "catalog:",
|
|
64
|
+
"styled-components": "catalog:"
|
|
56
65
|
},
|
|
57
66
|
"peerDependencies": {
|
|
58
|
-
"react": "
|
|
59
|
-
"react-dom": "
|
|
60
|
-
"styled-components": "
|
|
67
|
+
"react": "catalog:",
|
|
68
|
+
"react-dom": "catalog:",
|
|
69
|
+
"styled-components": "catalog:"
|
|
61
70
|
},
|
|
62
71
|
"publishConfig": {
|
|
63
72
|
"access": "public",
|
|
64
73
|
"typeSafety": true
|
|
65
74
|
},
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
69
|
-
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
70
|
-
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
71
|
-
"dts": "node ../../../scripts/dts.mjs",
|
|
72
|
-
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
73
|
-
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
74
|
-
}
|
|
75
|
-
}
|
|
75
|
+
"gitHead": "fcac2232f8f5629d3bdd93bd5f09f42ea5c6a72b"
|
|
76
|
+
}
|