"use strict";(globalThis.webpackChunk_elliemae_pui_app_sdk=globalThis.webpackChunk_elliemae_pui_app_sdk||[]).push([[6531],{"./lib/view/fields/connect-form.tsx":(G,_,e)=>{e.d(_,{$:()=>t});var r=e("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),t=function(a){var b=a.children,x=(0,r.xW)();return b(Object.assign({},x))}},"./lib/view/fields/radio/index.stories.tsx":(G,_,e)=>{e.r(_),e.d(_,{Basic:()=>R,__namedExportsOrder:()=>E,default:()=>S});var r=e("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/jsx.js"),t=e.n(r),a=e("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),b=e.n(a),x=e("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),m=e("./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=e("./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"),j=e("./lib/view/form/index.tsx"),d=e("./lib/view/fields/radio/index.tsx"),y=e("./lib/view/fields/connect-form.tsx"),c=e("./lib/view/fields/watch-value.tsx"),v=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),g,T=["name"],O=`
    
    // @ts-nocheck
    // @ts-ignore
    var __STORY__ = "import { Story, Meta } from '@storybook/react';\\nimport { FieldError, get } 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';\\nimport { WatchValue } from '../watch-value.js';\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form {...rest}>\\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        <DSButtonV2 type=\\"submit\\">Submit</DSButtonV2>\\n        <WatchValue name={name} label={rest.labelText} {...rest} />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n  component: Radio,\\n} as Meta;\\n\\nexport const Basic = Template.bind({});\\n\\nBasic.args = {\\n  name: 'gender',\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: false,\\n  reactHookFormProps: { mode: 'onSubmit' },\\n  onSubmit: () => {\\n    \\n    console.log('form submitted');\\n  },\\n};\\n";
    // @ts-ignore
    var __LOCATIONS_MAP__ = {"Basic":{"startLoc":{"col":36,"line":10},"endLoc":{"col":1,"line":27},"startBody":{"col":36,"line":10},"endBody":{"col":1,"line":27}}};
    
import { Story, Meta } from '@storybook/react';
import { FieldError, get } 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';
import { WatchValue } from '../watch-value.js';

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

export default {parameters: {"storySource":{"source":"import { Story, Meta } from '@storybook/react';\\nimport { FieldError, get } 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';\\nimport { WatchValue } from '../watch-value.js';\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form {...rest}>\\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        <DSButtonV2 type=\\"submit\\">Submit</DSButtonV2>\\n        <WatchValue name={name} label={rest.labelText} {...rest} />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n  component: Radio,\\n} as Meta;\\n\\nexport const Basic = Template.bind({});\\n\\nBasic.args = {\\n  name: 'gender',\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: false,\\n  reactHookFormProps: { mode: 'onSubmit' },\\n  onSubmit: () => {\\n    \\n    console.log('form submitted');\\n  },\\n};\\n","locationsMap":{"basic":{"startLoc":{"col":36,"line":10},"endLoc":{"col":1,"line":27},"startBody":{"col":36,"line":10},"endBody":{"col":1,"line":27}}}},},
  title: 'Components/Form/Controls/Radio',
  component: Radio,
} as Meta;

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

Basic.args = {
  name: 'gender',
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: false,
  reactHookFormProps: { mode: 'onSubmit' },
  onSubmit: () => {
    
    console.log('form submitted');
  },
};
`,p={Basic:{startLoc:{col:36,line:18},endLoc:{col:1,line:35},startBody:{col:36,line:18},endBody:{col:1,line:35}}},O=`import { Story, Meta } from '@storybook/react';
import { FieldError, get } 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';
import { WatchValue } from '../watch-value.js';

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

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

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

Basic.args = {
  name: 'gender',
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: false,
  reactHookFormProps: { mode: 'onSubmit' },
  onSubmit: () => {
    
    console.log('form submitted');
  },
};
`,p={Basic:{startLoc:{col:36,line:10},endLoc:{col:1,line:27},startBody:{col:36,line:10},endBody:{col:1,line:27}}},i=function(h){var M=h.name,C=b()(h,T);return t()(m.Ay,{p:"m"},void 0,(0,v.jsx)(j.l,Object.assign({},C,{children:t()(m.Ay,{gutter:"xs"},void 0,t()(m.Ay,{},void 0,t()(y.$,{},void 0,function(f){var A=f.formState.errors,I=!!(0,x.Jt)(A,M);return(0,v.jsx)(d.s,Object.assign({name:M},C,{hasError:I}))})),g||(g=t()(s.e,{type:"submit"},void 0,"Submit")),(0,v.jsx)(c.n,Object.assign({name:M,label:C.labelText},C)))})))};i.displayName="Template";const S={parameters:{storySource:{source:`
    
    // @ts-nocheck
    // @ts-ignore
    var __STORY__ = "import { Story, Meta } from '@storybook/react';\\nimport { FieldError, get } 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';\\nimport { WatchValue } from '../watch-value.js';\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form {...rest}>\\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        <DSButtonV2 type=\\"submit\\">Submit</DSButtonV2>\\n        <WatchValue name={name} label={rest.labelText} {...rest} />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n  component: Radio,\\n} as Meta;\\n\\nexport const Basic = Template.bind({});\\n\\nBasic.args = {\\n  name: 'gender',\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: false,\\n  reactHookFormProps: { mode: 'onSubmit' },\\n  onSubmit: () => {\\n    \\n    console.log('form submitted');\\n  },\\n};\\n";
    // @ts-ignore
    var __LOCATIONS_MAP__ = {"Basic":{"startLoc":{"col":36,"line":10},"endLoc":{"col":1,"line":27},"startBody":{"col":36,"line":10},"endBody":{"col":1,"line":27}}};
    
import { Story, Meta } from '@storybook/react';
import { FieldError, get } 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';
import { WatchValue } from '../watch-value.js';

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

export default {parameters: {"storySource":{"source":"import { Story, Meta } from '@storybook/react';\\nimport { FieldError, get } 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';\\nimport { WatchValue } from '../watch-value.js';\\n\\nconst Template: Story<RadioProps> = ({ name, ...rest }) => (\\n  <Grid p=\\"m\\">\\n    <Form {...rest}>\\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        <DSButtonV2 type=\\"submit\\">Submit</DSButtonV2>\\n        <WatchValue name={name} label={rest.labelText} {...rest} />\\n      </Grid>\\n    </Form>\\n  </Grid>\\n);\\n\\nexport default {\\n  title: 'Components/Form/Controls/Radio',\\n  component: Radio,\\n} as Meta;\\n\\nexport const Basic = Template.bind({});\\n\\nBasic.args = {\\n  name: 'gender',\\n  labelText: 'Male',\\n  rules: { required: { value: true, message: 'Please select a gender' } },\\n  defaultChecked: false,\\n  reactHookFormProps: { mode: 'onSubmit' },\\n  onSubmit: () => {\\n    \\n    console.log('form submitted');\\n  },\\n};\\n","locationsMap":{"basic":{"startLoc":{"col":36,"line":10},"endLoc":{"col":1,"line":27},"startBody":{"col":36,"line":10},"endBody":{"col":1,"line":27}}}},},
  title: 'Components/Form/Controls/Radio',
  component: Radio,
} as Meta;

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

Basic.args = {
  name: 'gender',
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: false,
  reactHookFormProps: { mode: 'onSubmit' },
  onSubmit: () => {
    
    console.log('form submitted');
  },
};
`,locationsMap:{basic:{startLoc:{col:36,line:18},endLoc:{col:1,line:35},startBody:{col:36,line:18},endBody:{col:1,line:35}}}},storySource:{source:`import { Story, Meta } from '@storybook/react';
import { FieldError, get } 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';
import { WatchValue } from '../watch-value.js';

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

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

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

Basic.args = {
  name: 'gender',
  labelText: 'Male',
  rules: { required: { value: true, message: 'Please select a gender' } },
  defaultChecked: false,
  reactHookFormProps: { mode: 'onSubmit' },
  onSubmit: () => {
    
    console.log('form submitted');
  },
};
`,locationsMap:{basic:{startLoc:{col:36,line:10},endLoc:{col:1,line:27},startBody:{col:36,line:10},endBody:{col:1,line:27}}}}},title:"Components/Form/Controls/Radio",component:d.s};var R=i.bind({});R.args={name:"gender",labelText:"Male",rules:{required:{value:!0,message:"Please select a gender"}},defaultChecked:!1,reactHookFormProps:{mode:"onSubmit"},onSubmit:function(){}};var E=["Basic"]},"./lib/view/fields/radio/index.tsx":(G,_,e)=>{e.d(_,{s:()=>y});var r=e("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/jsx.js"),t=e.n(r),a=e("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),b=e.n(a),x=e("./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"),m=e("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),s=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),j=["name","defaultChecked","rules","labelText"],d=["onChange","value"],y=function(c){var v=c.name,g=c.defaultChecked,T=g===void 0?!1:g,O=c.rules,p=O===void 0?{}:O,i=c.labelText,S=b()(c,j);return t()(m.xI,{name:v,rules:p,defaultValue:T,render:function(R){var E,h=R.field,M=h.onChange,C=h.value,f=b()(h,d);return(0,s.jsx)(x.vz,Object.assign({label:i},S,f,{value:(E=S.value)!==null&&E!==void 0?E:C.toString(),checked:C,onChange:function(A){return M(!((A||{}).target||{}).checked)}}))}})};y.displayName="Radio"},"./lib/view/fields/watch-value.tsx":(G,_,e)=>{e.d(_,{n:()=>d});var r=e("./node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/jsx.js"),t=e.n(r),a=e("./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"),b=e("./node_modules/.pnpm/@elliemae+ds-grid@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-grid/dist/esm/Grid.js"),x=e("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),m,s=a.Ay.section.withConfig({componentId:"sc-1va6d9p-0"})(["margin-top:10px;border-top:2px blue dotted;width:100%;"]),j=a.Ay.div.withConfig({componentId:"sc-1va6d9p-1"})(["display:flex;flex-direction:column;padding-left:10px;align-items:flex-start;"]),d=function(y){var c=y.name,v=y.label,g=(0,x.xW)(),T=g.watch,O=T(c,!1)||"";return t()(b.Ay,{},void 0,t()(s,{},void 0,m||(m=t()("h4",{},void 0,"Form Data:")),t()(j,{},void 0,t()("div",{},void 0,v," : ",t()("strong",{},void 0,JSON.stringify(O))))))};d.displayName="WatchValue"},"./lib/view/form/index.tsx":(G,_,e)=>{e.d(_,{l:()=>x});var r=e("./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=e("./node_modules/.pnpm/react-hook-form@7.63.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs"),a=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),b=r.Ay.form.withConfig({componentId:"sc-1pyjvv3-0"})(["width:100%;"]),x=function(m){var s=m.classname,j=m.reactHookFormProps,d=j===void 0?{mode:"onBlur"}:j,y=m.children,c=m.onSubmit,v=(0,t.mN)(d),g={};c&&(g.onSubmit=v.handleSubmit(c));var T=Object.assign(v,{formProps:d});return(0,a.jsx)(t.Op,Object.assign({},T,{children:(0,a.jsx)(b,Object.assign({className:s},g,{children:y}))}))};x.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,_,e)=>{e.d(_,{vz:()=>L});var r=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),t=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),a=e("./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"),b=e("./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"),x=e("./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"),m=e("./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=e("./node_modules/.pnpm/uid@2.0.2/node_modules/uid/dist/index.mjs"),j=e("./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"),d=e("./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"),y=e("./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"),c=e("./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"),v=e("./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 g=({colors:o},n,l,u,B,D)=>D?o.danger[900]:u||B?o.neutral[500]:o.brand[600],T=(o,n,l,u,B,D=!1,F="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: ${g(o,n,D,l,u,B)};
`,U=`
    @media (max-width: ${o.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: ${o.breakpoints.small}) {
      width: 0.75rem; /* 12px / 16 */
      height: 0.75rem; /* 12px / 16 */
    }
  `;return n?`&:before {
        ${F==="mediaquery"?U:F==="mobile"?Z:w}
    }`:""},O=({colors:o},n,l)=>n?o.neutral["080"]:l?o.neutral["050"]:o.neutral["000"],p="DSRadio",i={CONTAINER:"root",INPUT:"input",LABEL:"label"},S=(0,d.I)("div",{name:p,slot:i.CONTAINER})`
  ${({device:o,theme:n})=>o==="mobile"?`    
      @media (max-width: ${n.breakpoints.small}) {
      grid-template-columns: 1.5rem auto; /* 24px / 16px */
    }
      grid-template-columns: 1.846rem auto;
      `:o==="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:o})=>o?"column-gap: 8px;":""}
  display: inline-grid;
  grid-template-rows: min-content;

  align-items: center;
  ${y.L1}
`,R=(0,d.I)("span")`
  ${({device:o,theme:n})=>o==="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 */`:o==="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:o,hasError:n})=>n?o.colors.danger[900]:o.colors.neutral[400]};
  border-radius: 50px;
  position: relative;
  background: ${({theme:o,disabled:n,applyAriaDisabled:l,readOnly:u})=>O(o,n,u||l)};
  ${({theme:o,checked:n,disabled:l,applyAriaDisabled:u,readOnly:B,hasError:D,device:F})=>T(o,n,l||u,B,D,!1,F)}
  &:focus-within {
    ${({theme:o,hasError:n,disabled:l})=>l?void 0:`border: 1px solid ${n?o.colors.danger[900]:o.colors.brand[700]}; outline : 1px solid ${n?o.colors.danger[900]:o.colors.brand[700]} `};
    &:hover {
      ${({theme:o,checked:n,disabled:l,applyAriaDisabled:u,readOnly:B,hasError:D,device:F})=>T(o,n,l||u,B,D,!0,F)}
    }
  }
  &:hover {
    background: ${({theme:o,applyAriaDisabled:n,readOnly:l,disabled:u})=>n||l?o.colors.neutral["050"]:!u&&!n?o.colors.brand[200]:void 0};
    ${({theme:o,hasError:n,disabled:l})=>!n&&!l?` border: 1px solid  ${o.colors.brand[600]}`:void 0};
  }
`,E=(0,c.AH)`
  &:hover {
    cursor: pointer;
  }
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
`,h=(0,d.I)("input",{name:p,slot:i.INPUT})`
  ${E}
  &:disabled, &[aria-disabled='true'] {
    cursor: not-allowed;
  }
`,M=(0,d.I)("label",{name:p,slot:i.LABEL})`
  color: ${({theme:o,disabled:n,readOnly:l})=>n||l?o.colors.neutral[700]:o.colors.neutral[800]};
  line-height: 1.2307rem;
  @media (max-width: ${v.th.breakpoint("small")}) {
    line-height: 1rem; /* 13px / 16 */
  }
  ${({device:o,theme:n})=>o==="mobile"?`
        @media (max-width: ${n.breakpoints.small}) {
          font-size: 1rem;  /* 16px / 16 */
        }
        font-size: 1.2307rem; /* 16px / 13 */
        `:o===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:o})=>o?`&:hover {
    cursor: not-allowed;
  }`:`&:hover {
    cursor: pointer;
  }`}
`,C=(0,d.I)("span")``,f=d.I.p`
  display: none;
`;var A=e("./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"),I=e("./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"),P=e("./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"},V={...A.P,...I.w,value:P.A.string.description("Radio value"),onChange:P.A.func.description("Radio onchange callback").signature("((newValue: string,e:  React.ChangeEvent | React.KeyboardEvent) => void)"),label:P.A.string.description("Radio Label property. This label is also going to be used as an aria-label for screen readers."),checked:P.A.bool.description("Whether the radio is checked or not"),hasError:P.A.bool.description("Whether the radio has error or not."),innerRef:P.A.oneOfType([P.A.func,P.A.object]).description("Radio input ref."),wrapLabel:P.A.bool.description("Whether to wrap or truncate the label"),device:P.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:P.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=V;var H=e("./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 $=o=>{throw new Error(`DSControlledRadio:: ${o}
  `)},Q=(o,n)=>{(0,H.D)(o,n,p),typeof o.label>"u"&&typeof o["aria-label"]>"u"&&$("Please provide a label or ariaLabel property to use this component.")},z={CONTAINER:"ds-radio-container",INPUT:"ds-radio",READONLY_HELPER_MSG:"ds-radio-readonly-helper-msg"},W=o=>{const n=(0,a.b)(o,k);Q(o,V);const{checked:l,applyAriaDisabled:u,visualOnly:B,device:D,hasError:F,innerRef:w,value:U,wrapLabel:Z,onChange:q}=n,ee=(0,r.useCallback)(J=>{q&&U&&!u&&q(U,J)},[u,q,U]),re=(0,r.useCallback)(J=>{J.key==="Enter"&&ee(J)},[ee]),se=r.useMemo(()=>({onKeyDown:re}),[re]),{id:ae,disabled:oe,readOnly:N,label:Y,className:le,...ie}=(0,b.u)(n,se),X=(0,r.useMemo)(()=>ae||`ds-form-radio-${(0,s.L)(5)}`,[ae]),de=(0,x.d)(n);return(0,t.jsxs)(S,{device:D,"data-testid":"ds-radio-container",hasLabel:Boolean(Y),className:le,...de,children:[(0,t.jsx)(R,{device:D,checked:l,hasError:F,disabled:oe,applyAriaDisabled:u,readOnly:N,children:B?null:(0,t.jsx)(h,{"data-testid":"ds-radio",type:"radio",...se,...ie,id:X,innerRef:w,onChange:ee,checked:l,disabled:oe,"aria-disabled":u||N,"aria-invalid":F,"aria-describedby":N?`${X}-read-only-helper-msg`:void 0})}),Y&&(0,t.jsx)(M,{device:D,htmlFor:X,disabled:oe||u,readOnly:N,checked:l,"data-testid":"ds-radio-label",children:Z?(0,t.jsx)(C,{children:Y}):(0,t.jsx)(j.n,{value:Y})}),N?(0,t.jsx)(f,{"data-testid":z.READONLY_HELPER_MSG,id:`${X}-read-only-helper-msg`,children:"Read only"}):null]})};W.displayName="DSControlledRadio";const ne=(0,m.A)(W);ne.propTypes=K;const L=({...o})=>(0,t.jsx)(W,{...o}),te=({...o})=>jsx(Radio,{...o,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,_,e)=>{e.d(_,{n:()=>T});var r=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),t=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),a=e("./node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"),b=e("./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"),x=e("./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"),m=e("./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=e("./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 j=(p,i)=>{const S=(0,r.useRef)(),R=(0,r.useCallback)(()=>{const h=S.current;h&&(S.current=void 0,clearTimeout(h))},[S]);return[(0,r.useCallback)((...h)=>{S.current=setTimeout(()=>p(...h),i)},[p,i]),R]};var d=null;const y="DS-SimpleTruncateText",c=({offsetWidth:p,scrollWidth:i})=>p<i,v=(p="",i={})=>({reference:null,visible:!1,value:p,options:i}),g=b.I.span`
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
`,T=p=>{const{containerProps:i,tooltipDelay:S,placement:R,value:E,zIndex:h,tooltipOptions:M,textOptions:C}=p,[f,A]=(0,r.useState)(v(E,M)),I=(0,r.useCallback)(L=>{A({...f,...L,visible:!0})},[f]),P=(0,r.useCallback)(L=>{A({...f,...L,visible:!1})},[f]),[k,V]=j(I,S),K=(0,r.useCallback)(L=>{const{target:te}=L,o=te.closest(`[data-testid="${y}"]`);o&&c(o)&&k({value:E,reference:o})},[k,E]),H=(0,r.useCallback)(()=>{V(),P({reference:null})},[P,V]),$=(0,r.useMemo)(()=>k?{onMouseEnter:K,onMouseLeave:H}:{},[k,K,H]),Q=(0,r.useContext)(x.Dx),z=(0,r.useMemo)(()=>(0,t.jsx)(t.Fragment,{children:f.visible?(0,t.jsx)(m.F0,{boundaries:"window",style:{pointerEvents:"none",zIndex:h??Q.zIndex.tooltip},placement:R,content:f.value,referenceEl:f.reference,visible:f.visible,showArrow:!0}):null}),[f,R,h]),W=(0,r.useMemo)(()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(g,{...i&&{...i},...C&&{...C},...$&&{...$},"data-testid":y,children:E})}),[i,C,$,E]);return(0,r.useMemo)(()=>(0,t.jsxs)(t.Fragment,{children:[W,z]}),[W,z])};T.propTypes={containerProps:a.object,tooltipOptions:a.object,textOptions:a.object,value:a.oneOfType([a.string,a.number,a.node]),placement:a.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:a.number,zIndex:a.number},T.defaultProps={containerProps:{},tooltipOptions:{},textOptions:{},value:"",placement:s.y.TOP,tooltipDelay:200};var O=null}}]);
