@elliemae/ds-form-layout-blocks 3.54.1 → 3.55.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,7 @@ const DSFormLayoutBlockItem = (props) => {
94
94
  getOwnerPropsArguments,
95
95
  children: [
96
96
  label,
97
- (required || optional) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledMark, { required, children: optional ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { children: "Optional" }) : null })
97
+ (required || optional) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledMark, { required, "aria-hidden": required, children: optional ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { children: "Optional" }) : null })
98
98
  ]
99
99
  }
100
100
  ) : null,
@@ -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}>\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 &nbsp;\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;AA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CACE,wBAAc,iBAAiB,GAAG,iBAAiB,WAAW,0BAA0B,IAC3F;AAAA,aACF,IACE;AAAA,WACN;AAAA,QACC,WACC,4CAAC,kCAAiB,IAAG,UAAU,aAAG,KAAK,KACpC,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;",
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 &nbsp;\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;AAC5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7
  }
@@ -68,7 +68,7 @@ const DSFormLayoutBlockItem = (props) => {
68
68
  getOwnerPropsArguments,
69
69
  children: [
70
70
  label,
71
- (required || optional) && /* @__PURE__ */ jsx(StyledMark, { required, children: optional ? /* @__PURE__ */ jsx(ScreenReaderOnly, { children: "Optional" }) : null })
71
+ (required || optional) && /* @__PURE__ */ jsx(StyledMark, { required, "aria-hidden": required, children: optional ? /* @__PURE__ */ jsx(ScreenReaderOnly, { children: "Optional" }) : null })
72
72
  ]
73
73
  }
74
74
  ) : null,
@@ -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}>\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 &nbsp;\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,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pC,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,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;",
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 &nbsp;\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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out-blocks",
3
- "version": "3.54.1",
3
+ "version": "3.55.0-next.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Form Layout",
6
6
  "files": [
@@ -37,22 +37,22 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "uid": "~2.0.1",
40
- "@elliemae/ds-grid": "3.54.1",
41
- "@elliemae/ds-props-helpers": "3.54.1",
42
- "@elliemae/ds-icons": "3.54.1",
43
- "@elliemae/ds-typescript-helpers": "3.54.1",
44
- "@elliemae/ds-system": "3.54.1"
40
+ "@elliemae/ds-grid": "3.55.0-next.3",
41
+ "@elliemae/ds-props-helpers": "3.55.0-next.3",
42
+ "@elliemae/ds-system": "3.55.0-next.3",
43
+ "@elliemae/ds-icons": "3.55.0-next.3",
44
+ "@elliemae/ds-typescript-helpers": "3.55.0-next.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@elliemae/pui-cli": "9.0.0-next.65",
48
48
  "jest": "~29.7.0",
49
49
  "styled-components": "~5.3.9",
50
- "@elliemae/ds-form-radio": "3.54.1",
51
- "@elliemae/ds-form-checkbox": "3.54.1",
52
- "@elliemae/ds-form-input-text": "3.54.1",
53
- "@elliemae/ds-test-utils": "3.54.1",
54
- "@elliemae/ds-monorepo-devops": "3.54.1",
55
- "@elliemae/ds-form-input-textarea": "3.54.1"
50
+ "@elliemae/ds-form-checkbox": "3.55.0-next.3",
51
+ "@elliemae/ds-form-input-text": "3.55.0-next.3",
52
+ "@elliemae/ds-form-input-textarea": "3.55.0-next.3",
53
+ "@elliemae/ds-form-radio": "3.55.0-next.3",
54
+ "@elliemae/ds-monorepo-devops": "3.55.0-next.3",
55
+ "@elliemae/ds-test-utils": "3.55.0-next.3"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "react": "^18.3.1",