@pega/cosmos-react-core 10.0.0-build.10.0 → 10.0.0-build.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/lib/components/Checkbox/Checkbox.d.ts +1 -1
  2. package/lib/components/Checkbox/Checkbox.test-ids.d.ts +1 -1
  3. package/lib/components/Checkbox/Checkbox.test-ids.d.ts.map +1 -1
  4. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  5. package/lib/components/ColorPicker/ColorPicker.d.ts +1 -1
  6. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
  7. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
  8. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  9. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts +1 -1
  10. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
  11. package/lib/components/CompositeInput/CompositeInput.d.ts +1 -1
  12. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
  13. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
  14. package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
  15. package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
  16. package/lib/components/Currency/CurrencyInput.d.ts +1 -1
  17. package/lib/components/Currency/CurrencyInput.styles.d.ts +1 -1
  18. package/lib/components/DateTime/DateTime.test-ids.d.ts +10 -10
  19. package/lib/components/DateTime/DateTime.test-ids.d.ts.map +1 -1
  20. package/lib/components/DateTime/Input/DateInput.d.ts +1 -1
  21. package/lib/components/DateTime/Input/DateRangeInput.d.ts +1 -1
  22. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
  23. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
  24. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +1 -1
  25. package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
  26. package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
  27. package/lib/components/DateTime/Input/TimeInput.d.ts +1 -1
  28. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -1
  29. package/lib/components/DateTime/Input/WeekInput.d.ts +1 -1
  30. package/lib/components/File/File.test-ids.d.ts +1 -1
  31. package/lib/components/File/File.test-ids.d.ts.map +1 -1
  32. package/lib/components/File/FileInput.d.ts +1 -1
  33. package/lib/components/File/FileInput.styles.d.ts +1 -1
  34. package/lib/components/FormField/FormField.d.ts +9 -2
  35. package/lib/components/FormField/FormField.d.ts.map +1 -1
  36. package/lib/components/FormField/FormField.js +73 -3
  37. package/lib/components/FormField/FormField.js.map +1 -1
  38. package/lib/components/FormField/FormField.test-ids.d.ts +2 -2
  39. package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
  40. package/lib/components/FormField/FormField.test-ids.js +1 -0
  41. package/lib/components/FormField/FormField.test-ids.js.map +1 -1
  42. package/lib/components/FormField/index.d.ts +1 -1
  43. package/lib/components/FormField/index.d.ts.map +1 -1
  44. package/lib/components/FormField/index.js.map +1 -1
  45. package/lib/components/Input/Input.d.ts +5 -4
  46. package/lib/components/Input/Input.d.ts.map +1 -1
  47. package/lib/components/Input/Input.js +1 -0
  48. package/lib/components/Input/Input.js.map +1 -1
  49. package/lib/components/Input/Input.test-ids.d.ts +1 -1
  50. package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
  51. package/lib/components/Location/Location.test-ids.d.ts +1 -1
  52. package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
  53. package/lib/components/Location/LocationInput.d.ts +1 -1
  54. package/lib/components/MultiStepForm/FormProgress.styles.js +5 -5
  55. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  56. package/lib/components/Number/Number.test-ids.d.ts +2 -2
  57. package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
  58. package/lib/components/Number/NumberInput.d.ts +1 -1
  59. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  60. package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
  61. package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
  62. package/lib/components/Phone/PhoneInput.d.ts +1 -1
  63. package/lib/components/RadioButton/RadioButton.d.ts +1 -1
  64. package/lib/components/RadioButton/RadioButton.test-ids.d.ts +1 -1
  65. package/lib/components/RadioButton/RadioButton.test-ids.d.ts.map +1 -1
  66. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +2 -2
  67. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -1
  68. package/lib/components/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  69. package/lib/components/RadioCheck/RadioCheck.d.ts +1 -1
  70. package/lib/components/RadioCheck/RadioCheck.test-ids.d.ts +1 -1
  71. package/lib/components/RadioCheck/RadioCheck.test-ids.d.ts.map +1 -1
  72. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +7 -1
  73. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  74. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +25 -14
  75. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  76. package/lib/components/RadioCheckGroup/RadioCheckGroup.test-ids.d.ts +1 -1
  77. package/lib/components/RadioCheckGroup/RadioCheckGroup.test-ids.d.ts.map +1 -1
  78. package/lib/components/SearchInput/SearchInput.styles.d.ts +1 -1
  79. package/lib/components/Select/Select.d.ts +1 -1
  80. package/lib/components/Select/Select.test-ids.d.ts +1 -1
  81. package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
  82. package/lib/components/Slider/Slider.d.ts +1 -1
  83. package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
  84. package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
  85. package/lib/components/TextArea/TextArea.d.ts +1 -1
  86. package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
  87. package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
  88. package/lib/hooks/useI18n.d.ts +2 -0
  89. package/lib/hooks/useI18n.d.ts.map +1 -1
  90. package/lib/i18n/default.d.ts +2 -0
  91. package/lib/i18n/default.d.ts.map +1 -1
  92. package/lib/i18n/default.js +2 -0
  93. package/lib/i18n/default.js.map +1 -1
  94. package/lib/i18n/i18n.d.ts +2 -0
  95. package/lib/i18n/i18n.d.ts.map +1 -1
  96. package/lib/styles/utils.d.ts +2 -0
  97. package/lib/styles/utils.d.ts.map +1 -1
  98. package/lib/styles/utils.js +7 -0
  99. package/lib/styles/utils.js.map +1 -1
  100. package/lib/theme/themes/aurigaDarkTheme.json +1 -1
  101. package/lib/theme/themes/aurigaTheme.json +3 -3
  102. package/lib/theme/themes/velaDarkTheme.json +1 -1
  103. package/lib/theme/themes/velaTheme.json +2 -2
  104. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUxF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAS/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,kBAAkB,MAAM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,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,sBACvC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,qBAC7D,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACjD,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,aAE9D,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,QAAQ,EACvC,CAAC,QAAQ,IAAI,SAAS,IAAI,WAAW,EACrC,OAAO,EACP,CAAC,UAAU,IAAI,UAAU,IAAI,QAAQ,EACrC,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,WAAW,EACtC,YAAY,IAAI,OAAO,IAAI,CAC1B,KAAC,iBAAiB,IAChB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,EAAE,CAAC;gBACZ,CAAC,YAEA,CAAC,CAAC,iBAAiB,CAAC,GACH,CACrB,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { cloneElement, useEffect, forwardRef, useState, useRef, Children } from 'react';\nimport type {\n FC,\n MouseEvent,\n ReactNode,\n ComponentType,\n ReactElement,\n PropsWithoutRef,\n Ref\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport AIButton from '../AIButton';\nimport { defaultThemeProp } from '../../theme';\nimport type {\n Action,\n ExcludeStrict,\n ForwardProps,\n HeadingTag,\n OmitStrict,\n TestIdProp\n} from '../../types';\nimport Flex, { StyledFlex } from '../Flex';\nimport type { FlexProps } from '../Flex';\nimport Actions from '../Actions';\nimport type { FormControlProps } from '../FormControl';\nimport { useConsolidatedRef, useI18n, useLiveLog, useTestIds, useTheme, useUID } from '../../hooks';\nimport Label, { StyledLabel } from '../Label';\nimport type { LabelProps } from '../Label';\nimport { calculateFontSize, getReadableStatusColor } from '../../styles';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { getFocusables, withTestIds, createClassName } from '../../utils';\nimport Button from '../Button';\nimport Text, { StyledText } from '../Text';\nimport Icon, { registerIcon } from '../Icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport * as diamondMinusIcon from '../Icon/icons/diamond-minus.icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport * as polarisSolidIcon from '../Icon/icons/polaris-solid.icon';\nimport AdditionalInfo, { StyledAdditionalInfo } from '../AdditionalInfo';\nimport { StyledRadioCheck, StyledRadioCheckInput } from '../RadioCheck/RadioCheck';\n\nimport { getFormFieldTestIds } from './FormField.test-ids';\nimport type { elements } from './FormField.test-ids';\n\nregisterIcon(warnSolidIcon, diamondMinusIcon, checkIcon, polarisSolidIcon);\n\nexport interface FormFieldProps\n extends OmitStrict<FormControlProps, 'placeholder' | 'value' | 'defaultValue'>,\n TestIdProp<typeof elements> {\n /** Pass a single form control component i.e. Input | TextArea | Select | etc.. */\n children: ReactElement | ReactElement[];\n /**\n * An id is required to connect a FormField's wrapping element, control element and info(aria-describedby) live region.\n * A random id will be generated if none is provided.\n * Since MOST FormControls should possess an id(excl. i.e RadioCheckGroup and others) this can be used.\n * The id prop will be used to generate the following:\n * - FormControl <-> Label association via a Label's htmlFor prop.\n * - FormField's wrapping element id {id}-field.\n * - FormField info element id ${id}-info.\n */\n id?: string;\n /**\n * Determines how the wrapping label should be rendered.\n * @default 'label'\n */\n labelAs?: LabelProps['as'];\n /**\n * Overrides the for attribute on the label. If this is not set it will default to the forms id.\n * @default undefined\n */\n labelFor?: LabelProps['htmlFor'];\n /**\n * Sets the id of the label.\n * @default undefined\n */\n labelId?: LabelProps['id'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: boolean;\n /**\n * Visually places the label after the input.\n * @default false\n */\n labelAfter?: boolean;\n /**\n * Sets the visual variant/styling of the label.\n * @default 'default'\n */\n labelVariant?: 'default' | HeadingTag;\n /**\n * Property used to check whether input type is radio to handle styling for RadioCheck\n * @default false\n */\n isRadioCheck?: boolean;\n /**\n * Wrapping HTML element tag. Renders as a fieldset for grouped elements i.e. RadioButtons/CheckboxGroup\n * @default 'div'\n */\n as?: 'div' | 'fieldset' | ComponentType<any>;\n /**\n * Layout field elements inline in a row.\n * @default false\n */\n inline?: boolean;\n /** Optionally utilized by Input or Select. */\n actions?: Action[];\n /** Enables Flex container prop pass through. */\n container?: ExcludeStrict<FlexProps['container'], true>;\n /** Character remaining count. Typically used on Textareas only */\n charLimitDisplay?: ReactNode;\n /** Id of additional describing element. */\n 'aria-describedby'?: string;\n /** Callback invoked when the clear button is clicked. If provided will render the clear button. */\n onClear?: () => void;\n /** Suppresses announcements for status changes. */\n suppressAnnouncements?: boolean;\n}\n\nconst StyledStatusIcon = styled(Icon)<{ status: NonNullable<FormFieldProps['status']> }>(({\n theme,\n status\n}) => {\n return css`\n height: 1em;\n width: 1em;\n color: ${getReadableStatusColor(theme, status)};\n vertical-align: baseline;\n `;\n});\n\nStyledStatusIcon.defaultProps = defaultThemeProp;\n\nconst StyledClearButton = styled(Button)(({ theme }) => {\n return css`\n margin-block-start: calc(${theme.base.spacing} / 2);\n align-self: start;\n `;\n});\n\nStyledClearButton.defaultProps = defaultThemeProp;\n\nexport const StyledFormFieldInfo = styled.div<\n Pick<FormControlProps, 'status'> & { infoAbove?: boolean }\n>(({ status, infoAbove, theme }) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing },\n components: { 'form-field': formField }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n const infoFontSize = fontSizes.xxs;\n\n return css`\n font-size: ${infoFontSize};\n word-break: break-word;\n\n &:not(:empty) {\n ${infoAbove\n ? css`\n margin-block-end: calc(0.25 * ${spacing});\n `\n : css`\n margin-block-start: calc(0.25 * ${spacing});\n `}\n }\n\n ${status &&\n formField[status] &&\n css`\n color: ${getReadableStatusColor(theme, status)};\n `}\n `;\n});\n\nStyledFormFieldInfo.defaultProps = defaultThemeProp;\n\nexport const StyledHeadingLabel = styled(Text)``;\n\nexport const StyledLabelRow = styled.div<{ inline: boolean }>(({ inline }) => {\n if (inline) {\n return css`\n flex-shrink: 0;\n width: 14ch;\n ${StyledAdditionalInfo} {\n align-self: center;\n }\n `;\n }\n});\n\nexport const StyledFormField = styled.div<\n FormFieldProps & {\n asFieldset: boolean;\n showAdditionalInfo: boolean;\n labelInline?: boolean;\n }\n>(props => {\n const {\n asFieldset,\n showAdditionalInfo,\n disabled,\n required,\n labelInline,\n theme: {\n base: {\n palette: { urgent },\n 'disabled-opacity': disabledOpacity,\n spacing,\n 'hit-area': { 'compact-min': hitAreaCompact }\n }\n }\n } = props;\n\n return css`\n ${disabled &&\n css`\n opacity: ${disabledOpacity};\n -webkit-user-select: none;\n user-select: none;\n `}\n position: relative;\n border: 0;\n\n &:has(${StyledRadioCheckInput}:only-of-type) {\n ${StyledFormFieldInfo} {\n min-width: 100%;\n }\n }\n\n ${StyledFlex}:has(${StyledRadioCheck}) {\n flex-shrink: 0;\n }\n\n > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledLabelRow}, > ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})) {\n &:not(:empty) {\n margin-bottom: calc(0.25 * ${spacing});\n min-height: ${hitAreaCompact};\n }\n }\n\n > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledLabelRow} > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledFlex} > :is(${StyledLabel}, ${StyledHeadingLabel}) {\n ${required &&\n css`\n &::after {\n content: ${'\"\\\\00a0*\" / \"\"'};\n color: ${urgent};\n }\n `}\n\n ${disabled &&\n css`\n cursor: not-allowed;\n `}\n }\n\n ${asFieldset &&\n showAdditionalInfo &&\n css`\n > ${StyledFlex} > :is(${StyledLabel}, ${StyledHeadingLabel}) {\n display: block;\n }\n\n > ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})) > ${StyledAdditionalInfo} {\n align-self: flex-start;\n }\n `}\n\n ${labelInline &&\n css`\n display: grid;\n grid-template-columns: 14ch 1fr;\n grid-template-rows: auto 1fr;\n align-items: start;\n\n ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})), ${StyledFlex}:has(> ${StyledLabelRow}) {\n grid-row: span 2;\n }\n `}\n `;\n});\n\nStyledFormField.defaultProps = defaultThemeProp;\n\nconst StyledSuggestionWrapper = styled(Flex)<Pick<FormControlProps, 'status'>>(({\n theme,\n status\n}) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale },\n components: { 'form-control': formControl }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n const infoFontSize = fontSizes.xxs;\n\n return css`\n ${StyledText} {\n ${(!status || status === 'pending') &&\n css`\n color: ${formControl['foreground-color']};\n font-size: ${infoFontSize};\n `}\n }\n `;\n});\n\nStyledSuggestionWrapper.defaultProps = defaultThemeProp;\n\nconst statusIconMap = { error: 'warn-solid', warning: 'diamond-minus', success: 'check' };\n\nconst FormField: FC<FormFieldProps & ForwardProps> = forwardRef(function FormField(\n props: PropsWithoutRef<FormFieldProps>,\n ref: Ref<HTMLElement>\n) {\n const uid = useUID();\n const theme = useTheme();\n const {\n testId,\n children: controlElement,\n id = uid,\n as = 'div',\n label,\n labelAs: labelAsProp = 'label',\n labelFor = id,\n labelId: labelIdProp,\n labelHidden = false,\n labelAfter = false,\n labelVariant = 'default',\n info,\n status,\n suppressAnnouncements,\n isRadioCheck,\n charLimitDisplay,\n required = false,\n disabled = false,\n readOnly = false,\n inline = theme.components['form-field'].layout === 'inline',\n onClear,\n actions,\n container,\n additionalInfo,\n suggestion,\n 'aria-describedby': ariaDescribedBy,\n className,\n ...restProps\n } = props;\n\n const infoAbove = theme.components['form-field']['helper-text-position'] === 'above';\n const testIds = useTestIds(testId, getFormFieldTestIds);\n\n const asFieldset =\n as === 'fieldset' || (typeof as !== 'string' && 'target' in as && as.target === 'fieldset');\n const t = useI18n();\n const { announceAssertive } = useLiveLog();\n const labelAs = asFieldset ? 'span' : labelAsProp;\n const hasAutoInputSuggestion = status === 'pending' && !!suggestion && 'onReject' in suggestion;\n const hasSuggestion = hasAutoInputSuggestion || (!!suggestion && 'value' in suggestion);\n const consolidatedRef = useConsolidatedRef(ref);\n const labelRef = useRef<HTMLLabelElement | HTMLLegendElement>(null);\n const [labelText, setLabelText] = useState<string | null>(null);\n\n const showAdditionalInfo = !!additionalInfo && !disabled && !labelHidden;\n const labelInline = inline && !isRadioCheck && !labelHidden;\n const labelId = asFieldset && !labelIdProp ? `${id}-label` : labelIdProp;\n\n const labelContent = (\n <>\n {(() => {\n const baseLabelProps = {\n 'data-testid': testIds.label,\n children: label,\n id: labelId,\n htmlFor: labelAs === 'label' ? labelFor : undefined,\n onClick: (e: MouseEvent) => {\n if (readOnly) e.preventDefault();\n }\n };\n\n if (labelVariant === 'default' || labelHidden) {\n return (\n <Label\n {...baseLabelProps}\n as={labelAs}\n labelHidden={labelHidden}\n inline={labelInline}\n ref={labelRef}\n />\n );\n }\n\n return (\n <StyledHeadingLabel\n {...baseLabelProps}\n forwardedAs={labelAs}\n variant={labelVariant}\n ref={labelRef}\n />\n );\n })()}\n\n {showAdditionalInfo && labelText && (\n <AdditionalInfo\n data-testid={testIds.additionalInfo}\n heading={additionalInfo.heading}\n contextualLabel={labelText}\n >\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </>\n );\n\n let labelRow: ReactNode;\n if (!isRadioCheck && !asFieldset && !labelHidden) {\n labelRow = (\n <Flex\n as={StyledLabelRow}\n container={{ justify: labelInline ? 'start' : 'between', alignItems: 'end' }}\n item={{ alignSelf: labelInline ? 'start' : 'stretch', shrink: labelInline ? 0 : undefined }}\n inline={labelInline}\n >\n {labelContent}\n </Flex>\n );\n } else if (asFieldset && !labelHidden) {\n labelRow = (\n <Flex\n container={{\n alignItems: 'end',\n justify: showAdditionalInfo && !isRadioCheck ? 'between' : undefined\n }}\n >\n {labelContent}\n </Flex>\n );\n } else {\n labelRow = labelContent;\n }\n\n useEffect(() => {\n setLabelText(labelRef.current?.textContent ?? null);\n }, [label]);\n\n useEffect(() => {\n if (suppressAnnouncements || (status !== 'error' && status !== 'warning')) return;\n\n let message = t(status);\n\n if (typeof info === 'string') message = `${message} ${info}`;\n\n if (labelRef.current?.textContent) message = `${labelRef.current?.textContent} ${message}`;\n\n announceAssertive({ message, type: status });\n }, [status, info]);\n\n // fieldset or single form control element\n let content: FormFieldProps['children'];\n if (asFieldset || Children.count(controlElement) > 1) {\n content = controlElement;\n } else {\n const controlElementAriaDescribedBy = Children.only(controlElement).props[\n 'aria-describedby'\n ] as string | undefined;\n content = cloneElement(controlElement as ReactElement, {\n 'aria-describedby':\n [controlElementAriaDescribedBy, info && !readOnly ? `${id}-info` : undefined]\n .join(' ')\n .trim() || undefined\n });\n }\n\n if (actions) {\n content = (\n <Flex\n container={{ alignItems: 'center', gap: 0.5 }}\n item={{ grow: labelInline ? 1 : undefined }}\n >\n {content}\n <Actions items={actions} menuAt={3} />\n </Flex>\n );\n }\n\n let infoContent = (\n <Flex\n id={`${id}-info`}\n data-testid={testIds.info}\n status={status}\n as={StyledFormFieldInfo}\n container={{ alignItems: 'center', gap: 0.5 }}\n infoAbove={infoAbove}\n >\n {status && status !== 'pending' && (\n <>\n <Flex\n item={{ alignSelf: 'start' }}\n as={StyledStatusIcon}\n status={status}\n name={statusIconMap[status]}\n />\n <VisuallyHiddenText>{`${t(status)} `}</VisuallyHiddenText>\n </>\n )}\n {info}\n </Flex>\n );\n\n if (charLimitDisplay) {\n infoContent = (\n <Flex container={{ justify: infoContent ? 'between' : 'end', gap: 1 }}>\n {infoContent}\n <Flex item={{ shrink: 0 }}>{charLimitDisplay}</Flex>\n </Flex>\n );\n }\n\n if (hasSuggestion) {\n const focusables = getFocusables(consolidatedRef);\n infoContent = (\n <StyledFormFieldInfo\n data-testid={testIds.info}\n status={status}\n id={`${id}-info`}\n infoAbove={infoAbove}\n >\n {'value' in suggestion && (\n <StyledSuggestionWrapper container={{ alignItems: 'center', gap: 0.2 }} status={status}>\n <Icon size='font-size' name='polaris-solid' />{' '}\n <Text>{`${t('suggestion_suggested_value')}:`}</Text>\n <AIButton\n variant='link'\n icon={null}\n data-testid={testIds.suggestionAccept}\n onClick={() => {\n suggestion.onAccept();\n focusables[0]?.focus();\n }}\n label={suggestion.value}\n aria-label={`${t('accept_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n />\n </StyledSuggestionWrapper>\n )}\n {'onReject' in suggestion &&\n ('previousValue' in suggestion && suggestion.previousValue ? (\n <StyledSuggestionWrapper container={{ alignItems: 'center', gap: 0.2 }} status={status}>\n <Text>{`${t('suggestion_previous_value')}:`}</Text>\n <Button\n variant='link'\n data-testid={testIds.suggestionReject}\n onClick={() => {\n suggestion.onReject();\n focusables[0]?.focus();\n }}\n aria-label={`${t('reject_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n >\n {suggestion.previousValue}\n </Button>\n </StyledSuggestionWrapper>\n ) : (\n <AIButton\n variant='link'\n icon={null}\n data-testid={testIds.suggestionReject}\n onClick={() => {\n suggestion.onReject();\n focusables[0]?.focus();\n }}\n label={t('suggestion_clear')}\n aria-label={`${t('reject_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n />\n ))}\n\n <VisuallyHiddenText aria-live='polite'>{t('suggestion_assist')}</VisuallyHiddenText>\n </StyledFormFieldInfo>\n );\n }\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n const target = e.target as HTMLElement;\n if (!target.closest('button')) {\n e.preventDefault();\n suggestion?.onAccept();\n }\n }\n };\n\n const descriptionIds = [];\n if (ariaDescribedBy) descriptionIds.push(ariaDescribedBy);\n if (asFieldset && info) descriptionIds.push(`${id}-info`);\n\n return (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n container={{\n direction: inline && !labelHidden ? 'row' : 'column',\n alignItems: inline && !labelHidden ? 'center' : undefined,\n wrap: isRadioCheck || inline ? 'wrap' : undefined,\n ...container\n }}\n as={StyledFormField}\n asFieldset={asFieldset}\n isRadioCheck={isRadioCheck}\n showAdditionalInfo={showAdditionalInfo}\n id={`${id}-field`}\n forwardedAs={as}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n labelInline={labelInline}\n onKeyDown={hasAutoInputSuggestion ? onKeyDown : undefined}\n aria-describedby={descriptionIds.length ? descriptionIds.join(' ') : undefined}\n aria-labelledby={asFieldset ? labelId : undefined}\n ref={consolidatedRef}\n className={createClassName('form-field', className, { status })}\n >\n {(asFieldset || !labelAfter) && labelRow}\n {!readOnly && infoAbove && infoContent}\n {content}\n {!asFieldset && labelAfter && labelRow}\n {!readOnly && !infoAbove && infoContent}\n {isRadioCheck && onClear && (\n <StyledClearButton\n variant='link'\n onClick={() => {\n onClear();\n }}\n >\n {t('clear_selection')}\n </StyledClearButton>\n )}\n </Flex>\n );\n});\n\nexport default withTestIds(FormField, getFormFieldTestIds);\n"]}
1
+ {"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUxF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAS/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,OAAO,MAAM,YAAY,CAAC;AA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BAC7D,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACjD,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,aAE9D,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,QAAQ,EACvC,CAAC,QAAQ,IAAI,SAAS,IAAI,WAAW,EACrC,OAAO,EACP,CAAC,UAAU,IAAI,UAAU,IAAI,QAAQ,EACrC,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,WAAW,EACtC,YAAY,IAAI,OAAO,IAAI,CAC1B,KAAC,iBAAiB,IAChB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,EAAE,CAAC;gBACZ,CAAC,YAEA,CAAC,CAAC,iBAAiB,CAAC,GACH,CACrB,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { cloneElement, useEffect, forwardRef, useState, useRef, Children } from 'react';\nimport type {\n FC,\n MouseEvent,\n ReactNode,\n ComponentType,\n ReactElement,\n PropsWithoutRef,\n Ref\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport AIButton from '../AIButton';\nimport { defaultThemeProp } from '../../theme';\nimport type {\n Action,\n ExcludeStrict,\n ForwardProps,\n HeadingTag,\n OmitStrict,\n TestIdProp\n} from '../../types';\nimport Flex, { StyledFlex } from '../Flex';\nimport type { FlexProps } from '../Flex';\nimport Actions from '../Actions';\nimport type { FormControlProps } from '../FormControl';\nimport { StyledFormControl } from '../FormControl';\nimport { useConsolidatedRef, useI18n, useLiveLog, useTestIds, useTheme, useUID } from '../../hooks';\nimport Label, { StyledLabel } from '../Label';\nimport type { LabelProps } from '../Label';\nimport { calculateFontSize, getReadableStatusColor } from '../../styles';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { getFocusables, withTestIds, createClassName } from '../../utils';\nimport Button, { StyledButton } from '../Button';\nimport Text, { StyledText } from '../Text';\nimport Icon, { registerIcon } from '../Icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport * as diamondMinusIcon from '../Icon/icons/diamond-minus.icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport * as polarisSolidIcon from '../Icon/icons/polaris-solid.icon';\nimport AdditionalInfo, { StyledAdditionalInfo } from '../AdditionalInfo';\nimport { StyledRadioCheck, StyledRadioCheckInput } from '../RadioCheck/RadioCheck';\n\nimport { getFormFieldTestIds } from './FormField.test-ids';\nimport type { elements } from './FormField.test-ids';\n\nregisterIcon(warnSolidIcon, diamondMinusIcon, checkIcon, polarisSolidIcon);\n\nexport interface FormFieldActionsOptions {\n items: Action[];\n /** Determines where actions are rendered. */\n position: 'outside' | 'inside';\n}\n\n/** Array-form actions render outside; object-form actions can set their position. */\ntype FormFieldActions = Action[] | FormFieldActionsOptions;\n\nexport interface FormFieldProps\n extends OmitStrict<FormControlProps, 'placeholder' | 'value' | 'defaultValue'>,\n TestIdProp<typeof elements> {\n /** Pass a single form control component i.e. Input | TextArea | Select | etc.. */\n children: ReactElement | ReactElement[];\n /**\n * An id is required to connect a FormField's wrapping element, control element and info(aria-describedby) live region.\n * A random id will be generated if none is provided.\n * Since MOST FormControls should possess an id(excl. i.e RadioCheckGroup and others) this can be used.\n * The id prop will be used to generate the following:\n * - FormControl <-> Label association via a Label's htmlFor prop.\n * - FormField's wrapping element id {id}-field.\n * - FormField info element id ${id}-info.\n */\n id?: string;\n /**\n * Determines how the wrapping label should be rendered.\n * @default 'label'\n */\n labelAs?: LabelProps['as'];\n /**\n * Overrides the for attribute on the label. If this is not set it will default to the forms id.\n * @default undefined\n */\n labelFor?: LabelProps['htmlFor'];\n /**\n * Sets the id of the label.\n * @default undefined\n */\n labelId?: LabelProps['id'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: boolean;\n /**\n * Visually places the label after the input.\n * @default false\n */\n labelAfter?: boolean;\n /**\n * Sets the visual variant/styling of the label.\n * @default 'default'\n */\n labelVariant?: 'default' | HeadingTag;\n /**\n * Property used to check whether input type is radio to handle styling for RadioCheck\n * @default false\n */\n isRadioCheck?: boolean;\n /**\n * Wrapping HTML element tag. Renders as a fieldset for grouped elements i.e. RadioButtons/CheckboxGroup\n * @default 'div'\n */\n as?: 'div' | 'fieldset' | ComponentType<any>;\n /**\n * Layout field elements inline in a row.\n * @default false\n */\n inline?: boolean;\n /** Optionally utilized by Input or Select. */\n actions?: FormFieldActions;\n /** Enables Flex container prop pass through. */\n container?: ExcludeStrict<FlexProps['container'], true>;\n /** Character remaining count. Typically used on Textareas only */\n charLimitDisplay?: ReactNode;\n /** Id of additional describing element. */\n 'aria-describedby'?: string;\n /** Callback invoked when the clear button is clicked. If provided will render the clear button. */\n onClear?: () => void;\n /** Suppresses announcements for status changes. */\n suppressAnnouncements?: boolean;\n}\n\nconst StyledStatusIcon = styled(Icon)<{ status: NonNullable<FormFieldProps['status']> }>(({\n theme,\n status\n}) => {\n return css`\n height: 1em;\n width: 1em;\n color: ${getReadableStatusColor(theme, status)};\n vertical-align: baseline;\n `;\n});\n\nStyledStatusIcon.defaultProps = defaultThemeProp;\n\nconst StyledClearButton = styled(Button)(({ theme }) => {\n return css`\n margin-block-start: calc(${theme.base.spacing} / 2);\n align-self: start;\n `;\n});\n\nStyledClearButton.defaultProps = defaultThemeProp;\n\nexport const StyledFormFieldInfo = styled.div<\n Pick<FormControlProps, 'status'> & { infoAbove?: boolean }\n>(({ status, infoAbove, theme }) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing },\n components: { 'form-field': formField }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n const infoFontSize = fontSizes.xxs;\n\n return css`\n font-size: ${infoFontSize};\n word-break: break-word;\n\n &:not(:empty) {\n ${infoAbove\n ? css`\n margin-block-end: calc(0.25 * ${spacing});\n `\n : css`\n margin-block-start: calc(0.25 * ${spacing});\n `}\n }\n\n ${status &&\n formField[status] &&\n css`\n color: ${getReadableStatusColor(theme, status)};\n `}\n `;\n});\n\nStyledFormFieldInfo.defaultProps = defaultThemeProp;\n\nexport const StyledHeadingLabel = styled(Text)``;\n\nexport const StyledLabelRow = styled.div<{ inline: boolean }>(({ inline }) => {\n if (inline) {\n return css`\n flex-shrink: 0;\n width: 14ch;\n ${StyledAdditionalInfo} {\n align-self: center;\n }\n `;\n }\n});\n\nexport const StyledFormField = styled.div<\n FormFieldProps & {\n asFieldset: boolean;\n showAdditionalInfo: boolean;\n labelInline?: boolean;\n }\n>(props => {\n const {\n asFieldset,\n showAdditionalInfo,\n disabled,\n required,\n labelInline,\n theme: {\n base: {\n palette: { urgent },\n 'disabled-opacity': disabledOpacity,\n spacing,\n 'hit-area': { 'compact-min': hitAreaCompact }\n }\n }\n } = props;\n\n return css`\n ${disabled &&\n css`\n opacity: ${disabledOpacity};\n -webkit-user-select: none;\n user-select: none;\n `}\n position: relative;\n border: 0;\n\n &:has(${StyledRadioCheckInput}:only-of-type) {\n ${StyledFormFieldInfo} {\n min-width: 100%;\n }\n }\n\n ${StyledFlex}:has(${StyledRadioCheck}) {\n flex-shrink: 0;\n }\n\n > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledLabelRow}, > ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})) {\n &:not(:empty) {\n margin-bottom: calc(0.25 * ${spacing});\n min-height: ${hitAreaCompact};\n }\n }\n\n > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledLabelRow} > :is(${StyledLabel}, ${StyledHeadingLabel}),\n > ${StyledFlex} > :is(${StyledLabel}, ${StyledHeadingLabel}) {\n ${required &&\n css`\n &::after {\n content: ${'\"\\\\00a0*\" / \"\"'};\n color: ${urgent};\n }\n `}\n\n ${disabled &&\n css`\n cursor: not-allowed;\n `}\n }\n\n ${asFieldset &&\n showAdditionalInfo &&\n css`\n > ${StyledFlex} > :is(${StyledLabel}, ${StyledHeadingLabel}) {\n display: block;\n }\n\n > ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})) > ${StyledAdditionalInfo} {\n align-self: flex-start;\n }\n `}\n\n ${labelInline &&\n css`\n display: grid;\n grid-template-columns: 14ch 1fr;\n grid-template-rows: auto 1fr;\n align-items: start;\n\n ${StyledFlex}:has(> :is(${StyledLabel}, ${StyledHeadingLabel})), ${StyledFlex}:has(> ${StyledLabelRow}) {\n grid-row: span 2;\n }\n `}\n `;\n});\n\nStyledFormField.defaultProps = defaultThemeProp;\n\nconst StyledSuggestionWrapper = styled(Flex)<Pick<FormControlProps, 'status'>>(({\n theme,\n status\n}) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale },\n components: { 'form-control': formControl }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n const infoFontSize = fontSizes.xxs;\n\n return css`\n ${StyledText} {\n ${(!status || status === 'pending') &&\n css`\n color: ${formControl['foreground-color']};\n font-size: ${infoFontSize};\n `}\n }\n `;\n});\n\nStyledSuggestionWrapper.defaultProps = defaultThemeProp;\n\n// Build a shared control boundary for inputs whose action belongs inside the field.\nconst StyledInlineActions = styled(StyledFormControl)(({ theme, disabled, readOnly, status }) => {\n const {\n base: { 'border-radius': baseBorderRadius },\n components: { input, 'form-control': formControl, 'form-field': formField }\n } = theme;\n const inlineEndRadius = `calc(${baseBorderRadius} * ${formControl['border-radius']})`;\n const statusBorderColor =\n status && formField[status]\n ? getReadableStatusColor(theme, status)\n : formControl['border-color'];\n let dividerColor = statusBorderColor;\n if (disabled) {\n dividerColor = formControl[':disabled']['border-color'];\n } else if (readOnly) {\n dividerColor = formControl[':read-only']['border-color'];\n }\n\n return css`\n /* Lay out the input and action slot inside one field boundary. */\n height: ${input.height};\n display: flex;\n align-items: center;\n min-width: 0;\n width: 100%;\n\n /* Apply one focus ring around the combined control. */\n &:focus-within:not([disabled]) {\n border-color: ${formControl[':focus']['border-color']};\n box-shadow: ${formControl[':focus']['box-shadow']};\n }\n\n /* Let the wrapper, rather than the input, draw the field boundary. */\n > ${StyledFormControl}:first-child {\n border: 0;\n box-shadow: none;\n background-color: transparent;\n }\n\n /* Separate the action slot and align its end edge with the field. */\n > div:last-child {\n margin-inline-end: calc(-1 * ${formControl['border-width']});\n border-inline-start: ${formControl['border-width']} solid ${dividerColor};\n }\n\n /* Blend the action button into the field's inline-end edge. */\n > div:last-child > ${StyledButton} {\n border: 0;\n border-radius: 0;\n border-start-end-radius: ${inlineEndRadius};\n border-end-end-radius: ${inlineEndRadius};\n\n /* Keep the action slot aligned with the input on coarse pointers. */\n @media (pointer: coarse) {\n min-width: ${input.height};\n min-height: ${input.height};\n }\n\n /* Keep the Button hover wash inside the shared field boundary. */\n &:hover::before {\n inset: 0;\n }\n }\n `;\n});\n\nStyledInlineActions.defaultProps = defaultThemeProp;\n\nconst statusIconMap = { error: 'warn-solid', warning: 'diamond-minus', success: 'check' };\n\nconst FormField: FC<FormFieldProps & ForwardProps> = forwardRef(function FormField(\n props: PropsWithoutRef<FormFieldProps>,\n ref: Ref<HTMLElement>\n) {\n const uid = useUID();\n const theme = useTheme();\n const {\n testId,\n children: controlElement,\n id = uid,\n as = 'div',\n label,\n labelAs: labelAsProp = 'label',\n labelFor = id,\n labelId: labelIdProp,\n labelHidden = false,\n labelAfter = false,\n labelVariant = 'default',\n info,\n status,\n suppressAnnouncements,\n isRadioCheck,\n charLimitDisplay,\n required = false,\n disabled = false,\n readOnly = false,\n inline = theme.components['form-field'].layout === 'inline',\n onClear,\n actions,\n container,\n additionalInfo,\n suggestion,\n 'aria-describedby': ariaDescribedBy,\n className,\n ...restProps\n } = props;\n\n const infoAbove = theme.components['form-field']['helper-text-position'] === 'above';\n const testIds = useTestIds(testId, getFormFieldTestIds);\n\n const asFieldset =\n as === 'fieldset' || (typeof as !== 'string' && 'target' in as && as.target === 'fieldset');\n const t = useI18n();\n const { announceAssertive } = useLiveLog();\n const labelAs = asFieldset ? 'span' : labelAsProp;\n const hasAutoInputSuggestion = status === 'pending' && !!suggestion && 'onReject' in suggestion;\n const hasSuggestion = hasAutoInputSuggestion || (!!suggestion && 'value' in suggestion);\n const consolidatedRef = useConsolidatedRef(ref);\n const labelRef = useRef<HTMLLabelElement | HTMLLegendElement>(null);\n const [labelText, setLabelText] = useState<string | null>(null);\n\n const showAdditionalInfo = !!additionalInfo && !disabled && !labelHidden;\n const labelInline = inline && !isRadioCheck && !labelHidden;\n const labelId = asFieldset && !labelIdProp ? `${id}-label` : labelIdProp;\n\n const labelContent = (\n <>\n {(() => {\n const baseLabelProps = {\n 'data-testid': testIds.label,\n children: label,\n id: labelId,\n htmlFor: labelAs === 'label' ? labelFor : undefined,\n onClick: (e: MouseEvent) => {\n if (readOnly) e.preventDefault();\n }\n };\n\n if (labelVariant === 'default' || labelHidden) {\n return (\n <Label\n {...baseLabelProps}\n as={labelAs}\n labelHidden={labelHidden}\n inline={labelInline}\n ref={labelRef}\n />\n );\n }\n\n return (\n <StyledHeadingLabel\n {...baseLabelProps}\n forwardedAs={labelAs}\n variant={labelVariant}\n ref={labelRef}\n />\n );\n })()}\n\n {showAdditionalInfo && labelText && (\n <AdditionalInfo\n data-testid={testIds.additionalInfo}\n heading={additionalInfo.heading}\n contextualLabel={labelText}\n >\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </>\n );\n\n let labelRow: ReactNode;\n if (!isRadioCheck && !asFieldset && !labelHidden) {\n labelRow = (\n <Flex\n as={StyledLabelRow}\n container={{ justify: labelInline ? 'start' : 'between', alignItems: 'end' }}\n item={{ alignSelf: labelInline ? 'start' : 'stretch', shrink: labelInline ? 0 : undefined }}\n inline={labelInline}\n >\n {labelContent}\n </Flex>\n );\n } else if (asFieldset && !labelHidden) {\n labelRow = (\n <Flex\n container={{\n alignItems: 'end',\n justify: showAdditionalInfo && !isRadioCheck ? 'between' : undefined\n }}\n >\n {labelContent}\n </Flex>\n );\n } else {\n labelRow = labelContent;\n }\n\n useEffect(() => {\n setLabelText(labelRef.current?.textContent ?? null);\n }, [label]);\n\n useEffect(() => {\n if (suppressAnnouncements || (status !== 'error' && status !== 'warning')) return;\n\n let message = t(status);\n\n if (typeof info === 'string') message = `${message} ${info}`;\n\n if (labelRef.current?.textContent) message = `${labelRef.current?.textContent} ${message}`;\n\n announceAssertive({ message, type: status });\n }, [status, info]);\n\n // fieldset or single form control element\n let content: FormFieldProps['children'];\n if (asFieldset || Children.count(controlElement) > 1) {\n content = controlElement;\n } else {\n const controlElementAriaDescribedBy = Children.only(controlElement).props[\n 'aria-describedby'\n ] as string | undefined;\n content = cloneElement(controlElement as ReactElement, {\n 'aria-describedby':\n [controlElementAriaDescribedBy, info && !readOnly ? `${id}-info` : undefined]\n .join(' ')\n .trim() || undefined\n });\n }\n\n const actionItems = Array.isArray(actions) ? actions : actions?.items;\n\n if (actionItems?.length) {\n if (!Array.isArray(actions) && actions?.position === 'inside') {\n // Keep the input and its action inside one border while preserving the default outside layout.\n content = (\n <StyledInlineActions\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n hasSuggestion={hasSuggestion}\n >\n {content}\n <div data-testid={testIds.actions}>\n <Actions items={actionItems} menuAt={3} disabled={disabled} />\n </div>\n </StyledInlineActions>\n );\n } else {\n content = (\n <Flex\n container={{ alignItems: 'center', gap: 0.5 }}\n item={{ grow: labelInline ? 1 : undefined }}\n >\n {content}\n <Actions items={actionItems} menuAt={3} />\n </Flex>\n );\n }\n }\n\n let infoContent = (\n <Flex\n id={`${id}-info`}\n data-testid={testIds.info}\n status={status}\n as={StyledFormFieldInfo}\n container={{ alignItems: 'center', gap: 0.5 }}\n infoAbove={infoAbove}\n >\n {status && status !== 'pending' && (\n <>\n <Flex\n item={{ alignSelf: 'start' }}\n as={StyledStatusIcon}\n status={status}\n name={statusIconMap[status]}\n />\n <VisuallyHiddenText>{`${t(status)} `}</VisuallyHiddenText>\n </>\n )}\n {info}\n </Flex>\n );\n\n if (charLimitDisplay) {\n infoContent = (\n <Flex container={{ justify: infoContent ? 'between' : 'end', gap: 1 }}>\n {infoContent}\n <Flex item={{ shrink: 0 }}>{charLimitDisplay}</Flex>\n </Flex>\n );\n }\n\n if (hasSuggestion) {\n const focusables = getFocusables(consolidatedRef);\n infoContent = (\n <StyledFormFieldInfo\n data-testid={testIds.info}\n status={status}\n id={`${id}-info`}\n infoAbove={infoAbove}\n >\n {'value' in suggestion && (\n <StyledSuggestionWrapper container={{ alignItems: 'center', gap: 0.2 }} status={status}>\n <Icon size='font-size' name='polaris-solid' />{' '}\n <Text>{`${t('suggestion_suggested_value')}:`}</Text>\n <AIButton\n variant='link'\n icon={null}\n data-testid={testIds.suggestionAccept}\n onClick={() => {\n suggestion.onAccept();\n focusables[0]?.focus();\n }}\n label={suggestion.value}\n aria-label={`${t('accept_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n />\n </StyledSuggestionWrapper>\n )}\n {'onReject' in suggestion &&\n ('previousValue' in suggestion && suggestion.previousValue ? (\n <StyledSuggestionWrapper container={{ alignItems: 'center', gap: 0.2 }} status={status}>\n <Text>{`${t('suggestion_previous_value')}:`}</Text>\n <Button\n variant='link'\n data-testid={testIds.suggestionReject}\n onClick={() => {\n suggestion.onReject();\n focusables[0]?.focus();\n }}\n aria-label={`${t('reject_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n >\n {suggestion.previousValue}\n </Button>\n </StyledSuggestionWrapper>\n ) : (\n <AIButton\n variant='link'\n icon={null}\n data-testid={testIds.suggestionReject}\n onClick={() => {\n suggestion.onReject();\n focusables[0]?.focus();\n }}\n label={t('suggestion_clear')}\n aria-label={`${t('reject_suggestion_button_a11y')}${labelText ? ` - ${labelText}` : ''}`}\n />\n ))}\n\n <VisuallyHiddenText aria-live='polite'>{t('suggestion_assist')}</VisuallyHiddenText>\n </StyledFormFieldInfo>\n );\n }\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n const target = e.target as HTMLElement;\n if (!target.closest('button')) {\n e.preventDefault();\n suggestion?.onAccept();\n }\n }\n };\n\n const descriptionIds = [];\n if (ariaDescribedBy) descriptionIds.push(ariaDescribedBy);\n if (asFieldset && info) descriptionIds.push(`${id}-info`);\n\n return (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n container={{\n direction: inline && !labelHidden ? 'row' : 'column',\n alignItems: inline && !labelHidden ? 'center' : undefined,\n wrap: isRadioCheck || inline ? 'wrap' : undefined,\n ...container\n }}\n as={StyledFormField}\n asFieldset={asFieldset}\n isRadioCheck={isRadioCheck}\n showAdditionalInfo={showAdditionalInfo}\n id={`${id}-field`}\n forwardedAs={as}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n labelInline={labelInline}\n onKeyDown={hasAutoInputSuggestion ? onKeyDown : undefined}\n aria-describedby={descriptionIds.length ? descriptionIds.join(' ') : undefined}\n aria-labelledby={asFieldset ? labelId : undefined}\n ref={consolidatedRef}\n className={createClassName('form-field', className, { status })}\n >\n {(asFieldset || !labelAfter) && labelRow}\n {!readOnly && infoAbove && infoContent}\n {content}\n {!asFieldset && labelAfter && labelRow}\n {!readOnly && !infoAbove && infoContent}\n {isRadioCheck && onClear && (\n <StyledClearButton\n variant='link'\n onClick={() => {\n onClear();\n }}\n >\n {t('clear_selection')}\n </StyledClearButton>\n )}\n </Flex>\n );\n});\n\nexport default withTestIds(FormField, getFormFieldTestIds);\n"]}
@@ -1,3 +1,3 @@
1
- export declare const elements: readonly ["label", "info", "additional-info", "suggestion-accept", "suggestion-reject"];
2
- export declare const getFormFieldTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const elements: readonly ["label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"];
2
+ export declare const getFormFieldTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
3
3
  //# sourceMappingURL=FormField.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,yFAMX,CAAC;AAEX,eAAO,MAAM,mBAAmB,+KAAwC,CAAC"}
1
+ {"version":3,"file":"FormField.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,oGAOX,CAAC;AAEX,eAAO,MAAM,mBAAmB,0LAAwC,CAAC"}
@@ -3,6 +3,7 @@ export const elements = [
3
3
  'label',
4
4
  'info',
5
5
  'additional-info',
6
+ 'actions',
6
7
  'suggestion-accept',
7
8
  'suggestion-reject'
8
9
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.test-ids.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO;IACP,MAAM;IACN,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\n\nexport const elements = [\n 'label',\n 'info',\n 'additional-info',\n 'suggestion-accept',\n 'suggestion-reject'\n] as const;\n\nexport const getFormFieldTestIds = createTestIds('form-field', elements);\n"]}
1
+ {"version":3,"file":"FormField.test-ids.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO;IACP,MAAM;IACN,iBAAiB;IACjB,SAAS;IACT,mBAAmB;IACnB,mBAAmB;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\n\nexport const elements = [\n 'label',\n 'info',\n 'additional-info',\n 'actions',\n 'suggestion-accept',\n 'suggestion-reject'\n] as const;\n\nexport const getFormFieldTestIds = createTestIds('form-field', elements);\n"]}
@@ -1,3 +1,3 @@
1
1
  export { default, StyledFormFieldInfo, StyledFormField, StyledLabelRow } from './FormField';
2
- export type { FormFieldProps } from './FormField';
2
+ export type { FormFieldActionsOptions, FormFieldProps } from './FormField';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5F,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5F,YAAY,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default, StyledFormFieldInfo, StyledFormField, StyledLabelRow } from './FormField';\nexport type { FormFieldProps } from './FormField';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default, StyledFormFieldInfo, StyledFormField, StyledLabelRow } from './FormField';\nexport type { FormFieldActionsOptions, FormFieldProps } from './FormField';\n"]}
@@ -1,4 +1,5 @@
1
- import type { Action, NoChildrenProp, TestIdProp, WithAttributes } from '../../types';
1
+ import type { NoChildrenProp, TestIdProp, WithAttributes } from '../../types';
2
+ import type { FormFieldProps } from '../FormField';
2
3
  import type { FormControlProps } from '../FormControl';
3
4
  export type InputProps = WithAttributes<'input', FormControlProps & TestIdProp & NoChildrenProp & {
4
5
  /**
@@ -6,11 +7,11 @@ export type InputProps = WithAttributes<'input', FormControlProps & TestIdProp &
6
7
  * @default 'text'
7
8
  */
8
9
  type?: 'text' | 'password' | 'number' | 'email' | 'url' | 'search' | 'tel' | 'date' | 'datetime-local' | 'time' | 'week' | 'month' | 'hidden' | 'color';
9
- /** Pass an array of Action objects to append button(s) inline with the Input. */
10
- actions?: Action[];
10
+ /** Render associated actions within or adjacent to the input. */
11
+ actions?: FormFieldProps['actions'];
11
12
  }>;
12
13
  declare const _default: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>> & {
13
- getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
14
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
14
15
  };
15
16
  export default _default;
16
17
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAc,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,MAAM,UAAU,GAAG,cAAc,CACrC,OAAO,EACP,gBAAgB,GACd,UAAU,GACV,cAAc,GAAG;IACf;;;OAGG;IACH,IAAI,CAAC,EACD,MAAM,GACN,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,QAAQ,GACR,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;IACZ,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CACJ,CAAC;;;;AAEF,wBAgFE"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAc,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOvD,MAAM,MAAM,UAAU,GAAG,cAAc,CACrC,OAAO,EACP,gBAAgB,GACd,UAAU,GACV,cAAc,GAAG;IACf;;;OAGG;IACH,IAAI,CAAC,EACD,MAAM,GACN,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,QAAQ,GACR,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;IACZ,iEAAiE;IACjE,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;CACrC,CACJ,CAAC;;;;AAEF,wBAiFE"}
@@ -18,6 +18,7 @@ export default withTestIds(forwardRef(function Input(props, ref) {
18
18
  else if (hasProp(props, 'defaultValue')) {
19
19
  controlProp.defaultValue = defaultValue ?? '';
20
20
  }
21
+ // Forward action placement to FormField instead of exposing it on the native input.
21
22
  const Comp = (_jsx(FormControl, { "data-testid": testIds.control, ref: ref, id: id, required: required, disabled: disabled, readOnly: readOnly, status: status, hasSuggestion: !!suggestion && status === 'pending', ...controlProp,
22
23
  // Disables browser autocomplete
23
24
  // Chrome does not respect autocomplete='off'
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AA+BnD,eAAe,WAAW,CACxB,UAAU,CAAsD,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACvF,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,cAAc,EACd,WAAW,EACX,IAAI,EACJ,MAAM,EACN,OAAO,EACP,UAAU,EACV,SAAS,EACT,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEpD,MAAM,WAAW,GAGb,EAAE,CAAC;IAEP,4DAA4D;IAC5D,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;QAC5B,WAAW,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IAClC,CAAC;SAAM,IAAI,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC;QAC1C,WAAW,CAAC,YAAY,GAAG,YAAY,IAAI,EAAE,CAAC;IAChD,CAAC;IAED,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,mBACG,OAAO,CAAC,OAAO,EAC5B,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,CAAC,CAAC,UAAU,IAAI,MAAM,KAAK,SAAS,KAC/C,WAAW;QACf,gCAAgC;QAChC,6CAA6C;QAC7C,uDAAuD;QACvD,YAAY,EAAC,MAAM,KACf,SAAS,EACb,EAAE,EAAE,WAAW,EACf,SAAS,EAAE,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,GAC9C,CACH,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,YAErB,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,EACF,eAAe,CAChB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport type { Action, NoChildrenProp, RefElement, TestIdProp, WithAttributes } from '../../types';\nimport FormField from '../FormField';\nimport FormControl from '../FormControl';\nimport type { FormControlProps } from '../FormControl';\nimport { createClassName, hasProp, withTestIds } from '../../utils';\nimport { useTestIds, useUID } from '../../hooks';\n\nimport StyledInput from './Input.styles';\nimport { getInputTestIds } from './Input.test-ids';\n\nexport type InputProps = WithAttributes<\n 'input',\n FormControlProps &\n TestIdProp &\n NoChildrenProp & {\n /**\n * Specifies the type of input to be used.\n * @default 'text'\n */\n type?:\n | 'text'\n | 'password'\n | 'number'\n | 'email'\n | 'url'\n | 'search'\n | 'tel'\n | 'date'\n | 'datetime-local'\n | 'time'\n | 'week'\n | 'month'\n | 'hidden'\n | 'color';\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: Action[];\n }\n>;\n\nexport default withTestIds(\n forwardRef<RefElement<InputProps>, PropsWithoutRef<InputProps>>(function Input(props, ref) {\n const uid = useUID();\n\n const {\n testId,\n id = uid,\n value,\n defaultValue,\n required = false,\n disabled = false,\n readOnly = false,\n label,\n additionalInfo,\n labelHidden,\n info,\n status,\n actions,\n suggestion,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getInputTestIds);\n\n const controlProp: {\n value?: string;\n defaultValue?: string;\n } = {};\n\n // Conditionally render component as controlled/uncontrolled\n if (hasProp(props, 'value')) {\n controlProp.value = value ?? '';\n } else if (hasProp(props, 'defaultValue')) {\n controlProp.defaultValue = defaultValue ?? '';\n }\n\n const Comp = (\n <FormControl\n data-testid={testIds.control}\n ref={ref}\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n status={status}\n hasSuggestion={!!suggestion && status === 'pending'}\n {...controlProp}\n // Disables browser autocomplete\n // Chrome does not respect autocomplete='off'\n // Current consensus is to workaround via random string\n autoComplete='_off'\n {...restProps}\n as={StyledInput}\n className={createClassName('input', className)}\n />\n );\n\n return label ? (\n <FormField\n testId={testIds}\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n actions={actions}\n suggestion={suggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }),\n getInputTestIds\n);\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AA+BnD,eAAe,WAAW,CACxB,UAAU,CAAsD,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACvF,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,cAAc,EACd,WAAW,EACX,IAAI,EACJ,MAAM,EACN,OAAO,EACP,UAAU,EACV,SAAS,EACT,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEpD,MAAM,WAAW,GAGb,EAAE,CAAC;IAEP,4DAA4D;IAC5D,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;QAC5B,WAAW,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IAClC,CAAC;SAAM,IAAI,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC;QAC1C,WAAW,CAAC,YAAY,GAAG,YAAY,IAAI,EAAE,CAAC;IAChD,CAAC;IAED,oFAAoF;IACpF,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,mBACG,OAAO,CAAC,OAAO,EAC5B,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,CAAC,CAAC,UAAU,IAAI,MAAM,KAAK,SAAS,KAC/C,WAAW;QACf,gCAAgC;QAChC,6CAA6C;QAC7C,uDAAuD;QACvD,YAAY,EAAC,MAAM,KACf,SAAS,EACb,EAAE,EAAE,WAAW,EACf,SAAS,EAAE,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,GAC9C,CACH,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,YAErB,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,EACF,eAAe,CAChB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport type { NoChildrenProp, RefElement, TestIdProp, WithAttributes } from '../../types';\nimport FormField from '../FormField';\nimport type { FormFieldProps } from '../FormField';\nimport FormControl from '../FormControl';\nimport type { FormControlProps } from '../FormControl';\nimport { createClassName, hasProp, withTestIds } from '../../utils';\nimport { useTestIds, useUID } from '../../hooks';\n\nimport StyledInput from './Input.styles';\nimport { getInputTestIds } from './Input.test-ids';\n\nexport type InputProps = WithAttributes<\n 'input',\n FormControlProps &\n TestIdProp &\n NoChildrenProp & {\n /**\n * Specifies the type of input to be used.\n * @default 'text'\n */\n type?:\n | 'text'\n | 'password'\n | 'number'\n | 'email'\n | 'url'\n | 'search'\n | 'tel'\n | 'date'\n | 'datetime-local'\n | 'time'\n | 'week'\n | 'month'\n | 'hidden'\n | 'color';\n /** Render associated actions within or adjacent to the input. */\n actions?: FormFieldProps['actions'];\n }\n>;\n\nexport default withTestIds(\n forwardRef<RefElement<InputProps>, PropsWithoutRef<InputProps>>(function Input(props, ref) {\n const uid = useUID();\n\n const {\n testId,\n id = uid,\n value,\n defaultValue,\n required = false,\n disabled = false,\n readOnly = false,\n label,\n additionalInfo,\n labelHidden,\n info,\n status,\n actions,\n suggestion,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getInputTestIds);\n\n const controlProp: {\n value?: string;\n defaultValue?: string;\n } = {};\n\n // Conditionally render component as controlled/uncontrolled\n if (hasProp(props, 'value')) {\n controlProp.value = value ?? '';\n } else if (hasProp(props, 'defaultValue')) {\n controlProp.defaultValue = defaultValue ?? '';\n }\n\n // Forward action placement to FormField instead of exposing it on the native input.\n const Comp = (\n <FormControl\n data-testid={testIds.control}\n ref={ref}\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n status={status}\n hasSuggestion={!!suggestion && status === 'pending'}\n {...controlProp}\n // Disables browser autocomplete\n // Chrome does not respect autocomplete='off'\n // Current consensus is to workaround via random string\n autoComplete='_off'\n {...restProps}\n as={StyledInput}\n className={createClassName('input', className)}\n />\n );\n\n return label ? (\n <FormField\n testId={testIds}\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n actions={actions}\n suggestion={suggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }),\n getInputTestIds\n);\n"]}
@@ -1,2 +1,2 @@
1
- export declare const getInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=Input.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,0LAA4D,CAAC"}
1
+ {"version":3,"file":"Input.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,qMAA4D,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const getLocationInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getLocationInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=Location.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Location.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Location/Location.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,0LAGzB,CAAC"}
1
+ {"version":3,"file":"Location.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Location/Location.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,qMAGzB,CAAC"}
@@ -50,7 +50,7 @@ export interface LocationInputProps extends BaseProps, FormControlProps, TestIdP
50
50
  onError?: (error: Error) => void;
51
51
  }
52
52
  declare const _default: FC<LocationInputProps & ForwardProps> & {
53
- getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
53
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
54
54
  };
55
55
  export default _default;
56
56
  //# sourceMappingURL=LocationInput.d.ts.map
@@ -325,9 +325,9 @@ export const StyleHorizontalBarList = styled.ol(({ showStepNames, theme }) => {
325
325
  });
326
326
  StyleHorizontalBarList.defaultProps = defaultThemeProp;
327
327
  export const StyledHorizontalBarSegment = styled(BareButton)(({ current, completed, clickable, theme }) => {
328
- const { base: { spacing, animation: { speed: animationSpeed, timing: { ease: animationTiming } }, palette: { interactive, 'primary-background': primaryBackground }, shadow: { focus: focusShadow }, 'hit-area': { 'finger-min': touchButtonSize } }, components: { 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }, 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius } } } = theme;
329
- const maxBarHeight = `calc(${spacing} * 1.5)`;
330
- const barHeight = current ? maxBarHeight : spacing;
328
+ const { base: { 'font-size': fontSize, animation: { speed: animationSpeed, timing: { ease: animationTiming } }, palette: { interactive, 'primary-background': primaryBackground }, shadow: { focus: focusShadow }, 'hit-area': { 'finger-min': touchButtonSize } }, components: { 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }, 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius } } } = theme;
329
+ const maxBarHeight = `calc(${fontSize} * 0.75)`;
330
+ const barHeight = current ? maxBarHeight : `calc(${fontSize} * 0.5)`;
331
331
  const hoverBackground = tryCatch(() => lighten(0.1, interactive), () => interactive);
332
332
  return css `
333
333
  position: relative;
@@ -394,8 +394,8 @@ export const StyledVerticalBarWrapper = styled.div(({ theme }) => {
394
394
  });
395
395
  StyledVerticalBarWrapper.defaultProps = defaultThemeProp;
396
396
  export const StyledVerticalBarSegment = styled(BareButton)(({ current, completed, clickable, theme }) => {
397
- const { base: { spacing, animation: { speed: animationSpeed }, palette: { interactive, 'primary-background': primaryBackground }, shadow: { focus: focusShadow }, 'hit-area': { 'finger-min': touchButtonSize } }, components: { 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }, 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius } } } = theme;
398
- const barWidth = current ? `calc(${spacing} * 1.5)` : spacing;
397
+ const { base: { 'font-size': fontSize, animation: { speed: animationSpeed }, palette: { interactive, 'primary-background': primaryBackground }, shadow: { focus: focusShadow }, 'hit-area': { 'finger-min': touchButtonSize } }, components: { 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }, 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius } } } = theme;
398
+ const barWidth = current ? `calc(${fontSize} * 0.75)` : `calc(${fontSize} * 0.5)`;
399
399
  const hoverBackground = tryCatch(() => lighten(0.1, interactive), () => interactive);
400
400
  return css `
401
401
  position: relative;
@@ -1 +1 @@
1
- {"version":3,"file":"FormProgress.styles.js","sourceRoot":"","sources":["../../../src/components/MultiStepForm/FormProgress.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,IAAI,MAAM,SAAS,CAAC;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,CAAC;IAC9D,MAAM,eAAe,GAAG,QAAQ,CAC9B,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,EAC/B,GAAG,EAAE,CAAC,WAAW,CAClB,CAAC;IAEF,OAAO,GAAG,CAAA;;;aAGC,QAAQ;kBACH,wBAAwB;;cAE5B,WAAW;qBACJ,wBAAwB;kBAC3B,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB;;4BAE5C,cAAc;8BACZ,cAAc;;MAEtC,CAAC,OAAO;QACV,GAAG,CAAA;sBACe,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;;;;;KAKtD;;MAEC,SAAS;QACX,GAAG,CAAA;;;QAGC,CAAC,OAAO;YACV,GAAG,CAAA;;wBAEe,eAAe;;OAEhC;KACF;;;oBAGe,WAAW;;;;;;;;;oBASX,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY;;;;;;;;4BAQzC,eAAe,MAAM,QAAQ;;GAEtD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,wBAAwB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, size } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport BareButton from '../Button/BareButton';\nimport Popover from '../Popover';\nimport { StyledText } from '../Text';\nimport { calculateFontSize, type FontSize } from '../../styles';\nimport { useDirection } from '../../hooks';\nimport Flex from '../Flex';\nimport { ellipsisOverflow } from '../../styles/mixins';\n\nimport type { Step } from './MultiStepForm.types';\n\n/** Min width of each step item including labels in ch units */\nexport const stepItemMinWidth = 15;\n\n/** Min width of step marker without labels in ch units */\nexport const stepMarkerMinWidth = 3;\n\n/** Min width of each bar segment in bars mode in ch units */\nexport const stepBarMinWidth = 3;\n\n/** Min height of each vertical bar segment in bars mode */\nexport const stepVerticalBarMinHeight = '2.5rem';\n\nexport const CurrentStepPopover = styled(Popover)`\n max-width: 100%;\n background-color: transparent;\n z-index: 0;\n box-shadow: none;\n animation: none;\n\n & > ${StyledText} {\n ${ellipsisOverflow}\n }\n`;\n\nconst calculateStepMarkerSizes = (fontSize: string, fontScale: string | number) => {\n const { m: stepMarkerSize } = calculateFontSize(fontSize, fontScale);\n return {\n stepMarkerSize,\n smallStepMarkerSize: `calc(${stepMarkerSize} / 1.5)`,\n bigStepMarkerSize: `calc(${stepMarkerSize} * 1.5)`\n };\n};\n\nconst calculateBarTopPadding = (\n fontSize: string,\n fontScale: string | number,\n lineHeight: string\n) => {\n const { bigStepMarkerSize } = calculateStepMarkerSizes(fontSize, fontScale);\n return {\n // assuming the step progress always contains current step marker which is the biggest one,\n // the top padding of the bar should be half of the big step marker size minus line height of the bar\n // to be vertically centered\n stepBarTopPadding: `calc((${bigStepMarkerSize} / 2) - (${lineHeight} / 2))`\n };\n};\n\nexport const StyledBar = styled.div<{ shifted?: boolean }>(({ shifted, theme }) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale },\n components: {\n 'form-control': { 'border-color': borderColor }\n }\n } = theme;\n\n const lineHeight = '0.125rem';\n const { stepBarTopPadding } = calculateBarTopPadding(fontSize, fontScale, lineHeight);\n\n return css`\n position: absolute;\n ${shifted && `inset-block-start: ${stepBarTopPadding};`}\n width: 100%;\n height: ${lineHeight};\n background: ${borderColor};\n\n @media (forced-colors: active) {\n background: CanvasText;\n }\n `;\n});\n\nStyledBar.defaultProps = defaultThemeProp;\n\nexport const StyledFill = styled.div<{ fillScale: number }>(({ fillScale, theme }) => {\n const {\n base: {\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive }\n }\n } = theme;\n\n const { ltr } = useDirection();\n\n const markedLineThicknessFactor = 2;\n\n return css`\n position: absolute;\n width: 100%;\n height: calc(100% * ${markedLineThicknessFactor});\n\n /* top position based on line thickness factor to keep the fill centered */\n top: calc(-50% * (${markedLineThicknessFactor} - 1));\n background: ${interactive};\n transition: all calc(2 * ${animationSpeed}) ${animationTiming};\n transform: scaleX(${fillScale});\n transform-origin: ${ltr ? 0 : '100%'} 0;\n\n @media (forced-colors: active) {\n background: Highlight;\n }\n `;\n});\n\nStyledFill.defaultProps = defaultThemeProp;\n\nexport const StyledFormProgress = styled(Flex)<{ showStepNames?: boolean }>(({\n showStepNames,\n theme\n}) => {\n const {\n base: { spacing, 'font-size': fontSize, 'font-scale': fontScale },\n components: {\n text: {\n h4: { 'font-size': h3fontSize }\n }\n }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n position: relative;\n ${!showStepNames &&\n `padding-block-end: calc(${spacing} + ${fontSizes[h3fontSize as FontSize]} * 1.35);`}\n `;\n});\n\nStyledFormProgress.defaultProps = defaultThemeProp;\n\nexport const StepMarker = styled(BareButton)<{\n current: boolean;\n depth: Step['depth'];\n completed?: Step['completed'];\n clickable?: boolean;\n}>(({ current, depth, completed, clickable, theme }) => {\n const {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'mouse-min': buttonSize, 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }\n }\n } = theme;\n\n const { stepMarkerSize, smallStepMarkerSize, bigStepMarkerSize } = calculateStepMarkerSizes(\n fontSize,\n fontScale\n );\n\n // Determine the actual size for this marker based on its state\n let markerSize = stepMarkerSize;\n if (current) {\n markerSize = bigStepMarkerSize;\n } else if (depth === 1) {\n markerSize = smallStepMarkerSize;\n }\n\n return css`\n position: relative;\n z-index: 1;\n\n /* Fixed container size based on the biggest marker to prevent layout shifts */\n ${size(bigStepMarkerSize)}\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n ${clickable\n ? css`\n border-color: ${interactive};\n `\n : css`\n cursor: default;\n `}\n\n &::before {\n content: '';\n ${size(markerSize)}\n position: absolute;\n border-radius: 100%;\n transition: all calc(2 * ${animationSpeed}) ${animationTiming};\n }\n\n &:focus-visible::before {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n ${!current &&\n css`\n border-color: transparent;\n background: transparent;\n\n &::before {\n background: ${primaryBackground};\n border: calc(2 * ${borderWidth}) solid ${clickable ? interactive : borderColor};\n\n ${completed &&\n css`\n background: ${interactive};\n border-color: ${interactive};\n `}\n\n @media (forced-colors: active) {\n background: ${completed ? 'Highlight' : 'Canvas'};\n border-color: ${clickable ? 'Highlight' : 'CanvasText'};\n }\n }\n `}\n\n ${current &&\n css`\n &::before {\n background: ${interactive};\n\n @media (forced-colors: active) {\n background: Highlight;\n }\n }\n `}\n\n ::after {\n content: '';\n position: absolute;\n ${size(buttonSize)}\n inset-block-start: ${`calc((${buttonSize} - ${bigStepMarkerSize}) / -2) `};\n inset-inline-start: ${`calc((${buttonSize} - ${bigStepMarkerSize}) / -2) `};\n\n @media (pointer: coarse) {\n inset-block-start: ${`calc((${touchButtonSize} - ${bigStepMarkerSize}) / -2) `};\n inset-inline-start: ${`calc((${touchButtonSize} - ${bigStepMarkerSize}) / -2) `};\n ${size(touchButtonSize)}\n }\n }\n `;\n});\n\nStepMarker.defaultProps = defaultThemeProp;\n\nexport const StyleHorizontalStepMarkers = styled.ol<{ showStepNames?: boolean }>(\n ({ showStepNames, theme }) => {\n return css`\n list-style-type: none;\n justify-content: space-between;\n\n li {\n display: flex;\n position: relative;\n flex: 1 1 0;\n\n /* min width changes based on whether step names are shown */\n min-width: ${`${showStepNames ? stepItemMinWidth : stepMarkerMinWidth}ch`};\n font-size: small;\n margin-inline: ${theme.base.spacing};\n flex-direction: column;\n align-items: center;\n text-align: center;\n }\n\n li:first-child,\n li:last-child {\n flex: 0.5 1 0;\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: ${`${showStepNames ? stepItemMinWidth / 2 : stepMarkerMinWidth / 2}ch`};\n }\n\n li:first-child {\n align-items: flex-start;\n text-align: start;\n margin-inline-start: 0;\n padding-inline-start: 0;\n\n ${StepMarker}::before {\n inset-inline-start: 0;\n }\n }\n\n li:last-child {\n align-items: flex-end;\n text-align: end;\n margin-inline-end: 0;\n padding-inline-end: 0;\n\n ${StepMarker}::before {\n inset-inline-end: 0;\n }\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n }\n);\n\nStyleHorizontalStepMarkers.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalStepMarkers = styled.ol`\n list-style-type: none;\n`;\n\nexport const StyledBulletWrapper = styled.div<{\n hasNext: boolean;\n prior: boolean;\n}>(({ theme, hasNext, prior }) => {\n const {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n animation: { speed: animationSpeed },\n palette: { interactive }\n },\n components: {\n 'form-control': { 'border-color': borderColor }\n }\n } = theme;\n\n const baseLineWidth = '0.125rem';\n const lineWidth = prior ? `calc(2 * ${baseLineWidth})` : baseLineWidth;\n\n const { bigStepMarkerSize } = calculateStepMarkerSizes(fontSize, fontScale);\n\n return css`\n position: relative;\n min-width: 2rem;\n\n ${hasNext &&\n css`\n &::after {\n content: '';\n position: absolute;\n\n /* Center the line horizontally and vertically relative to the step marker */\n inset-block-start: calc(${bigStepMarkerSize});\n inset-inline-start: calc(50% - (${lineWidth} / 2));\n width: ${lineWidth};\n height: 100%;\n background: ${prior ? interactive : borderColor};\n transition: background calc(2 * ${animationSpeed});\n\n @media (forced-colors: active) {\n background: ${prior ? 'Highlight' : 'CanvasText'};\n }\n }\n `}\n `;\n});\n\nStyledBulletWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledStepText = styled.div(({ theme }) => {\n return css`\n padding-block: ${theme.base.spacing};\n overflow-wrap: break-word;\n `;\n});\n\nStyledStepText.defaultProps = defaultThemeProp;\n\nexport const StyledHorizontalStepText = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding-block: ${theme.base.spacing};\n overflow-wrap: break-word;\n min-width: inherit;\n font-size: ${fontSize.xxs};\n text-align: inherit;\n `;\n});\n\nStyledHorizontalStepText.defaultProps = defaultThemeProp;\n\nexport const StyleHorizontalBarList = styled.ol<{ showStepNames?: boolean }>(\n ({ showStepNames, theme }) => {\n return css`\n list-style-type: none;\n\n li {\n display: flex;\n position: relative;\n flex: 1 1 0;\n min-width: ${`${showStepNames ? stepItemMinWidth : stepBarMinWidth}ch`};\n flex-direction: column;\n align-items: stretch;\n text-align: center;\n }\n\n li:first-child {\n text-align: start;\n }\n\n li:last-child {\n text-align: end;\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n }\n);\n\nStyleHorizontalBarList.defaultProps = defaultThemeProp;\n\nexport const StyledHorizontalBarSegment = styled(BareButton)<{\n current: boolean;\n completed?: boolean;\n clickable?: boolean;\n}>(({ current, completed, clickable, theme }) => {\n const {\n base: {\n spacing,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth },\n 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius }\n }\n } = theme;\n\n const maxBarHeight = `calc(${spacing} * 1.5)`;\n const barHeight = current ? maxBarHeight : spacing;\n const hoverBackground = tryCatch(\n () => lighten(0.1, interactive),\n () => interactive\n );\n\n return css`\n position: relative;\n display: block;\n width: 100%;\n height: ${barHeight};\n margin-block: calc((${maxBarHeight} - ${barHeight}) / 2);\n border: ${borderWidth} solid transparent;\n border-radius: ${barIndicatorBorderRadius};\n background: ${current || completed ? interactive : primaryBackground};\n transition:\n background calc(2 * ${animationSpeed}) ${animationTiming},\n border-color calc(2 * ${animationSpeed}) ${animationTiming};\n\n ${!current &&\n css`\n border-color: ${clickable ? interactive : borderColor};\n\n @media (forced-colors: active) {\n border-color: Highlight;\n }\n `}\n\n ${clickable &&\n css`\n cursor: pointer;\n\n ${!current &&\n css`\n &:hover {\n background: ${hoverBackground};\n }\n `}\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n @media (forced-colors: active) {\n background: ${current || completed ? 'Highlight' : 'CanvasText'};\n }\n\n /* Touch hit-area expansion without affecting layout */\n &::after {\n content: '';\n position: absolute;\n inset-block: calc((${touchButtonSize} - ${barHeight}) / -2);\n inset-inline: 0;\n }\n `;\n});\n\nStyledHorizontalBarSegment.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalBarWrapper = styled.div(({ theme }) => {\n return css`\n min-width: 2rem;\n padding-block: calc(${theme.base.spacing} / 2);\n `;\n});\n\nStyledVerticalBarWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalBarSegment = styled(BareButton)<{\n current: boolean;\n completed?: boolean;\n clickable?: boolean;\n}>(({ current, completed, clickable, theme }) => {\n const {\n base: {\n spacing,\n animation: { speed: animationSpeed },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth },\n 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius }\n }\n } = theme;\n\n const barWidth = current ? `calc(${spacing} * 1.5)` : spacing;\n const hoverBackground = tryCatch(\n () => lighten(0.1, interactive),\n () => interactive\n );\n\n return css`\n position: relative;\n display: block;\n width: ${barWidth};\n min-height: ${stepVerticalBarMinHeight};\n flex: 1 1 0;\n border: ${borderWidth} solid transparent;\n border-radius: ${barIndicatorBorderRadius};\n background: ${current || completed ? interactive : primaryBackground};\n transition:\n background calc(2 * ${animationSpeed}),\n border-color calc(2 * ${animationSpeed});\n\n ${!current &&\n css`\n border-color: ${clickable ? interactive : borderColor};\n\n @media (forced-colors: active) {\n border-color: Highlight;\n }\n `}\n\n ${clickable &&\n css`\n cursor: pointer;\n\n ${!current &&\n css`\n &:hover {\n background: ${hoverBackground};\n }\n `}\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n @media (forced-colors: active) {\n background: ${current || completed ? 'Highlight' : 'CanvasText'};\n }\n\n /* Touch hit-area expansion without affecting layout */\n &::after {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline: calc((${touchButtonSize} - ${barWidth}) / -2);\n }\n `;\n});\n\nStyledVerticalBarSegment.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"FormProgress.styles.js","sourceRoot":"","sources":["../../../src/components/MultiStepForm/FormProgress.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAA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AE,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,EAC/B,GAAG,EAAE,CAAC,WAAW,CAClB,CAAC;IAEF,OAAO,GAAG,CAAA;;;aAGC,QAAQ;kBACH,wBAAwB;;cAE5B,WAAW;qBACJ,wBAAwB;kBAC3B,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB;;4BAE5C,cAAc;8BACZ,cAAc;;MAEtC,CAAC,OAAO;QACV,GAAG,CAAA;sBACe,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;;;;;KAKtD;;MAEC,SAAS;QACX,GAAG,CAAA;;;QAGC,CAAC,OAAO;YACV,GAAG,CAAA;;wBAEe,eAAe;;OAEhC;KACF;;;oBAGe,WAAW;;;;;;;;;oBASX,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY;;;;;;;;4BAQzC,eAAe,MAAM,QAAQ;;GAEtD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,wBAAwB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, size } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport BareButton from '../Button/BareButton';\nimport Popover from '../Popover';\nimport { StyledText } from '../Text';\nimport { calculateFontSize, type FontSize } from '../../styles';\nimport { useDirection } from '../../hooks';\nimport Flex from '../Flex';\nimport { ellipsisOverflow } from '../../styles/mixins';\n\nimport type { Step } from './MultiStepForm.types';\n\n/** Min width of each step item including labels in ch units */\nexport const stepItemMinWidth = 15;\n\n/** Min width of step marker without labels in ch units */\nexport const stepMarkerMinWidth = 3;\n\n/** Min width of each bar segment in bars mode in ch units */\nexport const stepBarMinWidth = 3;\n\n/** Min height of each vertical bar segment in bars mode */\nexport const stepVerticalBarMinHeight = '2.5rem';\n\nexport const CurrentStepPopover = styled(Popover)`\n max-width: 100%;\n background-color: transparent;\n z-index: 0;\n box-shadow: none;\n animation: none;\n\n & > ${StyledText} {\n ${ellipsisOverflow}\n }\n`;\n\nconst calculateStepMarkerSizes = (fontSize: string, fontScale: string | number) => {\n const { m: stepMarkerSize } = calculateFontSize(fontSize, fontScale);\n return {\n stepMarkerSize,\n smallStepMarkerSize: `calc(${stepMarkerSize} / 1.5)`,\n bigStepMarkerSize: `calc(${stepMarkerSize} * 1.5)`\n };\n};\n\nconst calculateBarTopPadding = (\n fontSize: string,\n fontScale: string | number,\n lineHeight: string\n) => {\n const { bigStepMarkerSize } = calculateStepMarkerSizes(fontSize, fontScale);\n return {\n // assuming the step progress always contains current step marker which is the biggest one,\n // the top padding of the bar should be half of the big step marker size minus line height of the bar\n // to be vertically centered\n stepBarTopPadding: `calc((${bigStepMarkerSize} / 2) - (${lineHeight} / 2))`\n };\n};\n\nexport const StyledBar = styled.div<{ shifted?: boolean }>(({ shifted, theme }) => {\n const {\n base: { 'font-size': fontSize, 'font-scale': fontScale },\n components: {\n 'form-control': { 'border-color': borderColor }\n }\n } = theme;\n\n const lineHeight = '0.125rem';\n const { stepBarTopPadding } = calculateBarTopPadding(fontSize, fontScale, lineHeight);\n\n return css`\n position: absolute;\n ${shifted && `inset-block-start: ${stepBarTopPadding};`}\n width: 100%;\n height: ${lineHeight};\n background: ${borderColor};\n\n @media (forced-colors: active) {\n background: CanvasText;\n }\n `;\n});\n\nStyledBar.defaultProps = defaultThemeProp;\n\nexport const StyledFill = styled.div<{ fillScale: number }>(({ fillScale, theme }) => {\n const {\n base: {\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive }\n }\n } = theme;\n\n const { ltr } = useDirection();\n\n const markedLineThicknessFactor = 2;\n\n return css`\n position: absolute;\n width: 100%;\n height: calc(100% * ${markedLineThicknessFactor});\n\n /* top position based on line thickness factor to keep the fill centered */\n top: calc(-50% * (${markedLineThicknessFactor} - 1));\n background: ${interactive};\n transition: all calc(2 * ${animationSpeed}) ${animationTiming};\n transform: scaleX(${fillScale});\n transform-origin: ${ltr ? 0 : '100%'} 0;\n\n @media (forced-colors: active) {\n background: Highlight;\n }\n `;\n});\n\nStyledFill.defaultProps = defaultThemeProp;\n\nexport const StyledFormProgress = styled(Flex)<{ showStepNames?: boolean }>(({\n showStepNames,\n theme\n}) => {\n const {\n base: { spacing, 'font-size': fontSize, 'font-scale': fontScale },\n components: {\n text: {\n h4: { 'font-size': h3fontSize }\n }\n }\n } = theme;\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n position: relative;\n ${!showStepNames &&\n `padding-block-end: calc(${spacing} + ${fontSizes[h3fontSize as FontSize]} * 1.35);`}\n `;\n});\n\nStyledFormProgress.defaultProps = defaultThemeProp;\n\nexport const StepMarker = styled(BareButton)<{\n current: boolean;\n depth: Step['depth'];\n completed?: Step['completed'];\n clickable?: boolean;\n}>(({ current, depth, completed, clickable, theme }) => {\n const {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'mouse-min': buttonSize, 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth }\n }\n } = theme;\n\n const { stepMarkerSize, smallStepMarkerSize, bigStepMarkerSize } = calculateStepMarkerSizes(\n fontSize,\n fontScale\n );\n\n // Determine the actual size for this marker based on its state\n let markerSize = stepMarkerSize;\n if (current) {\n markerSize = bigStepMarkerSize;\n } else if (depth === 1) {\n markerSize = smallStepMarkerSize;\n }\n\n return css`\n position: relative;\n z-index: 1;\n\n /* Fixed container size based on the biggest marker to prevent layout shifts */\n ${size(bigStepMarkerSize)}\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n ${clickable\n ? css`\n border-color: ${interactive};\n `\n : css`\n cursor: default;\n `}\n\n &::before {\n content: '';\n ${size(markerSize)}\n position: absolute;\n border-radius: 100%;\n transition: all calc(2 * ${animationSpeed}) ${animationTiming};\n }\n\n &:focus-visible::before {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n ${!current &&\n css`\n border-color: transparent;\n background: transparent;\n\n &::before {\n background: ${primaryBackground};\n border: calc(2 * ${borderWidth}) solid ${clickable ? interactive : borderColor};\n\n ${completed &&\n css`\n background: ${interactive};\n border-color: ${interactive};\n `}\n\n @media (forced-colors: active) {\n background: ${completed ? 'Highlight' : 'Canvas'};\n border-color: ${clickable ? 'Highlight' : 'CanvasText'};\n }\n }\n `}\n\n ${current &&\n css`\n &::before {\n background: ${interactive};\n\n @media (forced-colors: active) {\n background: Highlight;\n }\n }\n `}\n\n ::after {\n content: '';\n position: absolute;\n ${size(buttonSize)}\n inset-block-start: ${`calc((${buttonSize} - ${bigStepMarkerSize}) / -2) `};\n inset-inline-start: ${`calc((${buttonSize} - ${bigStepMarkerSize}) / -2) `};\n\n @media (pointer: coarse) {\n inset-block-start: ${`calc((${touchButtonSize} - ${bigStepMarkerSize}) / -2) `};\n inset-inline-start: ${`calc((${touchButtonSize} - ${bigStepMarkerSize}) / -2) `};\n ${size(touchButtonSize)}\n }\n }\n `;\n});\n\nStepMarker.defaultProps = defaultThemeProp;\n\nexport const StyleHorizontalStepMarkers = styled.ol<{ showStepNames?: boolean }>(\n ({ showStepNames, theme }) => {\n return css`\n list-style-type: none;\n justify-content: space-between;\n\n li {\n display: flex;\n position: relative;\n flex: 1 1 0;\n\n /* min width changes based on whether step names are shown */\n min-width: ${`${showStepNames ? stepItemMinWidth : stepMarkerMinWidth}ch`};\n font-size: small;\n margin-inline: ${theme.base.spacing};\n flex-direction: column;\n align-items: center;\n text-align: center;\n }\n\n li:first-child,\n li:last-child {\n flex: 0.5 1 0;\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: ${`${showStepNames ? stepItemMinWidth / 2 : stepMarkerMinWidth / 2}ch`};\n }\n\n li:first-child {\n align-items: flex-start;\n text-align: start;\n margin-inline-start: 0;\n padding-inline-start: 0;\n\n ${StepMarker}::before {\n inset-inline-start: 0;\n }\n }\n\n li:last-child {\n align-items: flex-end;\n text-align: end;\n margin-inline-end: 0;\n padding-inline-end: 0;\n\n ${StepMarker}::before {\n inset-inline-end: 0;\n }\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n }\n);\n\nStyleHorizontalStepMarkers.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalStepMarkers = styled.ol`\n list-style-type: none;\n`;\n\nexport const StyledBulletWrapper = styled.div<{\n hasNext: boolean;\n prior: boolean;\n}>(({ theme, hasNext, prior }) => {\n const {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n animation: { speed: animationSpeed },\n palette: { interactive }\n },\n components: {\n 'form-control': { 'border-color': borderColor }\n }\n } = theme;\n\n const baseLineWidth = '0.125rem';\n const lineWidth = prior ? `calc(2 * ${baseLineWidth})` : baseLineWidth;\n\n const { bigStepMarkerSize } = calculateStepMarkerSizes(fontSize, fontScale);\n\n return css`\n position: relative;\n min-width: 2rem;\n\n ${hasNext &&\n css`\n &::after {\n content: '';\n position: absolute;\n\n /* Center the line horizontally and vertically relative to the step marker */\n inset-block-start: calc(${bigStepMarkerSize});\n inset-inline-start: calc(50% - (${lineWidth} / 2));\n width: ${lineWidth};\n height: 100%;\n background: ${prior ? interactive : borderColor};\n transition: background calc(2 * ${animationSpeed});\n\n @media (forced-colors: active) {\n background: ${prior ? 'Highlight' : 'CanvasText'};\n }\n }\n `}\n `;\n});\n\nStyledBulletWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledStepText = styled.div(({ theme }) => {\n return css`\n padding-block: ${theme.base.spacing};\n overflow-wrap: break-word;\n `;\n});\n\nStyledStepText.defaultProps = defaultThemeProp;\n\nexport const StyledHorizontalStepText = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding-block: ${theme.base.spacing};\n overflow-wrap: break-word;\n min-width: inherit;\n font-size: ${fontSize.xxs};\n text-align: inherit;\n `;\n});\n\nStyledHorizontalStepText.defaultProps = defaultThemeProp;\n\nexport const StyleHorizontalBarList = styled.ol<{ showStepNames?: boolean }>(\n ({ showStepNames, theme }) => {\n return css`\n list-style-type: none;\n\n li {\n display: flex;\n position: relative;\n flex: 1 1 0;\n min-width: ${`${showStepNames ? stepItemMinWidth : stepBarMinWidth}ch`};\n flex-direction: column;\n align-items: stretch;\n text-align: center;\n }\n\n li:first-child {\n text-align: start;\n }\n\n li:last-child {\n text-align: end;\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n }\n);\n\nStyleHorizontalBarList.defaultProps = defaultThemeProp;\n\nexport const StyledHorizontalBarSegment = styled(BareButton)<{\n current: boolean;\n completed?: boolean;\n clickable?: boolean;\n}>(({ current, completed, clickable, theme }) => {\n const {\n base: {\n 'font-size': fontSize,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth },\n 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius }\n }\n } = theme;\n\n const maxBarHeight = `calc(${fontSize} * 0.75)`;\n const barHeight = current ? maxBarHeight : `calc(${fontSize} * 0.5)`;\n const hoverBackground = tryCatch(\n () => lighten(0.1, interactive),\n () => interactive\n );\n\n return css`\n position: relative;\n display: block;\n width: 100%;\n height: ${barHeight};\n margin-block: calc((${maxBarHeight} - ${barHeight}) / 2);\n border: ${borderWidth} solid transparent;\n border-radius: ${barIndicatorBorderRadius};\n background: ${current || completed ? interactive : primaryBackground};\n transition:\n background calc(2 * ${animationSpeed}) ${animationTiming},\n border-color calc(2 * ${animationSpeed}) ${animationTiming};\n\n ${!current &&\n css`\n border-color: ${clickable ? interactive : borderColor};\n\n @media (forced-colors: active) {\n border-color: Highlight;\n }\n `}\n\n ${clickable &&\n css`\n cursor: pointer;\n\n ${!current &&\n css`\n &:hover {\n background: ${hoverBackground};\n }\n `}\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n @media (forced-colors: active) {\n background: ${current || completed ? 'Highlight' : 'CanvasText'};\n }\n\n /* Touch hit-area expansion without affecting layout */\n &::after {\n content: '';\n position: absolute;\n inset-block: calc((${touchButtonSize} - ${barHeight}) / -2);\n inset-inline: 0;\n }\n `;\n});\n\nStyledHorizontalBarSegment.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalBarWrapper = styled.div(({ theme }) => {\n return css`\n min-width: 2rem;\n padding-block: calc(${theme.base.spacing} / 2);\n `;\n});\n\nStyledVerticalBarWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledVerticalBarSegment = styled(BareButton)<{\n current: boolean;\n completed?: boolean;\n clickable?: boolean;\n}>(({ current, completed, clickable, theme }) => {\n const {\n base: {\n 'font-size': fontSize,\n animation: { speed: animationSpeed },\n palette: { interactive, 'primary-background': primaryBackground },\n shadow: { focus: focusShadow },\n 'hit-area': { 'finger-min': touchButtonSize }\n },\n components: {\n 'form-control': { 'border-color': borderColor, 'border-width': borderWidth },\n 'multi-step-form': { 'bar-indicator-border-radius': barIndicatorBorderRadius }\n }\n } = theme;\n\n const barWidth = current ? `calc(${fontSize} * 0.75)` : `calc(${fontSize} * 0.5)`;\n const hoverBackground = tryCatch(\n () => lighten(0.1, interactive),\n () => interactive\n );\n\n return css`\n position: relative;\n display: block;\n width: ${barWidth};\n min-height: ${stepVerticalBarMinHeight};\n flex: 1 1 0;\n border: ${borderWidth} solid transparent;\n border-radius: ${barIndicatorBorderRadius};\n background: ${current || completed ? interactive : primaryBackground};\n transition:\n background calc(2 * ${animationSpeed}),\n border-color calc(2 * ${animationSpeed});\n\n ${!current &&\n css`\n border-color: ${clickable ? interactive : borderColor};\n\n @media (forced-colors: active) {\n border-color: Highlight;\n }\n `}\n\n ${clickable &&\n css`\n cursor: pointer;\n\n ${!current &&\n css`\n &:hover {\n background: ${hoverBackground};\n }\n `}\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n @media (forced-colors: active) {\n background: ${current || completed ? 'Highlight' : 'CanvasText'};\n }\n\n /* Touch hit-area expansion without affecting layout */\n &::after {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline: calc((${touchButtonSize} - ${barWidth}) / -2);\n }\n `;\n});\n\nStyledVerticalBarSegment.defaultProps = defaultThemeProp;\n"]}
@@ -1,3 +1,3 @@
1
- export declare const getNumberInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "plus", "minus", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
2
- export declare const getNumberRangeTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["min", "max", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getNumberInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "plus", "minus", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
2
+ export declare const getNumberRangeTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["min", "max", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
3
3
  //# sourceMappingURL=Number.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Number.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Number/Number.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,2MAKvB,CAAC;AAEZ,eAAO,MAAM,qBAAqB,6LAIvB,CAAC"}
1
+ {"version":3,"file":"Number.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Number/Number.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,sNAKvB,CAAC;AAEZ,eAAO,MAAM,qBAAqB,wMAIvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { NumberInputProps } from './NumberInput.types';
2
2
  declare const _default: import("react").ForwardRefExoticComponent<Omit<NumberInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>> & {
3
- getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "plus", "minus", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
3
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "plus", "minus", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
4
4
  };
5
5
  export default _default;
6
6
  //# sourceMappingURL=NumberInput.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { NumberRangeInputProps } from './NumberInput.types';
2
2
  declare const _default: import("react").ForwardRefExoticComponent<Omit<NumberRangeInputProps, "ref"> & import("react").RefAttributes<HTMLFieldSetElement>> & {
3
- getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["min", "max", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
3
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["min", "max", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
4
4
  };
5
5
  export default _default;
6
6
  //# sourceMappingURL=NumberRangeInput.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const getPhoneInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "country-code", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getPhoneInputTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "country-code", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=Phone.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Phone.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Phone/Phone.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,0MAItB,CAAC"}
1
+ {"version":3,"file":"Phone.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Phone/Phone.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,qNAItB,CAAC"}
@@ -32,7 +32,7 @@ export interface PhoneInputProps extends FormControlProps, BaseProps, NoChildren
32
32
  autoComplete?: AutoFillTel;
33
33
  }
34
34
  declare const _default: ForwardRefForwardPropsComponent<PhoneInputProps> & {
35
- getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "country-code", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
35
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "country-code", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
36
36
  };
37
37
  export default _default;
38
38
  //# sourceMappingURL=PhoneInput.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { RadioCheckProps } from '../RadioCheck';
2
2
  export type RadioButtonProps = Omit<RadioCheckProps, 'type'>;
3
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<RadioButtonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>> & {
4
- getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
4
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
5
5
  };
6
6
  export default _default;
7
7
  //# sourceMappingURL=RadioButton.d.ts.map
@@ -1,3 +1,3 @@
1
- export declare const getRadioButtonTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getRadioButtonTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
2
2
  export declare const getRadioButtonCardTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["control", "content", "image", "label", "actions"]>;
3
3
  //# sourceMappingURL=RadioButton.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.test-ids.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,0LAGvB,CAAC;AAEZ,eAAO,MAAM,yBAAyB,oJAG3B,CAAC"}
1
+ {"version":3,"file":"RadioButton.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.test-ids.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,qMAGvB,CAAC;AAEZ,eAAO,MAAM,yBAAyB,oJAG3B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { RadioCheckGroupProps } from '../RadioCheckGroup';
2
- export type RadioButtonGroupProps = Omit<RadioCheckGroupProps, 'arrowNavigation'>;
2
+ export type RadioButtonGroupProps = Omit<RadioCheckGroupProps, 'arrowNavigation' | 'selectAll'>;
3
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<RadioButtonGroupProps, "ref"> & import("react").RefAttributes<HTMLElement>> & {
4
- getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
4
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["label", "info", "additional-info", "actions", "suggestion-accept", "suggestion-reject"]>;
5
5
  };
6
6
  export default _default;
7
7
  //# sourceMappingURL=RadioButtonGroup.d.ts.map