import{j as i}from"./jsx-runtime-ffb262ed.js";import{c as O,d as V,e as T,f as h}from"./import-895c2736.js";import{g as C}from"./_commonjsHelpers-de833af9.js";import"./index-76fb7be0.js";import"./index-add592e3.js";var A={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(a){(function(){var n={}.hasOwnProperty;function r(){for(var t=[],l=0;l<arguments.length;l++){var e=arguments[l];if(e){var p=typeof e;if(p==="string"||p==="number")t.push(e);else if(Array.isArray(e)){if(e.length){var g=r.apply(null,e);g&&t.push(g)}}else if(p==="object"){if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){t.push(e.toString());continue}for(var f in e)n.call(e,f)&&e[f]&&t.push(f)}}}return t.join(" ")}a.exports?(r.default=r,a.exports=r):window.classNames=r})()})(A);var M=A.exports;const x=C(M);function m({title:a,description:n,error:r,...t}){return i.jsxs(O,{...t,className:x("q field",`field-${t.name}`),children:[i.jsx(V,{className:x("q input",{error:r})}),i.jsx(T,{className:"q label",children:a}),n&&i.jsx(h,{slot:"description",className:"q hint",children:n}),r==null?void 0:r.map(l=>i.jsx(h,{slot:"errorMessage",className:"q assist",children:l},l))]})}try{m.displayName="Input",m.__docgenInfo={description:"",displayName:"Input",props:{title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string[] | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}}}}}catch{}const J={title:"Input",component:m,tags:["autodocs"],decorators:[a=>i.jsx("div",{style:{width:"400px"},children:i.jsx(a,{})})],argTypes:{value:{control:{disable:!0}}}},s={args:{name:"field-empty",title:"field 1 title",description:"Optional help text",placeholder:"Type something…"}},d={args:{...s.args,name:"field-required",isRequired:!0}},o={args:{...s.args,name:"field-filled",title:"Filled field title",value:"Filled with value A",isRequired:!0}},c={args:{...s.args,name:"field-errored",title:"Errored field title",value:"Filled with value A",error:["This is the error"],isInvalid:!0,isRequired:!0}},u={args:{...s.args,name:"field-disabled",title:"Disabled field title",isDisabled:!0}};var b,v,q;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:`{
  // render: (args) => <InputRender {...args} />,
  args: {
    name: 'field-empty',
    title: 'field 1 title',
    description: 'Optional help text',
    placeholder: 'Type something…'
  }
}`,...(q=(v=s.parameters)==null?void 0:v.docs)==null?void 0:q.source}}};var y,j,D;d.parameters={...d.parameters,docs:{...(y=d.parameters)==null?void 0:y.docs,source:{originalSource:`{
  args: {
    ...Default.args,
    name: 'field-required',
    isRequired: true
  }
}`,...(D=(j=d.parameters)==null?void 0:j.docs)==null?void 0:D.source}}};var $,R,S;o.parameters={...o.parameters,docs:{...($=o.parameters)==null?void 0:$.docs,source:{originalSource:`{
  args: {
    ...Default.args,
    name: 'field-filled',
    title: 'Filled field title',
    value: 'Filled with value A',
    isRequired: true
  }
}`,...(S=(R=o.parameters)==null?void 0:R.docs)==null?void 0:S.source}}};var _,w,F;c.parameters={...c.parameters,docs:{...(_=c.parameters)==null?void 0:_.docs,source:{originalSource:`{
  args: {
    ...Default.args,
    name: 'field-errored',
    title: 'Errored field title',
    value: 'Filled with value A',
    error: ['This is the error'],
    isInvalid: true,
    isRequired: true
  }
}`,...(F=(w=c.parameters)==null?void 0:w.docs)==null?void 0:F.source}}};var N,E,I;u.parameters={...u.parameters,docs:{...(N=u.parameters)==null?void 0:N.docs,source:{originalSource:`{
  args: {
    ...Default.args,
    name: 'field-disabled',
    title: 'Disabled field title',
    isDisabled: true
  }
}`,...(I=(E=u.parameters)==null?void 0:E.docs)==null?void 0:I.source}}};const K=["Default","Required","Filled","Errored","Disabled"];export{s as Default,u as Disabled,c as Errored,o as Filled,d as Required,K as __namedExportsOrder,J as default};
//# sourceMappingURL=Input.stories-ebbed4a9.js.map
