"use strict";(globalThis.webpackChunk_elliemae_pui_app_sdk=globalThis.webpackChunk_elliemae_pui_app_sdk||[]).push([[5055],{"./lib/view/fields/connect-form.tsx":(G,v,o)=>{o.d(v,{$:()=>t});var r=o("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),t=function(l){var m=l.children,T=(0,r.xW)();return m(Object.assign({},T))}},"./lib/view/fields/radio/index.tsx":(G,v,o)=>{o.d(v,{s:()=>E});var r=o("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/jsx.js"),t=o.n(r),l=o("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),m=o.n(l),T=o("./node_modules/.pnpm/@elliemae+ds-form-radio@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-form-radio/dist/esm/index.js"),g=o("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),s=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),R=["name","defaultChecked","rules","labelText"],x=["onChange","value"],E=function(_){var S=_.name,P=_.defaultChecked,C=P===void 0?!1:P,A=_.rules,d=A===void 0?{}:A,i=_.labelText,y=m()(_,R);return t()(g.xI,{name:S,rules:d,defaultValue:C,render:function(V){var h,f=V.field,j=f.onChange,b=f.value,u=m()(f,x);return(0,s.jsx)(T.vz,Object.assign({label:i},y,u,{value:(h=y.value)!==null&&h!==void 0?h:b.toString(),checked:b,onChange:function(F){return j(!((F||{}).target||{}).checked)}}))}})};E.displayName="Radio"},"./lib/view/fields/radio/set-value.stories.tsx":(G,v,o)=>{o.r(v),o.d(v,{SetValue:()=>h,__namedExportsOrder:()=>f,default:()=>V});var r=o("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),t=o.n(r),l=o("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/jsx.js"),m=o.n(l),T=o("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),g=o("./node_modules/.pnpm/@elliemae+ds-grid@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-grid/dist/esm/Grid.js"),s=o("./node_modules/.pnpm/@elliemae+ds-legacy-button-v2@1.0.16_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-legacy-button-v2/dist/esm/DSButtonV2.js"),R=o("./lib/view/form/index.tsx"),x=o("./lib/view/fields/radio/index.tsx"),E=o("./lib/view/fields/connect-form.tsx"),_=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),S,P=["name"],C=`
    
    // @ts-nocheck
    // @ts-ignore
    var __STORY__ = "import { Story, Meta } from '@storybook/react';\\nimport { useFormContext, get, FieldError } from 'react-hook-form';\\nimport { Grid } from '@elliemae/ds-grid';\\nimport { DSButtonV2 } from '@elliemae/ds-button';\\nimport { Form } from '../../form/index.js';\\nimport { Radio, RadioProps } from './index.js';\\nimport { ConnectForm } from '../connect-form.js';\\n\\nconst radioName = 'gender';\\n\\nconst ToggleValue = () => {\\n  const { setValue, watch } = useFormContext();\\n  const currentValue = watch(radioName) as string;\\n  return (\\n    <DSButtonV2\\n      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}\\n    >\\n      Toggle\\n    </DSButtonV2>\\n  );\\n};\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form>\\n      <Grid gutter=\\"xs\\">\\n        <Grid>\\n          <ConnectForm>\\n            {({ formState: { errors } }) => {\\n              const hasError = !!(get(errors, name) as FieldError);\\n              return <Radio name={name} {...rest} hasError={hasError} />;\\n            }}\\n          </ConnectForm>\\n        </Grid>\\n        <ToggleValue />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n} as Meta;\\n\\nexport const SetValue = Template.bind({});\\n\\nSetValue.args = {\\n  name: radioName,\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: true,\\n};\\n";
    // @ts-ignore
    var __LOCATIONS_MAP__ = {"SetValue":{"startLoc":{"col":36,"line":23},"endLoc":{"col":1,"line":39},"startBody":{"col":36,"line":23},"endBody":{"col":1,"line":39}}};
    
import { Story, Meta } from '@storybook/react';
import { useFormContext, get, FieldError } from 'react-hook-form';
import { Grid } from '@elliemae/ds-grid';
import { DSButtonV2 } from '@elliemae/ds-button';
import { Form } from '../../form/index.js';
import { Radio, RadioProps } from './index.js';
import { ConnectForm } from '../connect-form.js';

const radioName = 'gender';

const ToggleValue = () => {
  const { setValue, watch } = useFormContext();
  const currentValue = watch(radioName) as string;
  return (
    <DSButtonV2
      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}
    >
      Toggle
    </DSButtonV2>
  );
};

const Template: Story<RadioProps> = ({ name, ...rest }) => (
  <Grid p="m">
    <Form>
      <Grid gutter="xs">
        <Grid>
          <ConnectForm>
            {({ formState: { errors } }) => {
              const hasError = !!(get(errors, name) as FieldError);
              return <Radio name={name} {...rest} hasError={hasError} />;
            }}
          </ConnectForm>
        </Grid>
        <ToggleValue />
      </Grid>
    </Form>
  </Grid>
);

export default {parameters: {"storySource":{"source":"import { Story, Meta } from '@storybook/react';\\nimport { useFormContext, get, FieldError } from 'react-hook-form';\\nimport { Grid } from '@elliemae/ds-grid';\\nimport { DSButtonV2 } from '@elliemae/ds-button';\\nimport { Form } from '../../form/index.js';\\nimport { Radio, RadioProps } from './index.js';\\nimport { ConnectForm } from '../connect-form.js';\\n\\nconst radioName = 'gender';\\n\\nconst ToggleValue = () => {\\n  const { setValue, watch } = useFormContext();\\n  const currentValue = watch(radioName) as string;\\n  return (\\n    <DSButtonV2\\n      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}\\n    >\\n      Toggle\\n    </DSButtonV2>\\n  );\\n};\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form>\\n      <Grid gutter=\\"xs\\">\\n        <Grid>\\n          <ConnectForm>\\n            {({ formState: { errors } }) => {\\n              const hasError = !!(get(errors, name) as FieldError);\\n              return <Radio name={name} {...rest} hasError={hasError} />;\\n            }}\\n          </ConnectForm>\\n        </Grid>\\n        <ToggleValue />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n} as Meta;\\n\\nexport const SetValue = Template.bind({});\\n\\nSetValue.args = {\\n  name: radioName,\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: true,\\n};\\n","locationsMap":{"set-value":{"startLoc":{"col":36,"line":23},"endLoc":{"col":1,"line":39},"startBody":{"col":36,"line":23},"endBody":{"col":1,"line":39}}}},},
  title: 'Components/Form/Controls/Radio',
} as Meta;

export const SetValue = Template.bind({});

SetValue.args = {
  name: radioName,
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: true,
};
`,A={SetValue:{startLoc:{col:36,line:31},endLoc:{col:1,line:47},startBody:{col:36,line:31},endBody:{col:1,line:47}}},C=`import { Story, Meta } from '@storybook/react';
import { useFormContext, get, FieldError } from 'react-hook-form';
import { Grid } from '@elliemae/ds-grid';
import { DSButtonV2 } from '@elliemae/ds-button';
import { Form } from '../../form/index.js';
import { Radio, RadioProps } from './index.js';
import { ConnectForm } from '../connect-form.js';

const radioName = 'gender';

const ToggleValue = () => {
  const { setValue, watch } = useFormContext();
  const currentValue = watch(radioName) as string;
  return (
    <DSButtonV2
      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}
    >
      Toggle
    </DSButtonV2>
  );
};

const Template: Story<RadioProps> = ({ name, ...rest }) => (
  <Grid p="m">
    <Form>
      <Grid gutter="xs">
        <Grid>
          <ConnectForm>
            {({ formState: { errors } }) => {
              const hasError = !!(get(errors, name) as FieldError);
              return <Radio name={name} {...rest} hasError={hasError} />;
            }}
          </ConnectForm>
        </Grid>
        <ToggleValue />
      </Grid>
    </Form>
  </Grid>
);

export default {
  title: 'Components/Form/Controls/Radio',
} as Meta;

export const SetValue = Template.bind({});

SetValue.args = {
  name: radioName,
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: true,
};
`,A={SetValue:{startLoc:{col:36,line:23},endLoc:{col:1,line:39},startBody:{col:36,line:23},endBody:{col:1,line:39}}},d="gender",i=function(){var j=(0,T.xW)(),b=j.setValue,u=j.watch,F=u(d);return m()(s.e,{onClick:function(){return b(d,!F,{shouldDirty:!0})}},void 0,"Toggle")};i.displayName="ToggleValue";var y=function(j){var b=j.name,u=t()(j,P);return m()(g.Ay,{p:"m"},void 0,m()(R.l,{},void 0,m()(g.Ay,{gutter:"xs"},void 0,m()(g.Ay,{},void 0,m()(E.$,{},void 0,function(F){var N=F.formState.errors,c=!!(0,T.Jt)(N,b);return(0,_.jsx)(x.s,Object.assign({name:b},u,{hasError:c}))})),S||(S=m()(i,{})))))};y.displayName="Template";const V={parameters:{storySource:{source:`
    
    // @ts-nocheck
    // @ts-ignore
    var __STORY__ = "import { Story, Meta } from '@storybook/react';\\nimport { useFormContext, get, FieldError } from 'react-hook-form';\\nimport { Grid } from '@elliemae/ds-grid';\\nimport { DSButtonV2 } from '@elliemae/ds-button';\\nimport { Form } from '../../form/index.js';\\nimport { Radio, RadioProps } from './index.js';\\nimport { ConnectForm } from '../connect-form.js';\\n\\nconst radioName = 'gender';\\n\\nconst ToggleValue = () => {\\n  const { setValue, watch } = useFormContext();\\n  const currentValue = watch(radioName) as string;\\n  return (\\n    <DSButtonV2\\n      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}\\n    >\\n      Toggle\\n    </DSButtonV2>\\n  );\\n};\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form>\\n      <Grid gutter=\\"xs\\">\\n        <Grid>\\n          <ConnectForm>\\n            {({ formState: { errors } }) => {\\n              const hasError = !!(get(errors, name) as FieldError);\\n              return <Radio name={name} {...rest} hasError={hasError} />;\\n            }}\\n          </ConnectForm>\\n        </Grid>\\n        <ToggleValue />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n} as Meta;\\n\\nexport const SetValue = Template.bind({});\\n\\nSetValue.args = {\\n  name: radioName,\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: true,\\n};\\n";
    // @ts-ignore
    var __LOCATIONS_MAP__ = {"SetValue":{"startLoc":{"col":36,"line":23},"endLoc":{"col":1,"line":39},"startBody":{"col":36,"line":23},"endBody":{"col":1,"line":39}}};
    
import { Story, Meta } from '@storybook/react';
import { useFormContext, get, FieldError } from 'react-hook-form';
import { Grid } from '@elliemae/ds-grid';
import { DSButtonV2 } from '@elliemae/ds-button';
import { Form } from '../../form/index.js';
import { Radio, RadioProps } from './index.js';
import { ConnectForm } from '../connect-form.js';

const radioName = 'gender';

const ToggleValue = () => {
  const { setValue, watch } = useFormContext();
  const currentValue = watch(radioName) as string;
  return (
    <DSButtonV2
      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}
    >
      Toggle
    </DSButtonV2>
  );
};

const Template: Story<RadioProps> = ({ name, ...rest }) => (
  <Grid p="m">
    <Form>
      <Grid gutter="xs">
        <Grid>
          <ConnectForm>
            {({ formState: { errors } }) => {
              const hasError = !!(get(errors, name) as FieldError);
              return <Radio name={name} {...rest} hasError={hasError} />;
            }}
          </ConnectForm>
        </Grid>
        <ToggleValue />
      </Grid>
    </Form>
  </Grid>
);

export default {parameters: {"storySource":{"source":"import { Story, Meta } from '@storybook/react';\\nimport { useFormContext, get, FieldError } from 'react-hook-form';\\nimport { Grid } from '@elliemae/ds-grid';\\nimport { DSButtonV2 } from '@elliemae/ds-button';\\nimport { Form } from '../../form/index.js';\\nimport { Radio, RadioProps } from './index.js';\\nimport { ConnectForm } from '../connect-form.js';\\n\\nconst radioName = 'gender';\\n\\nconst ToggleValue = () => {\\n  const { setValue, watch } = useFormContext();\\n  const currentValue = watch(radioName) as string;\\n  return (\\n    <DSButtonV2\\n      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}\\n    >\\n      Toggle\\n    </DSButtonV2>\\n  );\\n};\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form>\\n      <Grid gutter=\\"xs\\">\\n        <Grid>\\n          <ConnectForm>\\n            {({ formState: { errors } }) => {\\n              const hasError = !!(get(errors, name) as FieldError);\\n              return <Radio name={name} {...rest} hasError={hasError} />;\\n            }}\\n          </ConnectForm>\\n        </Grid>\\n        <ToggleValue />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n} as Meta;\\n\\nexport const SetValue = Template.bind({});\\n\\nSetValue.args = {\\n  name: radioName,\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: true,\\n};\\n","locationsMap":{"set-value":{"startLoc":{"col":36,"line":23},"endLoc":{"col":1,"line":39},"startBody":{"col":36,"line":23},"endBody":{"col":1,"line":39}}}},},
  title: 'Components/Form/Controls/Radio',
} as Meta;

export const SetValue = Template.bind({});

SetValue.args = {
  name: radioName,
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: true,
};
`,locationsMap:{"set-value":{startLoc:{col:36,line:31},endLoc:{col:1,line:47},startBody:{col:36,line:31},endBody:{col:1,line:47}}}},storySource:{source:`import { Story, Meta } from '@storybook/react';
import { useFormContext, get, FieldError } from 'react-hook-form';
import { Grid } from '@elliemae/ds-grid';
import { DSButtonV2 } from '@elliemae/ds-button';
import { Form } from '../../form/index.js';
import { Radio, RadioProps } from './index.js';
import { ConnectForm } from '../connect-form.js';

const radioName = 'gender';

const ToggleValue = () => {
  const { setValue, watch } = useFormContext();
  const currentValue = watch(radioName) as string;
  return (
    <DSButtonV2
      onClick={() => setValue(radioName, !currentValue, { shouldDirty: true })}
    >
      Toggle
    </DSButtonV2>
  );
};

const Template: Story<RadioProps> = ({ name, ...rest }) => (
  <Grid p="m">
    <Form>
      <Grid gutter="xs">
        <Grid>
          <ConnectForm>
            {({ formState: { errors } }) => {
              const hasError = !!(get(errors, name) as FieldError);
              return <Radio name={name} {...rest} hasError={hasError} />;
            }}
          </ConnectForm>
        </Grid>
        <ToggleValue />
      </Grid>
    </Form>
  </Grid>
);

export default {
  title: 'Components/Form/Controls/Radio',
} as Meta;

export const SetValue = Template.bind({});

SetValue.args = {
  name: radioName,
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: true,
};
`,locationsMap:{"set-value":{startLoc:{col:36,line:23},endLoc:{col:1,line:39},startBody:{col:36,line:23},endBody:{col:1,line:39}}}}},title:"Components/Form/Controls/Radio"};var h=y.bind({});h.args={name:d,labelText:"Male",rules:{required:{value:!0,message:"Please select a gender"}},defaultChecked:!0};var f=["SetValue"]},"./lib/view/form/index.tsx":(G,v,o)=>{o.d(v,{l:()=>T});var r=o("./node_modules/.pnpm/styled-components@5.3.11_react-dom@18.3.1_react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js"),t=o("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),l=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),m=r.Ay.form.withConfig({componentId:"sc-1pyjvv3-0"})(["width:100%;"]),T=function(g){var s=g.classname,R=g.reactHookFormProps,x=R===void 0?{mode:"onBlur"}:R,E=g.children,_=g.onSubmit,S=(0,t.mN)(x),P={};_&&(P.onSubmit=S.handleSubmit(_));var C=Object.assign(S,{formProps:x});return(0,l.jsx)(t.Op,Object.assign({},C,{children:(0,l.jsx)(m,Object.assign({className:s},P,{children:E}))}))};T.displayName="Form"},"./node_modules/.pnpm/@elliemae+ds-form-radio@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-form-radio/dist/esm/index.js":(G,v,o)=>{o.d(v,{vz:()=>B});var r=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),t=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),l=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/defaultProps/useMemoMergePropsWithDefault.js"),m=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/useGetGlobalAttributes.js"),T=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/useGetXstyledProps.js"),g=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/describe.js"),s=o("./node_modules/.pnpm/uid@2.0.2/node_modules/uid/dist/index.mjs"),R=o("./node_modules/.pnpm/@elliemae+ds-truncated-tooltip-text@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-truncated-tooltip-text/dist/esm/SimpleTruncatedTooltipText.js"),x=o("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/styled.js"),E=o("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/xStyledWrapper.js"),_=o("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/system.js"),S=o("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/th.js");const P=({colors:e},n,a,p,O,D)=>D?e.danger[900]:p||O?e.neutral[500]:e.brand[600],C=(e,n,a,p,O,D=!1,M="mediaquery")=>{const w=`
  content:"";
  width: 0.615rem; /* 8px / 13 */
  height: 0.615rem; /* 8px / 13 */
  border-radius:50%;
  display:inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: ${P(e,n,D,a,p,O)};
`,W=`
    @media (max-width: ${e.breakpoints.small}) {
      width: 0.75rem; /* 12px / 16 */
      height: 0.75rem; /* 12px / 16 */
    }
    ${w}
`,Z=`
    ${w}
    width: 0.923rem; /* 12px / 13 */
    height: 0.923rem; /* 12px / 13 */
    @media (max-width: ${e.breakpoints.small}) {
      width: 0.75rem; /* 12px / 16 */
      height: 0.75rem; /* 12px / 16 */
    }
  `;return n?`&:before {
        ${M==="mediaquery"?W:M==="mobile"?Z:w}
    }`:""},A=({colors:e},n,a)=>n?e.neutral["080"]:a?e.neutral["050"]:e.neutral["000"],d="DSRadio",i={CONTAINER:"root",INPUT:"input",LABEL:"label"},y=(0,x.I)("div",{name:d,slot:i.CONTAINER})`
  ${({device:e,theme:n})=>e==="mobile"?`    
      @media (max-width: ${n.breakpoints.small}) {
      grid-template-columns: 1.5rem auto; /* 24px / 16px */
    }
      grid-template-columns: 1.846rem auto;
      `:e==="mediaquery"?`
        @media (max-width: ${n.breakpoints.small}) {
          grid-template-columns: 1.5rem auto;
        }
        grid-template-columns: 1.23rem auto;
    `:`
    @media (max-width: ${n.breakpoints.small}) {
      grid-template-columns: 1rem auto; /* 16px / 16px */
    }
    grid-template-columns: 1.2307rem auto; /* 16px / 13 */

    `}
  ${({hasLabel:e})=>e?"column-gap: 8px;":""}
  display: inline-grid;
  grid-template-rows: min-content;

  align-items: center;
  ${E.L1}
`,V=(0,x.I)("span")`
  ${({device:e,theme:n})=>e==="mobile"?`    
      @media (max-width: ${n.breakpoints.small}) {
        width: 1.5rem;  /* 24px / 16 */
        height: 1.5rem;  /* 24px / 16 */
      }
      width: 1.846rem; /* 24px / 13 */
      height: 1.846rem;  /* 24px / 13 */`:e==="mediaquery"?`
        @media (max-width: ${n.breakpoints.small}) {
          width: 1.5rem;  /* 24px / 16 */
          height: 1.5rem;  /* 24px / 16 */
        }
        width: 1.2307rem; /* 16px / 13 */
        height: 1.2307rem; /* 16px / 13 */
      `:`
    @media (max-width: ${n.breakpoints.small}) {
      width: 1rem;  /* 16px / 16 */
      height: 1rem;  /* 16px / 16 */
    }
    width: 1.2307rem; /* 16px / 13 */
    height: 1.2307rem; /* 16px / 13 */
  `}
  border: 1px solid ${({theme:e,hasError:n})=>n?e.colors.danger[900]:e.colors.neutral[400]};
  border-radius: 50px;
  position: relative;
  background: ${({theme:e,disabled:n,applyAriaDisabled:a,readOnly:p})=>A(e,n,p||a)};
  ${({theme:e,checked:n,disabled:a,applyAriaDisabled:p,readOnly:O,hasError:D,device:M})=>C(e,n,a||p,O,D,!1,M)}
  &:focus-within {
    ${({theme:e,hasError:n,disabled:a})=>a?void 0:`border: 1px solid ${n?e.colors.danger[900]:e.colors.brand[700]}; outline : 1px solid ${n?e.colors.danger[900]:e.colors.brand[700]} `};
    &:hover {
      ${({theme:e,checked:n,disabled:a,applyAriaDisabled:p,readOnly:O,hasError:D,device:M})=>C(e,n,a||p,O,D,!0,M)}
    }
  }
  &:hover {
    background: ${({theme:e,applyAriaDisabled:n,readOnly:a,disabled:p})=>n||a?e.colors.neutral["050"]:!p&&!n?e.colors.brand[200]:void 0};
    ${({theme:e,hasError:n,disabled:a})=>!n&&!a?` border: 1px solid  ${e.colors.brand[600]}`:void 0};
  }
`,h=(0,_.AH)`
  &:hover {
    cursor: pointer;
  }
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
`,f=(0,x.I)("input",{name:d,slot:i.INPUT})`
  ${h}
  &:disabled, &[aria-disabled='true'] {
    cursor: not-allowed;
  }
`,j=(0,x.I)("label",{name:d,slot:i.LABEL})`
  color: ${({theme:e,disabled:n,readOnly:a})=>n||a?e.colors.neutral[700]:e.colors.neutral[800]};
  line-height: 1.2307rem;
  @media (max-width: ${S.th.breakpoint("small")}) {
    line-height: 1rem; /* 13px / 16 */
  }
  ${({device:e,theme:n})=>e==="mobile"?`
        @media (max-width: ${n.breakpoints.small}) {
          font-size: 1rem;  /* 16px / 16 */
        }
        font-size: 1.2307rem; /* 16px / 13 */
        `:e===void 0?`
          font-size: 1rem; 
        `:`
      @media (max-width: ${n.breakpoints.small}) {
        font-size: 0.8125rem;  /* 13px / 16 */
      }
  
      font-size: 1rem;  /* 13px / 13 */
    `}
  display: inherit;
  width: fit-content;

  ${({disabled:e})=>e?`&:hover {
    cursor: not-allowed;
  }`:`&:hover {
    cursor: pointer;
  }`}
`,b=(0,x.I)("span")``,u=x.I.p`
  display: none;
`;var F=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/globalAttributesPropTypes.js"),N=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/xstyledPropTypes.js"),c=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/PropTypes.js");const k={wrapLabel:!1,hasError:!1,checked:!1,disabled:!1,visualOnly:!1,applyAriaDisabled:!1,device:"mediaquery"},I={...F.P,...N.w,value:c.A.string.description("Radio value"),onChange:c.A.func.description("Radio onchange callback").signature("((newValue: string,e:  React.ChangeEvent | React.KeyboardEvent) => void)"),label:c.A.string.description("Radio Label property. This label is also going to be used as an aria-label for screen readers."),checked:c.A.bool.description("Whether the radio is checked or not"),hasError:c.A.bool.description("Whether the radio has error or not."),innerRef:c.A.oneOfType([c.A.func,c.A.object]).description("Radio input ref."),wrapLabel:c.A.bool.description("Whether to wrap or truncate the label"),device:c.A.oneOf(["mobile","desktop","mediaquery"]).description("used for responsive designs, this controls how the styling should behave. you can force mobile/desktop styling or rely on mediaquery to auto-detect").defaultValue("mediaquery"),applyAriaDisabled:c.A.bool.description("Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION").defaultValue(!1)},K=I;var z=o("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/validation/typescriptValidator.js");const $=e=>{throw new Error(`DSControlledRadio:: ${e}
  `)},Q=(e,n)=>{(0,z.D)(e,n,d),typeof e.label>"u"&&typeof e["aria-label"]>"u"&&$("Please provide a label or ariaLabel property to use this component.")},H={CONTAINER:"ds-radio-container",INPUT:"ds-radio",READONLY_HELPER_MSG:"ds-radio-readonly-helper-msg"},L=e=>{const n=(0,l.b)(e,k);Q(e,I);const{checked:a,applyAriaDisabled:p,visualOnly:O,device:D,hasError:M,innerRef:w,value:W,wrapLabel:Z,onChange:q}=n,ee=(0,r.useCallback)(J=>{q&&W&&!p&&q(W,J)},[p,q,W]),te=(0,r.useCallback)(J=>{J.key==="Enter"&&ee(J)},[ee]),se=r.useMemo(()=>({onKeyDown:te}),[te]),{id:ae,disabled:oe,readOnly:U,label:Y,className:le,...de}=(0,m.u)(n,se),X=(0,r.useMemo)(()=>ae||`ds-form-radio-${(0,s.L)(5)}`,[ae]),ie=(0,T.d)(n);return(0,t.jsxs)(y,{device:D,"data-testid":"ds-radio-container",hasLabel:Boolean(Y),className:le,...ie,children:[(0,t.jsx)(V,{device:D,checked:a,hasError:M,disabled:oe,applyAriaDisabled:p,readOnly:U,children:O?null:(0,t.jsx)(f,{"data-testid":"ds-radio",type:"radio",...se,...de,id:X,innerRef:w,onChange:ee,checked:a,disabled:oe,"aria-disabled":p||U,"aria-invalid":M,"aria-describedby":U?`${X}-read-only-helper-msg`:void 0})}),Y&&(0,t.jsx)(j,{device:D,htmlFor:X,disabled:oe||p,readOnly:U,checked:a,"data-testid":"ds-radio-label",children:Z?(0,t.jsx)(b,{children:Y}):(0,t.jsx)(R.n,{value:Y})}),U?(0,t.jsx)(u,{"data-testid":H.READONLY_HELPER_MSG,id:`${X}-read-only-helper-msg`,children:"Read only"}):null]})};L.displayName="DSControlledRadio";const ne=(0,g.A)(L);ne.propTypes=K;const B=({...e})=>(0,t.jsx)(L,{...e}),re=({...e})=>jsx(Radio,{...e,visualOnly:!0})},"./node_modules/.pnpm/@elliemae+ds-truncated-tooltip-text@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-truncated-tooltip-text/dist/esm/SimpleTruncatedTooltipText.js":(G,v,o)=>{o.d(v,{n:()=>C});var r=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),t=o("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),l=o("./node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"),m=o("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/styled.js"),T=o("./node_modules/.pnpm/styled-components@5.3.11_react-dom@18.3.1_react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js"),g=o("./node_modules/.pnpm/@elliemae+ds-legacy-popover@1.0.16_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-legacy-popover/dist/esm/DSPopover.js"),s=o("./node_modules/.pnpm/@elliemae+ds-legacy-popper@1.0.16_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-legacy-popper/dist/esm/positions.js");const R=(d,i)=>{const y=(0,r.useRef)(),V=(0,r.useCallback)(()=>{const f=y.current;f&&(y.current=void 0,clearTimeout(f))},[y]);return[(0,r.useCallback)((...f)=>{y.current=setTimeout(()=>d(...f),i)},[d,i]),V]};var x=null;const E="DS-SimpleTruncateText",_=({offsetWidth:d,scrollWidth:i})=>d<i,S=(d="",i={})=>({reference:null,visible:!1,value:d,options:i}),P=m.I.span`
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
`,C=d=>{const{containerProps:i,tooltipDelay:y,placement:V,value:h,zIndex:f,tooltipOptions:j,textOptions:b}=d,[u,F]=(0,r.useState)(S(h,j)),N=(0,r.useCallback)(B=>{F({...u,...B,visible:!0})},[u]),c=(0,r.useCallback)(B=>{F({...u,...B,visible:!1})},[u]),[k,I]=R(N,y),K=(0,r.useCallback)(B=>{const{target:re}=B,e=re.closest(`[data-testid="${E}"]`);e&&_(e)&&k({value:h,reference:e})},[k,h]),z=(0,r.useCallback)(()=>{I(),c({reference:null})},[c,I]),$=(0,r.useMemo)(()=>k?{onMouseEnter:K,onMouseLeave:z}:{},[k,K,z]),Q=(0,r.useContext)(T.Dx),H=(0,r.useMemo)(()=>(0,t.jsx)(t.Fragment,{children:u.visible?(0,t.jsx)(g.F0,{boundaries:"window",style:{pointerEvents:"none",zIndex:f??Q.zIndex.tooltip},placement:V,content:u.value,referenceEl:u.reference,visible:u.visible,showArrow:!0}):null}),[u,V,f]),L=(0,r.useMemo)(()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(P,{...i&&{...i},...b&&{...b},...$&&{...$},"data-testid":E,children:h})}),[i,b,$,h]);return(0,r.useMemo)(()=>(0,t.jsxs)(t.Fragment,{children:[L,H]}),[L,H])};C.propTypes={containerProps:l.object,tooltipOptions:l.object,textOptions:l.object,value:l.oneOfType([l.string,l.number,l.node]),placement:l.oneOf([s.y.AUTO_START,s.y.AUTO_END,s.y.AUTO,s.y.TOP_START,s.y.TOP,s.y.TOP_END,s.y.RIGHT_START,s.y.RIGHT,s.y.RIGHT_END,s.y.BOTTOM_START,s.y.BOTTOM,s.y.BOTTOM_END,s.y.LEFT_START,s.y.LEFT,s.y.LEFT_END]),tooltipDelay:l.number,zIndex:l.number},C.defaultProps={containerProps:{},tooltipOptions:{},textOptions:{},value:"",placement:s.y.TOP,tooltipDelay:200};var A=null}}]);
