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IACC,SAAC5E,MAAG,CAACxE,UAAWQ,IAAWC,IAAAA,OAAeA,IAAAA,uB,SACvC2I,c,mCC5JjB,IAEO,E,yCAAKvK,GAAAA,EACF,SAAG,WADDA,EAEL,MAAG,QAFEA,EAGG,cAAG,YAHNA,EAIG,cAAG,Y,CAJNA,IAAAA,EAAQ,M,mCCFpB,IAEO,E,yCAAKyG,GAAAA,EACN,KAAG,OADGA,EAEF,SAAG,WAFDA,EAGL,MAAG,QAHEA,EAIJ,OAAG,SAJCA,EAKF,SAAG,WALDA,EAMF,SAAG,WANDA,EAOA,WAAG,a,CAPHA,IAAAA,EAAa,M,kBCDzByE,EAAOC,QAAU,CAAC,UAAY,+BAA+B,eAAiB,oCAAoC,UAAY,+BAA+B,aAAe,oC,gBCA5KD,EAAOC,QAAU,CAAC,UAAY,4BAA4B,SAAW,2BAA2B,MAAQ,wBAAwB,SAAW,2BAA2B,UAAY,4BAA4B,kBAAoB,sC,kBCAlOD,EAAOC,QAAU,CAAC,UAAY,yBAAyB,WAAa,0BAA0B,SAAW,wBAAwB,MAAQ,qBAAqB,QAAU,uBAAuB,QAAU,uBAAuB,KAAO,oBAAoB,MAAQ,qBAAqB,SAAW,wBAAwB,eAAiB,8BAA8B,gBAAkB,+BAA+B,eAAiB,8BAA8B,MAAQ,qBAAqB,eAAiB,8BAA8B,sBAAwB,qCAAqC,OAAS,sBAAsB,OAAS,wB,kBCA3nBD,EAAOC,QAAU,CAAC,UAAY,0B,kBCA9BD,EAAOC,QAAU,CAAC,WAAa,yBAAyB,SAAW,yB,kBCAnED,EAAOC,QAAU,CAAC,UAAY,4BAA4B,SAAW,2BAA2B,MAAQ,wBAAwB,QAAU,0BAA0B,QAAU,0BAA0B,KAAO,uBAAuB,MAAQ,wBAAwB,MAAQ","sources":["webpack://_N_E/./src/components/dls/Forms/StarRating/Root.tsx","webpack://_N_E/./src/components/FormBuilder/buildReactHookFormRules.ts","webpack://_N_E/./public/icons/star.svg","webpack://_N_E/./public/icons/star_filled.svg","webpack://_N_E/./src/components/dls/Forms/TextArea/index.tsx","webpack://_N_E/./src/components/dls/Forms/StarRating/Star.tsx","webpack://_N_E/./src/components/dls/Forms/StarRating/index.tsx","webpack://_N_E/./src/components/FormBuilder/FormBuilder.tsx","webpack://_N_E/./public/icons/divider-horizontal.svg","webpack://_N_E/./public/icons/tick.svg","webpack://_N_E/./src/components/dls/Forms/Checkbox/Checkbox.tsx","webpack://_N_E/./src/components/dls/Forms/Input/index.tsx","webpack://_N_E/./types/FieldRule.ts","webpack://_N_E/./types/FormField.ts","webpack://_N_E/./src/components/FormBuilder/FormBuilder.module.scss","webpack://_N_E/./src/components/dls/Forms/Checkbox/Checkbox.module.scss","webpack://_N_E/./src/components/dls/Forms/Input/Input.module.scss","webpack://_N_E/./src/components/dls/Forms/StarRating/Root.module.scss","webpack://_N_E/./src/components/dls/Forms/StarRating/Star.module.scss","webpack://_N_E/./src/components/dls/Forms/TextArea/TextArea.module.scss"],"sourcesContent":["import React from 'react';\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport classNames from 'classnames';\n\nimport styles from './Root.module.scss';\n\nimport useDirection from '@/hooks/useDirection';\nimport { Direction } from '@/utils/locale';\n\nexport enum RadioRootOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\nexport interface Props {\n label?: string | JSX.Element;\n defaultValue?: string;\n onChange?: (value: string) => void;\n value?: string;\n name?: string;\n required?: boolean;\n className?: string;\n children?: React.ReactNode;\n}\n\nconst Root: React.FC<Props> = ({\n className,\n onChange,\n defaultValue,\n value,\n name,\n required,\n children,\n}) => {\n const direction = useDirection();\n\n return (\n <RadioGroupPrimitive.Root\n className={classNames(styles.container, className)}\n dir={direction as Direction}\n {...(onChange && { onValueChange: onChange })}\n {...(defaultValue && { defaultValue })}\n {...(value && { value })}\n {...(name && { name })}\n {...(required && { required })}\n >\n {children}\n </RadioGroupPrimitive.Root>\n );\n};\n\nexport default Root;\n","/* eslint-disable react-func/max-lines-per-function */\nimport { UseControllerProps } from 'react-hook-form';\n\nimport { FormBuilderFormField } from './FormBuilderTypes';\n\nimport { RuleType } from 'types/FieldRule';\n\n/**\n * 1) Check if the formField contains a `required` rule. If so, add a `required` rule to the React Hook Form rules\n * 2) Check if the formField contains `regex` rule. If so, try to test the regex against the `value` one by one\n * if one of test regex test fails, return the error message\n *\n * Note: The error message returned by this function is already translated using `t(validation.$errorId)`\n *\n * @param {FormField} formField\n * @returns {UseControllerProps['rules']} rules\n */\nconst buildReactHookFormRules = (formField: FormBuilderFormField) => {\n const rules: UseControllerProps['rules'] = {};\n\n const requiredRule = formField.rules?.find(\n (rule) => rule.type === RuleType.Required && rule.value === true,\n );\n\n // if contains a rule with type `required`\n if (requiredRule) {\n rules.required = {\n message: requiredRule.errorMessage,\n value: true,\n };\n }\n\n const maximumLengthRule = formField.rules?.find((rule) => rule.type === RuleType.MaximumLength);\n if (maximumLengthRule) {\n rules.maxLength = {\n message: maximumLengthRule.errorMessage,\n value: maximumLengthRule.value as number,\n };\n }\n\n const minimumLength = formField.rules?.find((rule) => rule.type === RuleType.MinimumLength);\n if (minimumLength) {\n rules.minLength = {\n message: minimumLength.errorMessage,\n value: minimumLength.value as number,\n };\n }\n\n const regexValidations = formField.rules?.filter((rule) => rule.type === RuleType.Regex);\n\n // if contains a rule with type `regex`\n if (regexValidations && regexValidations.length > 0) {\n rules.validate = {\n regex: (value) => {\n const failedRule = regexValidations.find((rule) => {\n const regex = new RegExp(rule.value as string);\n const isTestSucceed = regex.test(value);\n return !isTestSucceed;\n });\n\n if (failedRule) return failedRule.errorMessage;\n\n return null;\n },\n };\n }\n\n return rules;\n};\n\nexport default buildReactHookFormRules;\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgStar = function SvgStar(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m6.98 1.252-.022.05L5.588 4.6a.3.3 0 0 1-.253.184l-3.561.286-.055.004-.331.027-.3.024a.3.3 0 0 0-.172.527l.23.196.252.216.041.036 2.713 2.324a.3.3 0 0 1 .097.297l-.83 3.475-.012.053-.077.323-.07.294a.3.3 0 0 0 .448.326l.258-.158.284-.173.046-.028 3.049-1.863a.3.3 0 0 1 .312 0l3.049 1.863.046.028.284.173.258.158a.3.3 0 0 0 .448-.326l-.07-.293-.077-.324-.013-.053-.829-3.475a.3.3 0 0 1 .097-.297L13.562 6.1l.041-.036.253-.216.23-.196a.3.3 0 0 0-.172-.527l-.3-.024-.332-.027-.055-.004-3.56-.286a.3.3 0 0 1-.254-.184L8.042 1.302l-.021-.05-.128-.307-.116-.279a.3.3 0 0 0-.554 0l-.116.279-.128.307Zm.52 1.352-.99 2.38a1.3 1.3 0 0 1-1.096.797l-2.57.206 1.958 1.677a1.3 1.3 0 0 1 .418 1.29l-.598 2.507 2.2-1.344a1.3 1.3 0 0 1 1.356 0l2.2 1.344-.598-2.508a1.3 1.3 0 0 1 .418-1.289l1.958-1.677-2.57-.206a1.3 1.3 0 0 1-1.096-.797l-.99-2.38Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgStar;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgStarFilled = function SvgStarFilled(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.223.666a.3.3 0 0 1 .554 0L9.413 4.6a.3.3 0 0 0 .253.184l4.248.34a.3.3 0 0 1 .171.528L10.85 8.424a.3.3 0 0 0-.097.297l.99 4.145a.3.3 0 0 1-.45.326L7.657 10.97a.3.3 0 0 0-.312 0l-3.637 2.222a.3.3 0 0 1-.448-.326l.989-4.145a.3.3 0 0 0-.097-.297L.915 5.652a.3.3 0 0 1 .171-.527l4.248-.34a.3.3 0 0 0 .253-.185L7.223.666Z\",\n fill: \"currentColor\"\n })));\n};\nexport default SvgStarFilled;","import React, { useState, useEffect, ChangeEvent, RefObject } from 'react';\n\nimport classNames from 'classnames';\n\nimport styles from './TextArea.module.scss';\n\nexport enum TextAreaSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\n\nconst SIZE_TO_COLS = {\n [TextAreaSize.Small]: 5,\n [TextAreaSize.Medium]: 10,\n [TextAreaSize.Large]: 25,\n};\n\nexport enum TextAreaType {\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n}\n\nexport enum TextAreaVariant {\n Default = 'default',\n Main = 'main',\n}\ninterface Props {\n id: string;\n name?: string;\n placeholder?: string;\n fieldSetLegend?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n value?: string;\n label?: string | JSX.Element;\n type?: TextAreaType;\n size?: TextAreaSize;\n shouldFlipOnRTL?: boolean;\n variant?: TextAreaVariant;\n containerClassName?: string;\n isRequired?: boolean;\n inputRef?: RefObject<HTMLTextAreaElement>;\n}\n\nconst TextArea: React.FC<Props> = ({\n id,\n name,\n label,\n placeholder,\n disabled = false,\n type,\n variant,\n onChange,\n value = '',\n shouldFlipOnRTL = true,\n containerClassName,\n isRequired,\n inputRef,\n size = TextAreaSize.Medium,\n fieldSetLegend = null,\n}) => {\n const [inputValue, setTextAreaValue] = useState(value);\n // listen to any change in value in-case the value gets populated after an API call.\n useEffect(() => {\n setTextAreaValue(value);\n }, [value]);\n\n const onValueChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n const newValue = event.target.value;\n setTextAreaValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n\n const content = (\n <>\n {label && <p className={styles.label}>{label}</p>}\n <div\n className={classNames(styles.container, containerClassName, {\n [styles.disabled]: disabled,\n [styles.error]: type === TextAreaType.Error,\n [styles.success]: type === TextAreaType.Success,\n [styles.warning]: type === TextAreaType.Warning,\n [styles.main]: variant === TextAreaVariant.Main,\n })}\n >\n <textarea\n className={classNames(styles.input, {\n [styles.error]: type === TextAreaType.Error,\n [styles.success]: type === TextAreaType.Success,\n [styles.warning]: type === TextAreaType.Warning,\n [styles.rtlTextArea]: shouldFlipOnRTL,\n })}\n required={isRequired}\n dir=\"auto\"\n id={id}\n rows={SIZE_TO_COLS[size]}\n ref={inputRef}\n disabled={disabled}\n onChange={onValueChange}\n value={inputValue}\n {...(placeholder && { placeholder })}\n {...(name && { name })}\n />\n </div>\n </>\n );\n\n if (fieldSetLegend) {\n return (\n <fieldset>\n <legend> {fieldSetLegend} </legend>\n {content}\n </fieldset>\n );\n }\n\n return content;\n};\n\nexport default TextArea;\n","import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport classNames from 'classnames';\n\nimport styles from './Star.module.scss';\n\nimport StarIcon from '@/icons/star.svg';\nimport StarFilledIcon from '@/icons/star_filled.svg';\n\ninterface Props extends RadioGroupPrimitive.RadioGroupItemProps {\n currentValue: string;\n}\n\nconst Star: React.FC<Props> = ({ className, ...props }) => {\n const { value, currentValue } = props;\n const starValue = Number(value);\n const isCurrentStarSelected = starValue <= Number(currentValue);\n return (\n <RadioGroupPrimitive.Item\n className={classNames(styles.starButton, className, {\n [styles.selected]: isCurrentStarSelected,\n })}\n {...props}\n >\n <VisuallyHidden>{`${starValue} ${starValue === 1 ? 'star' : 'stars'}`}</VisuallyHidden>\n {isCurrentStarSelected ? (\n <StarFilledIcon width=\"30\" height=\"30\" />\n ) : (\n <StarIcon width=\"30\" height=\"30\" />\n )}\n </RadioGroupPrimitive.Item>\n );\n};\n\nexport default Star;\n","import React from 'react';\n\nimport Root, { Props as RootProps } from './Root';\nimport Star from './Star';\n\ninterface Props extends RootProps {\n disabled?: boolean;\n maximumRating?: number;\n}\n\nconst StarRating: React.FC<Props> = ({\n maximumRating = 5,\n disabled = false,\n defaultValue = '1',\n value,\n ...props\n}) => {\n return (\n <Root defaultValue={defaultValue} {...props}>\n {/* eslint-disable-next-line @typescript-eslint/naming-convention */}\n {Array.from({ length: maximumRating }, (_, index) => {\n const starValue = index + 1;\n const starValueString = `${starValue}`;\n\n return (\n <Star\n currentValue={value}\n key={starValueString}\n // @ts-ignore\n value={starValue}\n id={starValueString}\n disabled={disabled === true}\n />\n );\n })}\n </Root>\n );\n};\n\nexport default StarRating;\n","import classNames from 'classnames';\nimport { Controller, useForm } from 'react-hook-form';\n\nimport buildReactHookFormRules from './buildReactHookFormRules';\nimport styles from './FormBuilder.module.scss';\nimport { FormBuilderFormField } from './FormBuilderTypes';\n\nimport Button, { ButtonProps } from '@/dls/Button/Button';\nimport Checkbox from '@/dls/Forms/Checkbox/Checkbox';\nimport Input from '@/dls/Forms/Input';\nimport StarRating from '@/dls/Forms/StarRating';\nimport TextArea from '@/dls/Forms/TextArea';\nimport { FormFieldType } from '@/types/FormField';\n\nexport type SubmissionResult<T> = Promise<void | { errors: { [key in keyof T]: string } }>;\ntype FormBuilderProps<T> = {\n formFields: FormBuilderFormField[];\n onSubmit: (data: T) => void | SubmissionResult<T>;\n isSubmitting?: boolean;\n actionText?: string;\n actionProps?: ButtonProps;\n renderAction?: (props: ButtonProps) => React.ReactNode;\n};\n\n/**\n * {@see https://legacy.reactjs.org/docs/jsx-in-depth.html#choosing-the-type-at-runtime}\n */\nconst FormFieldTypeToComponentMap = {\n [FormFieldType.TextArea]: TextArea,\n [FormFieldType.Text]: Input,\n [FormFieldType.Password]: Input,\n [FormFieldType.Phone]: Input,\n [FormFieldType.Number]: Input,\n [FormFieldType.Checkbox]: Checkbox,\n [FormFieldType.StarRating]: StarRating,\n};\n\nconst isFieldTextInput = (type: FormFieldType) => {\n return [\n FormFieldType.Text,\n FormFieldType.Password,\n FormFieldType.Phone,\n FormFieldType.Number,\n ].includes(type);\n};\n\nconst FormBuilder = <T,>({\n formFields,\n onSubmit,\n actionText,\n actionProps = {},\n isSubmitting,\n renderAction,\n}: FormBuilderProps<T>) => {\n const { handleSubmit, control, setError } = useForm({ mode: 'onBlur' });\n\n const internalOnSubmit = (data: T) => {\n const onSubmitPromise = onSubmit(data);\n if (onSubmitPromise) {\n onSubmitPromise.then((errorData) => {\n if (errorData && errorData?.errors) {\n Object.entries(errorData.errors).forEach(([field, errorMessage]) => {\n setError(field, { type: 'manual', message: errorMessage as string });\n });\n }\n });\n }\n };\n\n return (\n <form className={styles.container} onSubmit={handleSubmit(internalOnSubmit)}>\n {formFields?.map((formField) => {\n return (\n <Controller\n key={formField.field}\n control={control}\n defaultValue={formField.defaultValue}\n rules={buildReactHookFormRules(formField)}\n name={formField.field}\n render={({ field, fieldState: { error } }) => {\n const inputFieldProps = {\n key: formField.field,\n value: field.value,\n id: formField.field,\n name: formField.field,\n containerClassName: formField.containerClassName,\n fieldSetLegend: formField.fieldSetLegend,\n label: formField.label,\n placeholder: formField.placeholder,\n onChange: (val) => {\n field.onChange(val);\n if (formField?.onChange) {\n formField.onChange(val);\n }\n },\n ...(isFieldTextInput(formField.type) && {\n htmlType: formField.type,\n fixedWidth: false,\n }),\n ...(formField.type === FormFieldType.Checkbox &&\n typeof formField.checked !== 'undefined' && {\n checked: formField.checked,\n }),\n };\n const InputField = FormFieldTypeToComponentMap[formField.type];\n return (\n <div className={classNames(styles.inputContainer, formField.containerClassName)}>\n <InputField {...inputFieldProps} />\n {error && <span className={styles.errorText}>{error.message}</span>}\n {formField.extraSection && <div>{formField.extraSection}</div>}\n </div>\n );\n }}\n />\n );\n })}\n {renderAction ? (\n renderAction({\n htmlType: 'submit',\n isLoading: isSubmitting,\n onClick: (e) => {\n e.stopPropagation();\n },\n })\n ) : (\n <Button\n {...actionProps}\n htmlType=\"submit\"\n isLoading={isSubmitting}\n onClick={(e) => {\n e.stopPropagation();\n }}\n className={classNames(styles.submitButton, actionProps.className)}\n >\n {actionText}\n </Button>\n )}\n </form>\n );\n};\n\nexport default FormBuilder;\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgDividerHorizontal = function SvgDividerHorizontal(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 20 20\",\n height: 16,\n width: 16,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"var(--color-secondary-medium)\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M5 10h10\"\n })));\n};\nexport default SvgDividerHorizontal;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgTick = function SvgTick(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 20 20\",\n height: 20,\n width: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m14 7-5.5 5.5L6 10\",\n stroke: \"var(--color-background-default)\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgTick;","import React from 'react';\n\nimport * as RadixCheckbox from '@radix-ui/react-checkbox';\nimport classNames from 'classnames';\n\nimport styles from './Checkbox.module.scss';\n\nimport DividerHorizontalIcon from '@/icons/divider-horizontal.svg';\nimport TickIcon from '@/icons/tick.svg';\n\nconst INDETERMINATE = 'indeterminate';\n\ninterface Props {\n id: string;\n onChange: (checked: boolean) => void;\n checked?: boolean | typeof INDETERMINATE;\n disabled?: boolean;\n required?: boolean;\n label?: string | JSX.Element;\n name?: string;\n defaultChecked?: boolean;\n}\n\nconst Checkbox: React.FC<Props> = ({\n disabled = false,\n required = false,\n defaultChecked,\n checked,\n id,\n label,\n name,\n onChange,\n}) => {\n /**\n * Handle when the value of the checkbox input changes.\n *\n * @param {boolean} newChecked\n * @returns {void}\n */\n const handleChange = (newChecked: boolean): void => {\n onChange(newChecked);\n };\n\n return (\n <div className={classNames(styles.container, { [styles.disabled]: disabled })}>\n <RadixCheckbox.Root\n disabled={disabled}\n name={name}\n required={required}\n onCheckedChange={handleChange}\n id={id}\n className={styles.checkbox}\n defaultChecked={defaultChecked}\n {...(checked !== undefined && { checked })} // make it controlled only when checked is passed.\n >\n <RadixCheckbox.Indicator\n className={classNames(styles.indicator, { [styles.disabledIndicator]: disabled })}\n >\n {checked === INDETERMINATE ? <DividerHorizontalIcon /> : <TickIcon />}\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n {label && (\n <label className={styles.label} htmlFor={id}>\n {label}\n </label>\n )}\n </div>\n );\n};\n\nexport default Checkbox;\n","/* eslint-disable max-lines */\nimport React, {\n ReactNode,\n useState,\n useEffect,\n ChangeEvent,\n RefObject,\n KeyboardEvent,\n HTMLAttributes,\n} from 'react';\n\nimport classNames from 'classnames';\n\nimport Button, { ButtonShape, ButtonSize, ButtonVariant } from '../../Button/Button';\n\nimport styles from './Input.module.scss';\n\nimport ClearIcon from '@/icons/close.svg';\n\nexport enum InputSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\n\nexport enum InputType {\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n}\n\nexport enum InputVariant {\n Default = 'default',\n Main = 'main',\n}\ninterface Props {\n id: string;\n name?: string;\n size?: InputSize;\n placeholder?: string;\n fixedWidth?: boolean;\n disabled?: boolean;\n clearable?: boolean;\n prefix?: ReactNode;\n suffix?: ReactNode;\n onClearClicked?: () => void;\n onChange?: (value: string) => void;\n onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n inputMode?: HTMLAttributes<HTMLInputElement>['inputMode'];\n value?: string;\n label?: string | JSX.Element;\n type?: InputType;\n shouldFlipOnRTL?: boolean;\n variant?: InputVariant;\n containerClassName?: string;\n htmlType?: React.HTMLInputTypeAttribute;\n isRequired?: boolean;\n inputRef?: RefObject<HTMLInputElement>;\n}\n\nconst Input: React.FC<Props> = ({\n id,\n name,\n label,\n placeholder,\n size = InputSize.Medium,\n fixedWidth = true,\n disabled = false,\n clearable = false,\n type,\n variant,\n prefix,\n suffix,\n onClearClicked,\n onChange,\n onKeyDown,\n inputMode,\n value = '',\n shouldFlipOnRTL = true,\n containerClassName,\n htmlType,\n isRequired,\n inputRef,\n}) => {\n const [inputValue, setInputValue] = useState(value);\n // listen to any change in value in-case the value gets populated after and API call.\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n const onValueChange = (event: ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n setInputValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n\n return (\n <>\n {label && <p className={styles.label}>{label}</p>}\n <div\n className={classNames(styles.container, containerClassName, {\n [styles.smallContainer]: size === InputSize.Small,\n [styles.mediumContainer]: size === InputSize.Medium,\n [styles.largeContainer]: size === InputSize.Large,\n [styles.fixedWidth]: fixedWidth,\n [styles.disabled]: disabled,\n [styles.error]: type === InputType.Error,\n [styles.success]: type === InputType.Success,\n [styles.warning]: type === InputType.Warning,\n [styles.main]: variant === InputVariant.Main,\n })}\n >\n {prefix && (\n <div className={classNames(styles.prefix, styles.prefixSuffixContainer)}>{prefix}</div>\n )}\n <input\n className={classNames(styles.input, {\n [styles.error]: type === InputType.Error,\n [styles.success]: type === InputType.Success,\n [styles.warning]: type === InputType.Warning,\n [styles.rtlInput]: shouldFlipOnRTL,\n })}\n type={htmlType}\n required={isRequired}\n dir=\"auto\"\n id={id}\n ref={inputRef}\n disabled={disabled}\n onChange={onValueChange}\n value={inputValue}\n onKeyDown={onKeyDown}\n inputMode={inputMode}\n {...(placeholder && { placeholder })}\n {...(name && { name })}\n />\n {clearable ? (\n <>\n {inputValue && (\n <div className={styles.clearContainer}>\n <Button\n shape={ButtonShape.Circle}\n variant={ButtonVariant.Ghost}\n size={ButtonSize.Small}\n onClick={onClearClicked}\n >\n <ClearIcon />\n </Button>\n </div>\n )}\n </>\n ) : (\n <>\n {suffix && (\n <div className={classNames(styles.suffix, styles.prefixSuffixContainer)}>\n {suffix}\n </div>\n )}\n </>\n )}\n </div>\n </>\n );\n};\n\nexport default Input;\n","import ErrorMessageId from './ErrorMessageId';\n\nexport enum RuleType {\n Required = 'required',\n Regex = 'regex',\n MaximumLength = 'maxLength',\n MinimumLength = 'minLength',\n}\n\ntype RuleValue = string | boolean | number;\ntype FieldRule = {\n type: RuleType;\n value: RuleValue;\n errorId?: ErrorMessageId;\n errorMessage?: string;\n errorExtraParams?: Record<string, unknown>;\n};\n\nexport default FieldRule;\n","import FieldRule from './FieldRule';\n\nexport enum FormFieldType {\n Text = 'text',\n Password = 'password',\n Phone = 'phone',\n Number = 'number',\n TextArea = 'textarea',\n Checkbox = 'checkbox',\n StarRating = 'starRating',\n}\n\ntype FormField = {\n field: string;\n placeholder?: string;\n label?: string | JSX.Element;\n rules?: FieldRule[];\n type: FormFieldType;\n defaultValue?: unknown;\n};\n\nexport default FormField;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"FormBuilder_container__7H_38\",\"inputContainer\":\"FormBuilder_inputContainer__v4ceB\",\"errorText\":\"FormBuilder_errorText__1uSsu\",\"submitButton\":\"FormBuilder_submitButton__4Wo4u\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Checkbox_container__LWbsV\",\"checkbox\":\"Checkbox_checkbox__bbyfA\",\"label\":\"Checkbox_label__MrEvp\",\"disabled\":\"Checkbox_disabled__3XIf_\",\"indicator\":\"Checkbox_indicator__6umIV\",\"disabledIndicator\":\"Checkbox_disabledIndicator__Dmw2E\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Input_container__5BNOH\",\"fixedWidth\":\"Input_fixedWidth__MZoNx\",\"disabled\":\"Input_disabled__AFA4l\",\"error\":\"Input_error__cfc8q\",\"success\":\"Input_success__qb_Ue\",\"warning\":\"Input_warning__KwRSJ\",\"main\":\"Input_main__K4bVL\",\"input\":\"Input_input__za7E9\",\"rtlInput\":\"Input_rtlInput__8Yg1Q\",\"smallContainer\":\"Input_smallContainer__bxyYT\",\"mediumContainer\":\"Input_mediumContainer__jEOpT\",\"largeContainer\":\"Input_largeContainer__yafZ8\",\"label\":\"Input_label__loZWW\",\"clearContainer\":\"Input_clearContainer__3LxT4\",\"prefixSuffixContainer\":\"Input_prefixSuffixContainer__n84F6\",\"prefix\":\"Input_prefix__jYhnp\",\"suffix\":\"Input_suffix__v_BvR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Root_container__CQEHR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"starButton\":\"Star_starButton__UeMsd\",\"selected\":\"Star_selected__M87yb\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"TextArea_container__7anjD\",\"disabled\":\"TextArea_disabled__hBW2r\",\"error\":\"TextArea_error__JceFQ\",\"success\":\"TextArea_success__cfxk5\",\"warning\":\"TextArea_warning__fUWyl\",\"main\":\"TextArea_main__KBxzB\",\"input\":\"TextArea_input__SDMp4\",\"label\":\"TextArea_label__VLY9r\"};"],"names":["formField","rules","requiredRule","find","rule","type","RuleType","value","required","message","errorMessage","maximumLengthRule","maxLength","minimumLength","minLength","regexValidations","filter","length","validate","regex","failedRule","RegExp","test","RadioRootOrientation","_path","className","onChange","defaultValue","name","children","direction","useDirection","RadioGroupPrimitive","classNames","styles","dir","onValueChange","_extends","Object","assign","bind","n","e","arguments","t","r","hasOwnProperty","call","apply","props","width","height","viewBox","fill","xmlns","d","fillRule","clipRule","currentValue","starValue","Number","isCurrentStarSelected","VisuallyHidden","StarFilledIcon","StarIcon","maximumRating","disabled","Root","Array","from","_","index","starValueString","Star","id","TextAreaSize","SIZE_TO_COLS","Small","Medium","Large","TextAreaType","TextAreaVariant","label","placeholder","variant","shouldFlipOnRTL","containerClassName","isRequired","inputRef","size","fieldSetLegend","useState","inputValue","setTextAreaValue","useEffect","content","p","div","Error","Success","Warning","Main","textarea","rows","ref","event","newValue","target","fieldset","legend","FormFieldTypeToComponentMap","FormFieldType","TextArea","Input","Checkbox","StarRating","formFields","onSubmit","actionText","actionProps","isSubmitting","renderAction","useForm","mode","handleSubmit","control","setError","form","data","onSubmitPromise","then","errorData","errors","entries","forEach","field","map","Controller","buildReactHookFormRules","render","fieldState","error","inputFieldProps","key","val","includes","htmlType","fixedWidth","checked","InputField","span","extraSection","isLoading","onClick","stopPropagation","Button","stroke","strokeWidth","strokeLinecap","strokeLinejoin","defaultChecked","RadixCheckbox","onCheckedChange","newChecked","undefined","DividerHorizontalIcon","TickIcon","htmlFor","InputSize","InputType","InputVariant","clearable","prefix","suffix","onClearClicked","onKeyDown","inputMode","setInputValue","input","shape","ButtonShape","ButtonVariant","ButtonSize","ClearIcon","module","exports"],"sourceRoot":""}
|