@elliemae/ds-form-layout-blocks 3.57.0-next.40 → 3.57.0-next.41
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/esm/form-layout-block-item/DSFormLayoutBlockItem.js +1 -1
- package/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +2 -2
- package/package.json +13 -13
|
@@ -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", "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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,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,IAC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A0B,IAC3F;AAAA,aACF,IACE;AAAA,WACN;AAAA,QACC,WACC,4CAAC,kCAAiB,IAAG,UAAS,IAAI,GAAG,WAAW,WAAY,aAAG,KAAK,KACjE,YAAY,qBAAuB,CAAC,YAAY,mBAAoB,EACvE,IAAG;AAAA,QAEJ;AAAA,QACA,mBAAmB,CAAC,WACnB;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,4CAAC,kCAAiB,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,0DAAC,mCAAgB,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,4CAAC,kCAAiB,IAAI,GAAG,WAAW,kBAAkB;AAAA;AAAA;AAAA,EAE1D;AAEJ;AAEA,sBAAsB,cAAc;AACpC,MAAM,sCAAkC,kCAAS,qBAAqB;AACtE,gCAAgC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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,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,QAAM,OAAO,QAAQ,MAAO,mBAAmB,SAAY,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,GAAI,CAAC,cAAc,CAAC;AAEvG,QAAM,gBAAgB,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,yBAAyB,YAAY,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,6BAAC,QAAK,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,oBAAC,cAAW,UAAoB,eAAa,UAC1C,qBAAW,oBAAC,oBAAiB,sBAAQ,IAAsB,MAC9D;AAAA;AAAA;AAAA,UAEJ,IACE;AAAA,UAEH,mBAAmB,UAAa,gBAAgB,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,QAAM,OAAO,QAAQ,MAAO,mBAAmB,SAAY,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,GAAI,CAAC,cAAc,CAAC;AAEvG,QAAM,gBAAgB,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,yBAAyB,YAAY,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;AAA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A,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
|
}
|
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.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form Layout",
|
|
6
6
|
"files": [
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@elliemae/ds-grid": "3.57.0-next.
|
|
49
|
-
"@elliemae/ds-icons": "3.57.0-next.
|
|
50
|
-
"@elliemae/ds-props-helpers": "3.57.0-next.
|
|
51
|
-
"@elliemae/ds-system": "3.57.0-next.
|
|
52
|
-
"@elliemae/ds-typescript-helpers": "3.57.0-next.
|
|
48
|
+
"@elliemae/ds-grid": "3.57.0-next.41",
|
|
49
|
+
"@elliemae/ds-icons": "3.57.0-next.41",
|
|
50
|
+
"@elliemae/ds-props-helpers": "3.57.0-next.41",
|
|
51
|
+
"@elliemae/ds-system": "3.57.0-next.41",
|
|
52
|
+
"@elliemae/ds-typescript-helpers": "3.57.0-next.41",
|
|
53
53
|
"uid": "catalog:"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@elliemae/ds-form-checkbox": "3.57.0-next.
|
|
57
|
-
"@elliemae/ds-form-input-text": "3.57.0-next.
|
|
58
|
-
"@elliemae/ds-form-input-textarea": "3.57.0-next.
|
|
59
|
-
"@elliemae/ds-form-radio": "3.57.0-next.
|
|
60
|
-
"@elliemae/ds-monorepo-devops": "3.57.0-next.
|
|
61
|
-
"@elliemae/ds-test-utils": "3.57.0-next.
|
|
56
|
+
"@elliemae/ds-form-checkbox": "3.57.0-next.41",
|
|
57
|
+
"@elliemae/ds-form-input-text": "3.57.0-next.41",
|
|
58
|
+
"@elliemae/ds-form-input-textarea": "3.57.0-next.41",
|
|
59
|
+
"@elliemae/ds-form-radio": "3.57.0-next.41",
|
|
60
|
+
"@elliemae/ds-monorepo-devops": "3.57.0-next.41",
|
|
61
|
+
"@elliemae/ds-test-utils": "3.57.0-next.41",
|
|
62
62
|
"@elliemae/pui-cli": "catalog:",
|
|
63
63
|
"jest": "catalog:",
|
|
64
64
|
"styled-components": "catalog:"
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"access": "public",
|
|
73
73
|
"typeSafety": true
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "18ae25814ee005325f5acce1789ac2d97a919b20"
|
|
76
76
|
}
|