suus-component-library 0.1.7 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/components/form/button/Button.d.ts +1 -1
  2. package/dist/components/form/button/Button.d.ts.map +1 -1
  3. package/dist/components/form/chip/Chip.d.ts +11 -3
  4. package/dist/components/form/chip/Chip.d.ts.map +1 -1
  5. package/dist/components/form/password/Password.d.ts +1 -3
  6. package/dist/components/form/password/Password.d.ts.map +1 -1
  7. package/dist/components/form/postal-code/PostalCode.d.ts.map +1 -1
  8. package/dist/components/form/radiobutton/RadioButton.d.ts.map +1 -1
  9. package/dist/components/form/switch/Switch.d.ts +0 -16
  10. package/dist/components/form/switch/Switch.d.ts.map +1 -1
  11. package/dist/index.d.ts +22 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/suus-component-library.css +1 -1
  14. package/dist/suus-component-library.js +913 -24
  15. package/dist/suus-component-library.umd.cjs +1 -1
  16. package/package.json +3 -2
  17. package/dist/components/form/button/Button.stories.d.ts +0 -33
  18. package/dist/components/form/button/Button.stories.d.ts.map +0 -1
  19. package/dist/components/form/checkbox/Checkbox.stories.d.ts +0 -25
  20. package/dist/components/form/checkbox/Checkbox.stories.d.ts.map +0 -1
  21. package/dist/components/form/chip/Chip.stories.d.ts +0 -37
  22. package/dist/components/form/chip/Chip.stories.d.ts.map +0 -1
  23. package/dist/components/form/date-picker/DatePicker.stories.d.ts +0 -389
  24. package/dist/components/form/date-picker/DatePicker.stories.d.ts.map +0 -1
  25. package/dist/components/form/dropdown/Dropdown.stories.d.ts +0 -370
  26. package/dist/components/form/dropdown/Dropdown.stories.d.ts.map +0 -1
  27. package/dist/components/form/link/Link.stories.d.ts +0 -56
  28. package/dist/components/form/link/Link.stories.d.ts.map +0 -1
  29. package/dist/components/form/password/Password.stories.d.ts +0 -73
  30. package/dist/components/form/password/Password.stories.d.ts.map +0 -1
  31. package/dist/components/form/postal-code/PostalCode.stories.d.ts +0 -384
  32. package/dist/components/form/postal-code/PostalCode.stories.d.ts.map +0 -1
  33. package/dist/components/form/radiobutton/RadioButton.stories.d.ts +0 -74
  34. package/dist/components/form/radiobutton/RadioButton.stories.d.ts.map +0 -1
  35. package/dist/components/form/switch/Switch.stories.d.ts +0 -62
  36. package/dist/components/form/switch/Switch.stories.d.ts.map +0 -1
  37. package/dist/components/form/textfield/TextField.stories.d.ts +0 -59
  38. package/dist/components/form/textfield/TextField.stories.d.ts.map +0 -1
  39. package/dist/components/form/upload/Upload.stories.d.ts +0 -389
  40. package/dist/components/form/upload/Upload.stories.d.ts.map +0 -1
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react/jsx-runtime`)):typeof define==`function`&&define.amd?define([`exports`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`SUUS Component Library`]={},e.jsxRuntime))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n={suusButton:`_suusButton_1q9to_1`,icon:`_icon_1q9to_45`,label:`_label_1q9to_62`,primary:`_primary_1q9to_69`,secondary:`_secondary_1q9to_113`,loading:`_loading_1q9to_169`,loader:`_loader_1q9to_173`,"btn-spin":`_btn-spin_1q9to_1`,loaderSecondary:`_loaderSecondary_1q9to_182`};function r({label:e,onClick:r,type:i=`button`,disabled:a=!1,loading:o=!1,variant:s=`primary`,colorToken:c=`--colors-juice-sugarcane`,icon:l,...u}){return(0,t.jsx)(`button`,{type:i,onClick:r,disabled:a||o,style:{"--button-background-color":`var(${c})`},className:[n.suusButton,n[s],o?n.loading:``].filter(Boolean).join(` `),"aria-busy":o,...u,children:o?(0,t.jsx)(`span`,{className:`${n.loader} ${s===`primary`?``:n.loaderSecondary}`,"aria-hidden":`true`}):(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(`span`,{className:n.icon,children:l}):null,(0,t.jsx)(`span`,{className:n.label,children:e})]})})}e.Button=r});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react/jsx-runtime`),require(`react`)):typeof define==`function`&&define.amd?define([`exports`,`react/jsx-runtime`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`SUUS Component Library`]={},e.jsxRuntime,e.React))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r={suusButton:`_suusButton_1ucmz_1`,icon:`_icon_1ucmz_45`,label:`_label_1ucmz_62`,primary:`_primary_1ucmz_69`,secondary:`_secondary_1ucmz_113`,loading:`_loading_1ucmz_169`,loader:`_loader_1ucmz_173`,"btn-spin":`_btn-spin_1ucmz_1`,loaderSecondary:`_loaderSecondary_1ucmz_182`};function i({label:e,onClick:n,type:i=`button`,disabled:a=!1,loading:o=!1,variant:s=`primary`,colorToken:c=`--color-juice-sugarcane`,icon:l,...u}){return(0,t.jsx)(`button`,{type:i,onClick:n,disabled:a||o,style:{"--button-background-color":`var(${c})`},className:[r.suusButton,r[s],o?r.loading:``].filter(Boolean).join(` `),"aria-busy":o,...u,children:o?(0,t.jsx)(`span`,{className:`${r.loader} ${s===`primary`?``:r.loaderSecondary}`,"aria-hidden":`true`}):(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(`span`,{className:r.icon,children:l}):null,(0,t.jsx)(`span`,{className:r.label,children:e})]})})}var a={checkboxWrapper:`_checkboxWrapper_6w8h4_1`,checkboxInput:`_checkboxInput_6w8h4_15`,checkboxLabel:`_checkboxLabel_6w8h4_24`,customCheckbox:`_customCheckbox_6w8h4_34`,checkIcon:`_checkIcon_6w8h4_57`,checkboxText:`_checkboxText_6w8h4_76`,checkboxWrapperDisabled:`_checkboxWrapperDisabled_6w8h4_107`,checkboxWrapperError:`_checkboxWrapperError_6w8h4_133`,errorMessage:`_errorMessage_6w8h4_147`,checkboxWrapperGlassy:`_checkboxWrapperGlassy_6w8h4_154`};function o({label:e,name:n,id:r,error:i,variant:o=`default`,className:s,disabled:c,...l}){let u=r??`${n}-checkbox`;return(0,t.jsxs)(`div`,{className:[a.checkboxWrapper,o===`glassy`?a.checkboxWrapperGlassy:``,i?a.checkboxWrapperError:``,c?a.checkboxWrapperDisabled:``,s??``].filter(Boolean).join(` `),children:[(0,t.jsx)(`input`,{type:`checkbox`,id:u,name:n,disabled:c,className:a.checkboxInput,"aria-invalid":!!i,"aria-describedby":i?`${n}-error`:void 0,...l}),(0,t.jsxs)(`label`,{htmlFor:u,className:a.checkboxLabel,children:[(0,t.jsx)(`span`,{className:a.customCheckbox,"aria-hidden":`true`,children:(0,t.jsx)(`svg`,{className:a.checkIcon,viewBox:`0 0 24 24`,focusable:`false`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M20 6L9 17L4 12`})})}),(0,t.jsx)(`span`,{className:a.checkboxText,children:e})]}),i&&(0,t.jsx)(`span`,{id:`${n}-error`,className:a.errorMessage,children:i})]})}var s={chip:`_chip_1kgh7_1`,chipDefault:`_chipDefault_1kgh7_21`,chipGlassy:`_chipGlassy_1kgh7_36`,chipChecked:`_chipChecked_1kgh7_49`,chipDisabled:`_chipDisabled_1kgh7_56`};function c({children:e,variant:r=`default`,clickable:i=!0,checked:a,defaultChecked:o=!1,onCheckedChange:c,className:l,...u}){let[d,f]=(0,n.useState)(o),p=typeof a==`boolean`,m=p?a:d;function h(e){if(!i)return;let t=!m;p||f(t),c?.(t),u.onClick?.(e)}let g=r===`glassy`?s.chipGlassy:s.chipDefault,_=m?s.chipChecked:``,v=i?``:s.chipDisabled;return i?(0,t.jsx)(`button`,{type:`button`,"aria-pressed":m,className:[s.chip,g,_,l??``].filter(Boolean).join(` `),onClick:h,...u,children:e}):(0,t.jsx)(`span`,{className:[s.chip,g,_,v,l??``].filter(Boolean).join(` `),children:e})}var l={inputBlockVertical:`_inputBlockVertical_1vqyb_1`,inputLabel:`_inputLabel_1vqyb_7`,inputLabelGlassy:`_inputLabelGlassy_1vqyb_13`,dateInputWrapper:`_dateInputWrapper_1vqyb_17`,inputDateField:`_inputDateField_1vqyb_22`,inputDateFieldGlassy:`_inputDateFieldGlassy_1vqyb_54`,inputError:`_inputError_1vqyb_72`,calendarIconButton:`_calendarIconButton_1vqyb_76`,icon:`_icon_1vqyb_104`,errorMessage:`_errorMessage_1vqyb_113`};function u({label:e,name:r,id:i,value:a=null,maxDate:o,minDate:s,error:c,variant:u=`default`,className:m,ref:h,onDateChange:g,onBlur:_,disabled:v,...y}){let b=i??r,x=(0,n.useRef)(null),S=o??new Date;function C(e){x.current=e,typeof h==`function`?h(e):h&&(h.current=e)}function w(e){let t=e.target.value;if(!t){g?.(null);return}g?.(f(t))}function T(){v||(x.current?.showPicker?.(),x.current?.focus())}return(0,t.jsxs)(`div`,{className:l.inputBlockVertical,children:[(0,t.jsx)(`label`,{htmlFor:b,className:[l.inputLabel,u===`glassy`?l.inputLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsxs)(`div`,{className:l.dateInputWrapper,children:[(0,t.jsx)(`input`,{id:b,name:r,ref:C,type:`date`,value:d(a),max:d(S),min:s?d(s):void 0,disabled:v,onChange:w,onBlur:_,className:[l.inputDateField,u===`glassy`?l.inputDateFieldGlassy:``,c?l.inputError:``,m??``].filter(Boolean).join(` `),"aria-invalid":!!c,"aria-describedby":c?`${r}-error`:void 0,...y}),(0,t.jsx)(`button`,{type:`button`,className:l.calendarIconButton,onClick:T,disabled:v,"aria-label":`Datum auswählen`,tabIndex:-1,children:(0,t.jsx)(p,{})})]}),c&&(0,t.jsx)(`span`,{id:`${r}-error`,className:l.errorMessage,children:c})]})}function d(e){return e?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:``}function f(e){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)}function p(){return(0,t.jsxs)(`svg`,{className:l.icon,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,t.jsx)(`path`,{d:`M8 2V5`}),(0,t.jsx)(`path`,{d:`M16 2V5`}),(0,t.jsx)(`path`,{d:`M3.5 9.09H20.5`}),(0,t.jsx)(`path`,{d:`M21 8.5V17.5C21 20 19.75 21.5 16.75 21.5H7.25C4.25 21.5 3 20 3 17.5V8.5C3 6 4.25 4.5 7.25 4.5H16.75C19.75 4.5 21 6 21 8.5Z`})]})}var m={inputBlockVertical:`_inputBlockVertical_1yqyz_1`,inputLabel:`_inputLabel_1yqyz_7`,inputLabelGlassy:`_inputLabelGlassy_1yqyz_13`,inputSelectField:`_inputSelectField_1yqyz_17`,inputSelectFieldGlassy:`_inputSelectFieldGlassy_1yqyz_27`,inputError:`_inputError_1yqyz_40`,errorMessage:`_errorMessage_1yqyz_44`};function h({label:e,name:n,options:r,placeholder:i,error:a,variant:o=`default`,className:s,disabled:c,...l}){return(0,t.jsxs)(`div`,{className:m.inputBlockVertical,children:[(0,t.jsx)(`label`,{htmlFor:n,className:[m.inputLabel,o===`glassy`?m.inputLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsxs)(`select`,{id:n,name:n,disabled:c,className:[m.inputSelectField,o===`glassy`?m.inputSelectFieldGlassy:``,a?m.inputError:``,s??``].filter(Boolean).join(` `),"aria-invalid":!!a,"aria-describedby":a?`${n}-error`:void 0,...l,children:[i&&(0,t.jsx)(`option`,{value:``,disabled:!0,children:i}),r.map(e=>(0,t.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),a&&(0,t.jsx)(`span`,{id:`${n}-error`,className:m.errorMessage,children:a})]})}var g={appLink:`_appLink_b53rv_1`,appLinkDefault:`_appLinkDefault_b53rv_19`,appLinkGlassy:`_appLinkGlassy_b53rv_30`,label:`_label_b53rv_38`,icon:`_icon_b53rv_43`,arrowIcon:`_arrowIcon_b53rv_54`};function _({children:e,href:n,onClick:r,newTab:i=!1,showArrow:a=!0,variant:o=`default`,className:s,...c}){function l(e){n||e.preventDefault(),r?.(e)}return(0,t.jsxs)(`a`,{href:n??`#`,onClick:l,target:n&&i?`_blank`:void 0,rel:n&&i?`noopener noreferrer`:void 0,className:[g.appLink,o===`glassy`?g.appLinkGlassy:g.appLinkDefault,s??``].filter(Boolean).join(` `),...c,children:[(0,t.jsx)(`span`,{className:g.label,children:e}),a&&(0,t.jsx)(`span`,{className:g.icon,"aria-hidden":`true`,children:(0,t.jsx)(v,{})})]})}function v(){return(0,t.jsxs)(`svg`,{className:g.arrowIcon,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,t.jsx)(`path`,{d:`M5 12H19`}),(0,t.jsx)(`path`,{d:`M13 6L19 12L13 18`})]})}var y={inputBlockVertical:`_inputBlockVertical_u3s35_1`,inputLabel:`_inputLabel_u3s35_7`,inputLabelGlassy:`_inputLabelGlassy_u3s35_13`,passwordInputWrapper:`_passwordInputWrapper_u3s35_17`,inputTextField:`_inputTextField_u3s35_22`,inputTextFieldGlassy:`_inputTextFieldGlassy_u3s35_34`,inputError:`_inputError_u3s35_56`,togglePasswordButton:`_togglePasswordButton_u3s35_60`,icon:`_icon_u3s35_92`,errorMessage:`_errorMessage_u3s35_101`};function b({label:e,name:r,id:i,error:a,variant:o=`default`,className:s,disabled:c,ref:l,autoComplete:u=`current-password`,...d}){let[f,p]=(0,n.useState)(!1),m=i??r;function h(){p(e=>!e)}return(0,t.jsxs)(`div`,{className:y.inputBlockVertical,children:[e&&(0,t.jsx)(`label`,{htmlFor:m,className:[y.inputLabel,o===`glassy`?y.inputLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsxs)(`div`,{className:y.passwordInputWrapper,children:[(0,t.jsx)(`input`,{id:m,name:r,ref:l,type:f?`text`:`password`,disabled:c,autoComplete:u,className:[y.inputTextField,o===`glassy`?y.inputTextFieldGlassy:``,a?y.inputError:``,s??``].filter(Boolean).join(` `),"aria-invalid":!!a,"aria-describedby":a?`${r}-error`:void 0,...d}),(0,t.jsx)(`button`,{type:`button`,className:y.togglePasswordButton,onClick:h,disabled:c,"aria-label":f?`Passwort ausblenden`:`Passwort anzeigen`,"aria-pressed":f,children:f?(0,t.jsx)(S,{}):(0,t.jsx)(x,{})})]}),a&&(0,t.jsx)(`span`,{id:`${r}-error`,className:y.errorMessage,children:a})]})}function x(){return(0,t.jsxs)(`svg`,{className:y.icon,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,t.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),(0,t.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function S(){return(0,t.jsx)(`svg`,{className:y.icon,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M17.94 17.94A10.94 10.94 0 0 1 12 20C7 20 2.73 16.11 1 12c.74-1.64 1.82-3.06 3.11-4.24m3.52-2.42A10.94 10.94 0 0 1 12 4c5 0 9.27 3.89 11 8-1.1 2.42-2.91 4.5-5.06 5.94M1 1l22 22`})})}var C={inputBlockVertical:`_inputBlockVertical_1xe0h_1`,inputLabel:`_inputLabel_1xe0h_7`,inputLabelGlassy:`_inputLabelGlassy_1xe0h_13`,inputWrapper:`_inputWrapper_1xe0h_17`,inputTextField:`_inputTextField_1xe0h_22`,inputTextFieldGlassy:`_inputTextFieldGlassy_1xe0h_34`,inputError:`_inputError_1xe0h_64`,loading:`_loading_1xe0h_68`,suggestionList:`_suggestionList_1xe0h_77`,suggestionItem:`_suggestionItem_1xe0h_94`,locality:`_locality_1xe0h_114`,emptyState:`_emptyState_1xe0h_118`,successMessage:`_successMessage_1xe0h_129`,errorMessage:`_errorMessage_1xe0h_135`};function w({label:e,name:r,id:i,error:a,variant:o=`default`,className:s,disabled:c,placeholder:l=`z.B. 8001 oder Zürich`,ref:u,onChange:d,onBlur:f,onValueChange:p,onSuggestionSelect:m,...h}){let g=(0,n.useId)(),_=i??`${r}-${g}`,v=(0,n.useRef)(null),y=(0,n.useRef)(!1),[b,x]=(0,n.useState)(``),[S,w]=(0,n.useState)([]),[T,E]=(0,n.useState)(!1),[D,O]=(0,n.useState)(!1),k=b.trim().match(/^(\d+)\s+(.+)$/),A=!!k,j=k?.[1],M=k?.[2],N=A&&S.some(e=>e.postalCode===j&&e.locality===M),P=/^\d+$/.test(b.trim()),F=b.trim().length>=4&&P&&!T,I=F&&S.some(e=>e.postalCode===b.trim()),L=F&&!I;D&&b.trim().length>=4&&S.length,(0,n.useEffect)(()=>{let e=b.trim();if(e.length<2){w([]),O(!1);return}if(y.current){y.current=!1;return}let t=new AbortController;async function n(){E(!0);try{let n=e.match(/^(\d+)\s/),r=n?n[1]:e,i=/^\d+$/.test(r)?`https://openplzapi.org/ch/Localities?postalCode=${r}`:`https://openplzapi.org/ch/Localities?locality=${encodeURIComponent(r)}`,a=await fetch(i,{signal:t.signal});if(!a.ok)throw Error(`Postal-Code-Suche fehlgeschlagen`);let o=await a.json();w(Array.from(new Map(o.map(e=>{let t=`${e.postalCode} ${e.name}`;return[t,{label:t,postalCode:e.postalCode,locality:e.name}]})).values()).slice(0,10)),O(!0)}catch(e){if(t.signal.aborted)return;console.error(e),w([]),O(!0)}finally{t.signal.aborted||E(!1)}}let r=window.setTimeout(n,300);return()=>{window.clearTimeout(r),t.abort()}},[b]);function R(e){v.current=e,typeof u==`function`?u(e):u&&(u.current=e)}function z(e){let t=e.target.value;x(t),p?.(t),d?.(e)}function B(e){y.current=!0,x(e.label),w([]),O(!1),p?.(e.label),m?.(e),v.current&&(v.current.value=e.label,v.current.dispatchEvent(new Event(`input`,{bubbles:!0})))}return(0,t.jsxs)(`div`,{className:C.inputBlockVertical,children:[(0,t.jsx)(`label`,{htmlFor:_,className:[C.inputLabel,o===`glassy`?C.inputLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsxs)(`div`,{className:C.inputWrapper,children:[(0,t.jsx)(`input`,{id:_,name:r,ref:R,type:`text`,inputMode:`search`,autoComplete:`postal-code`,disabled:c,placeholder:l,value:b,onChange:z,onBlur:f,className:[C.inputTextField,o===`glassy`?C.inputTextFieldGlassy:``,I||N?C.inputValid:``,L||a?C.inputError:``,s??``].filter(Boolean).join(` `),"aria-invalid":!!a||L,"aria-describedby":a?`${r}-error`:void 0,...h}),T&&(0,t.jsx)(`span`,{className:C.loading,children:`Lädt…`}),S.length>0&&(0,t.jsx)(`ul`,{className:C.suggestionList,children:S.map(e=>(0,t.jsx)(`li`,{children:(0,t.jsxs)(`button`,{type:`button`,className:C.suggestionItem,onMouseDown:e=>e.preventDefault(),onClick:()=>B(e),children:[(0,t.jsx)(`span`,{children:e.postalCode}),(0,t.jsx)(`span`,{className:C.locality,children:e.locality})]})},e.label))}),D&&b.trim().length>=2&&S.length===0&&!T&&!N&&!L&&(0,t.jsx)(`div`,{className:C.emptyState,children:`Keine Schweizer PLZ oder Ortschaft gefunden.`})]}),I&&(0,t.jsx)(`span`,{className:C.successMessage,children:`Gültige Schweizer Postleitzahl`}),N&&(0,t.jsx)(`span`,{className:C.successMessage,children:`Gültige Schweizer Postleitzahl`}),L&&(0,t.jsx)(`span`,{className:C.errorMessage,children:`Diese Schweizer Postleitzahl wurde nicht gefunden.`}),a&&(0,t.jsx)(`span`,{id:`${r}-error`,className:C.errorMessage,children:a})]})}var T={radioGroup:`_radioGroup_cqfjf_1`,radioGroupGlassy:`_radioGroupGlassy_cqfjf_11`,radioLabel:`_radioLabel_cqfjf_15`,radioLabelGlassy:`_radioLabelGlassy_cqfjf_20`,optionGroup:`_optionGroup_cqfjf_24`,optionWrapper:`_optionWrapper_cqfjf_31`,optionWrapperDisabled:`_optionWrapperDisabled_cqfjf_37`,radioInput:`_radioInput_cqfjf_41`,optionButton:`_optionButton_cqfjf_58`,optionTitle:`_optionTitle_cqfjf_81`,optionDescription:`_optionDescription_cqfjf_87`,optionButtonDefault:`_optionButtonDefault_cqfjf_95`,optionButtonGlassy:`_optionButtonGlassy_cqfjf_120`,optionButtonError:`_optionButtonError_cqfjf_165`,errorMessage:`_errorMessage_cqfjf_169`};function E({label:e,name:n,options:r,error:i,variant:a=`default`,className:o,disabled:s,value:c,defaultValue:l,onChange:u,...d}){let f=c!==void 0;return(0,t.jsxs)(`fieldset`,{className:[T.radioGroup,a===`glassy`?T.radioGroupGlassy:``,o??``].filter(Boolean).join(` `),"aria-invalid":!!i,"aria-describedby":i?`${n}-error`:void 0,children:[e&&(0,t.jsx)(`legend`,{className:[T.radioLabel,a===`glassy`?T.radioLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsx)(`div`,{className:T.optionGroup,children:r.map(e=>{let r=f?{checked:c===e.value}:{defaultChecked:l===e.value};return(0,t.jsxs)(`label`,{className:[T.optionWrapper,s?T.optionWrapperDisabled:``].filter(Boolean).join(` `),children:[(0,t.jsx)(`input`,{type:`radio`,name:n,value:e.value,disabled:s,className:T.radioInput,onChange:u,...r,...d}),(0,t.jsxs)(`span`,{className:[T.optionButton,a===`glassy`?T.optionButtonGlassy:T.optionButtonDefault,i?T.optionButtonError:``].filter(Boolean).join(` `),children:[(0,t.jsx)(`span`,{className:T.optionTitle,children:e.label}),e.description&&(0,t.jsx)(`span`,{className:T.optionDescription,children:e.description})]})]},e.value)})}),i&&(0,t.jsx)(`span`,{id:`${n}-error`,className:T.errorMessage,children:i})]})}var D={switchWrapper:`_switchWrapper_14rch_1`,switchCheckbox:`_switchCheckbox_14rch_7`,switchLabel:`_switchLabel_14rch_15`,switchLabelDefault:`_switchLabelDefault_14rch_24`,switchLabelGlassy:`_switchLabelGlassy_14rch_28`,switchBackground:`_switchBackground_14rch_37`,switchBackgroundDefault:`_switchBackgroundDefault_14rch_56`,switchBackgroundGlassy:`_switchBackgroundGlassy_14rch_66`,switchButton:`_switchButton_14rch_77`,iconChecked:`_iconChecked_14rch_163`,iconUnchecked:`_iconUnchecked_14rch_164`,switchText:`_switchText_14rch_200`,errorMessage:`_errorMessage_14rch_206`};function O({name:e,id:n,label:r,error:i,variant:a=`default`,className:o,disabled:s,...c}){let l=n??`${e}-switch`;return(0,t.jsxs)(`div`,{className:[D.switchWrapper,o??``].filter(Boolean).join(` `),children:[(0,t.jsx)(`input`,{id:l,name:e,type:`checkbox`,disabled:s,className:D.switchCheckbox,"aria-invalid":!!i,"aria-describedby":i?`${e}-error`:void 0,...c}),(0,t.jsxs)(`label`,{htmlFor:l,className:[D.switchLabel,a===`glassy`?D.switchLabelGlassy:D.switchLabelDefault].filter(Boolean).join(` `),children:[(0,t.jsx)(`span`,{className:[D.switchBackground,a===`glassy`?D.switchBackgroundGlassy:D.switchBackgroundDefault].filter(Boolean).join(` `),children:(0,t.jsxs)(`span`,{className:D.switchButton,"aria-hidden":`true`,children:[(0,t.jsx)(`span`,{className:D.iconChecked,children:(0,t.jsx)(k,{})}),(0,t.jsx)(`span`,{className:D.iconUnchecked,children:(0,t.jsx)(A,{})})]})}),r&&(0,t.jsx)(`span`,{className:D.switchText,children:r})]}),i&&(0,t.jsx)(`span`,{id:`${e}-error`,className:D.errorMessage,children:i})]})}function k(){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M3 6.5L5.5 9L9 3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function A(){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M3 3L9 9M9 3L3 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})}var j={inputBlockVertical:`_inputBlockVertical_1khad_1`,inputLabel:`_inputLabel_1khad_8`,inputLabelGlassy:`_inputLabelGlassy_1khad_14`,inputTextField:`_inputTextField_1khad_20`,inputTextFieldGlassy:`_inputTextFieldGlassy_1khad_37`,inputError:`_inputError_1khad_59`,errorMessage:`_errorMessage_1khad_63`};function M({label:e,name:n,error:r,placeholder:i,variant:a=`default`,className:o,ref:s,...c}){return(0,t.jsxs)(`div`,{className:j.inputBlockVertical,children:[(0,t.jsx)(`label`,{htmlFor:n,className:[j.inputLabel,a===`glassy`?j.inputLabelGlassy:``].filter(Boolean).join(` `),children:e}),(0,t.jsx)(`input`,{id:n,name:n,ref:s,placeholder:i,className:[j.inputTextField,a===`glassy`?j.inputTextFieldGlassy:``,r?j.inputError:``,o??``].filter(Boolean).join(` `),"aria-invalid":!!r,"aria-describedby":r?`${n}-error`:void 0,...c}),r&&(0,t.jsx)(`span`,{id:`${n}-error`,className:j.errorMessage,children:r})]})}var N={wrapper:`_wrapper_1jqlw_1`,label:`_label_1jqlw_7`,labelGlassy:`_labelGlassy_1jqlw_13`,dropzone:`_dropzone_1jqlw_17`,dropzoneGlassy:`_dropzoneGlassy_1jqlw_32`,dragOver:`_dragOver_1jqlw_39`,errorState:`_errorState_1jqlw_48`,disabled:`_disabled_1jqlw_52`,hiddenInput:`_hiddenInput_1jqlw_57`,dropzoneContent:`_dropzoneContent_1jqlw_65`,placeholder:`_placeholder_1jqlw_74`,big:`_big_1jqlw_80`,small:`_small_1jqlw_86`,hint:`_hint_1jqlw_91`,selected:`_selected_1jqlw_111`,preview:`_preview_1jqlw_118`,fileMeta:`_fileMeta_1jqlw_127`,fileName:`_fileName_1jqlw_134`,fileSize:`_fileSize_1jqlw_142`,remove:`_remove_1jqlw_156`,errorMessage:`_errorMessage_1jqlw_198`};function P({label:e,name:r,id:i,file:a,error:o,variant:s=`default`,accept:c=`image/*`,maxSizeBytes:l=5*1024*1024,disabled:u,className:d,onChange:f,onFileChange:p,...m}){let h=(0,n.useId)(),g=i??`${r}-${h}`,[_,v]=(0,n.useState)(!1),[y,b]=(0,n.useState)(a??null),x=a!==void 0,S=x?a:y,C=(0,n.useMemo)(()=>!S||!S.type.startsWith(`image/`)?null:URL.createObjectURL(S),[S]);(0,n.useEffect)(()=>{x&&b(a??null)},[a,x]),(0,n.useEffect)(()=>()=>{C&&URL.revokeObjectURL(C)},[C]);function w(e){return!e||(c===`image/*`||c.startsWith(`image/`))&&!e.type.startsWith(`image/`)||l&&e.size>l?null:e}function T(e){let t=w(e);x||b(t),p?.(t)}function E(e){T(e.target.files?.[0]??null),f?.(e)}function D(e){e.preventDefault(),e.stopPropagation(),u||v(!0)}function O(e){e.preventDefault(),e.stopPropagation(),!e.currentTarget.contains(e.relatedTarget)&&v(!1)}function k(e){e.preventDefault(),e.stopPropagation(),v(!1),!u&&T(e.dataTransfer.files?.[0]??null)}function A(){x||b(null),p?.(null)}let j=Math.round(l/(1024*1024));return(0,t.jsxs)(`div`,{className:[N.wrapper,d??``].filter(Boolean).join(` `),children:[(0,t.jsx)(`label`,{className:[N.label,s===`glassy`?N.labelGlassy:``].filter(Boolean).join(` `),htmlFor:g,children:e}),(0,t.jsxs)(`div`,{className:[N.dropzone,s===`glassy`?N.dropzoneGlassy:``,_?N.dragOver:``,o?N.errorState:``,u?N.disabled:``].filter(Boolean).join(` `),onDragOver:D,onDragLeave:O,onDrop:k,children:[(0,t.jsx)(`input`,{id:g,name:r,className:N.hiddenInput,type:`file`,accept:c,disabled:u,onChange:E,"aria-invalid":!!o,"aria-describedby":o?`${r}-error`:void 0,...m}),(0,t.jsx)(`label`,{htmlFor:g,className:N.dropzoneContent,children:S?(0,t.jsxs)(`span`,{className:N.selected,children:[C&&(0,t.jsx)(`img`,{className:N.preview,src:C,alt:`Vorschau von ${S.name}`}),(0,t.jsxs)(`span`,{className:N.fileMeta,children:[(0,t.jsx)(`span`,{className:N.fileName,children:S.name}),(0,t.jsxs)(`span`,{className:N.fileSize,children:[(S.size/1024).toFixed(0),` KB ·`,` `,S.type||`unknown`]})]})]}):(0,t.jsxs)(`span`,{className:N.placeholder,children:[(0,t.jsx)(`span`,{className:N.big,children:`Datei hier reinziehen`}),(0,t.jsx)(`span`,{className:N.small,children:`…oder klicken, um auszuwählen`}),(0,t.jsxs)(`span`,{className:N.hint,children:[`Erlaubt: `,c,` · max. `,j,` MB`]})]})}),S&&(0,t.jsx)(`button`,{type:`button`,className:N.remove,onClick:A,disabled:u,children:`Entfernen`})]}),o&&(0,t.jsx)(`span`,{id:`${r}-error`,className:N.errorMessage,children:o})]})}e.Button=i,e.Checkbox=o,e.Chip=c,e.DatePicker=u,e.Dropdown=h,e.Link=_,e.Password=b,e.PostalCode=w,e.RadioButton=E,e.Switch=O,e.TextField=M,e.Upload=P});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suus-component-library",
3
- "version": "0.1.7",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "./dist/suus-component-library.umd.cjs",
6
6
  "module": "./dist/suus-component-library.js",
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@eslint/js": "^10.0.1",
35
+ "@storybook/addon-docs": "^10.4.1",
35
36
  "@storybook/react-vite": "^10.3.6",
36
37
  "@types/react": "latest",
37
38
  "@types/react-dom": "latest",
@@ -50,6 +51,6 @@
50
51
  },
51
52
  "dependencies": {
52
53
  "msw": "^2.14.6",
53
- "suus-design-tokens": "^1.0.13"
54
+ "suus-design-tokens": "^1.0.18"
54
55
  }
55
56
  }
@@ -1,33 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { default as Button } from './Button';
3
- declare const meta: {
4
- title: string;
5
- component: typeof Button;
6
- parameters: {
7
- layout: string;
8
- };
9
- tags: string[];
10
- argTypes: {
11
- variant: {
12
- control: "select";
13
- options: string[];
14
- };
15
- disabled: {
16
- control: "boolean";
17
- };
18
- label: {
19
- control: "text";
20
- };
21
- colorToken: {
22
- control: "select";
23
- options: string[];
24
- };
25
- };
26
- };
27
- export default meta;
28
- type Story = StoryObj<typeof meta>;
29
- export declare const Primary: Story;
30
- export declare const Secondary: Story;
31
- export declare const Disabled: Story;
32
- export declare const Icon: Story;
33
- //# sourceMappingURL=Button.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/form/button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CA4BqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KA+BlB,CAAC"}
@@ -1,25 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- import { default as Checkbox } from './Checkbox';
3
- declare const meta: {
4
- title: string;
5
- component: typeof Checkbox;
6
- parameters: {
7
- layout: string;
8
- };
9
- argTypes: {
10
- variant: {
11
- control: "select";
12
- options: string[];
13
- };
14
- };
15
- };
16
- export default meta;
17
- type Story = StoryObj<typeof meta>;
18
- export declare const Default: Story;
19
- export declare const Checked: Story;
20
- export declare const Disabled: Story;
21
- export declare const DisabledChecked: Story;
22
- export declare const Error: Story;
23
- export declare const ErrorChecked: Story;
24
- export declare const Glassy: Story;
25
- //# sourceMappingURL=Checkbox.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/form/checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;CAYuB,CAAC;AAElC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAO7B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAuBpB,CAAC"}
@@ -1,37 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { default as Chip } from './Chip';
3
- declare const meta: {
4
- title: string;
5
- component: typeof Chip;
6
- parameters: {
7
- layout: string;
8
- };
9
- tags: string[];
10
- argTypes: {
11
- children: {
12
- control: "text";
13
- };
14
- variant: {
15
- control: "select";
16
- options: string[];
17
- };
18
- title: {
19
- control: "text";
20
- };
21
- };
22
- args: {
23
- children: string;
24
- variant: "default";
25
- };
26
- };
27
- export default meta;
28
- type Story = StoryObj<typeof meta>;
29
- export declare const Default: Story;
30
- export declare const DefaultLongText: Story;
31
- export declare const Glassy: Story;
32
- export declare const GlassyLongText: Story;
33
- export declare const WithTitleAttribute: Story;
34
- export declare const CustomColors: Story;
35
- export declare const MultipleChips: Story;
36
- export declare const MultipleGlassyChips: Story;
37
- //# sourceMappingURL=Chip.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/form/chip/Chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAuBmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAUpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAU1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAsBjC,CAAC"}
@@ -1,389 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { default as DatePicker } from './DatePicker';
3
- declare const meta: {
4
- title: string;
5
- component: typeof DatePicker;
6
- parameters: {
7
- layout: string;
8
- };
9
- tags: string[];
10
- argTypes: {
11
- label: {
12
- control: "text";
13
- };
14
- name: {
15
- control: "text";
16
- };
17
- variant: {
18
- control: "select";
19
- options: string[];
20
- };
21
- disabled: {
22
- control: "boolean";
23
- };
24
- required: {
25
- control: "boolean";
26
- };
27
- error: {
28
- control: "text";
29
- };
30
- value: {
31
- table: {
32
- disable: true;
33
- };
34
- };
35
- minDate: {
36
- table: {
37
- disable: true;
38
- };
39
- };
40
- maxDate: {
41
- table: {
42
- disable: true;
43
- };
44
- };
45
- onDateChange: {
46
- action: string;
47
- };
48
- onBlur: {
49
- action: string;
50
- };
51
- };
52
- args: {
53
- label: string;
54
- name: string;
55
- variant: "default";
56
- disabled: false;
57
- required: false;
58
- };
59
- decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
60
- label: string;
61
- name: string;
62
- value?: (Date | null) | undefined;
63
- maxDate?: Date | undefined;
64
- minDate?: Date | undefined;
65
- error?: string | undefined;
66
- variant?: "glassy" | "default" | undefined;
67
- ref?: import('react').Ref<HTMLInputElement> | undefined;
68
- onDateChange?: ((date: Date | null) => void) | undefined;
69
- onClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
70
- disabled?: boolean | undefined | undefined;
71
- form?: string | undefined | undefined;
72
- formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
73
- formEncType?: string | undefined | undefined;
74
- formMethod?: string | undefined | undefined;
75
- formNoValidate?: boolean | undefined | undefined;
76
- formTarget?: string | undefined | undefined;
77
- defaultChecked?: boolean | undefined | undefined;
78
- defaultValue?: string | number | readonly string[] | undefined;
79
- suppressContentEditableWarning?: boolean | undefined | undefined;
80
- suppressHydrationWarning?: boolean | undefined | undefined;
81
- accessKey?: string | undefined | undefined;
82
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
83
- autoFocus?: boolean | undefined | undefined;
84
- className?: string | undefined | undefined;
85
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
86
- contextMenu?: string | undefined | undefined;
87
- dir?: string | undefined | undefined;
88
- draggable?: (boolean | "true" | "false") | undefined;
89
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
90
- hidden?: boolean | undefined | undefined;
91
- id?: string | undefined | undefined;
92
- lang?: string | undefined | undefined;
93
- nonce?: string | undefined | undefined;
94
- slot?: string | undefined | undefined;
95
- spellCheck?: (boolean | "true" | "false") | undefined;
96
- style?: import('react').CSSProperties | undefined;
97
- tabIndex?: number | undefined | undefined;
98
- title?: string | undefined | undefined;
99
- translate?: "yes" | "no" | undefined | undefined;
100
- radioGroup?: string | undefined | undefined;
101
- role?: import('react').AriaRole | undefined;
102
- about?: string | undefined | undefined;
103
- content?: string | undefined | undefined;
104
- datatype?: string | undefined | undefined;
105
- inlist?: any;
106
- prefix?: string | undefined | undefined;
107
- property?: string | undefined | undefined;
108
- rel?: string | undefined | undefined;
109
- resource?: string | undefined | undefined;
110
- rev?: string | undefined | undefined;
111
- typeof?: string | undefined | undefined;
112
- vocab?: string | undefined | undefined;
113
- autoCorrect?: string | undefined | undefined;
114
- autoSave?: string | undefined | undefined;
115
- color?: string | undefined | undefined;
116
- itemProp?: string | undefined | undefined;
117
- itemScope?: boolean | undefined | undefined;
118
- itemType?: string | undefined | undefined;
119
- itemID?: string | undefined | undefined;
120
- itemRef?: string | undefined | undefined;
121
- results?: number | undefined | undefined;
122
- security?: string | undefined | undefined;
123
- unselectable?: "on" | "off" | undefined | undefined;
124
- popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
125
- popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
126
- popoverTarget?: string | undefined | undefined;
127
- inert?: boolean | undefined | undefined;
128
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
129
- is?: string | undefined | undefined;
130
- exportparts?: string | undefined | undefined;
131
- part?: string | undefined | undefined;
132
- "aria-activedescendant"?: string | undefined | undefined;
133
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
134
- "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
135
- "aria-braillelabel"?: string | undefined | undefined;
136
- "aria-brailleroledescription"?: string | undefined | undefined;
137
- "aria-busy"?: (boolean | "true" | "false") | undefined;
138
- "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
139
- "aria-colcount"?: number | undefined | undefined;
140
- "aria-colindex"?: number | undefined | undefined;
141
- "aria-colindextext"?: string | undefined | undefined;
142
- "aria-colspan"?: number | undefined | undefined;
143
- "aria-controls"?: string | undefined | undefined;
144
- "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
145
- "aria-describedby"?: string | undefined | undefined;
146
- "aria-description"?: string | undefined | undefined;
147
- "aria-details"?: string | undefined | undefined;
148
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
149
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
150
- "aria-errormessage"?: string | undefined | undefined;
151
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
152
- "aria-flowto"?: string | undefined | undefined;
153
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
154
- "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
155
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
156
- "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
157
- "aria-keyshortcuts"?: string | undefined | undefined;
158
- "aria-label"?: string | undefined | undefined;
159
- "aria-labelledby"?: string | undefined | undefined;
160
- "aria-level"?: number | undefined | undefined;
161
- "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
162
- "aria-modal"?: (boolean | "true" | "false") | undefined;
163
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
164
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
165
- "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
166
- "aria-owns"?: string | undefined | undefined;
167
- "aria-placeholder"?: string | undefined | undefined;
168
- "aria-posinset"?: number | undefined | undefined;
169
- "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
170
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
171
- "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
172
- "aria-required"?: (boolean | "true" | "false") | undefined;
173
- "aria-roledescription"?: string | undefined | undefined;
174
- "aria-rowcount"?: number | undefined | undefined;
175
- "aria-rowindex"?: number | undefined | undefined;
176
- "aria-rowindextext"?: string | undefined | undefined;
177
- "aria-rowspan"?: number | undefined | undefined;
178
- "aria-selected"?: (boolean | "true" | "false") | undefined;
179
- "aria-setsize"?: number | undefined | undefined;
180
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
181
- "aria-valuemax"?: number | undefined | undefined;
182
- "aria-valuemin"?: number | undefined | undefined;
183
- "aria-valuenow"?: number | undefined | undefined;
184
- "aria-valuetext"?: string | undefined | undefined;
185
- children?: import('react').ReactNode;
186
- dangerouslySetInnerHTML?: {
187
- __html: string | TrustedHTML;
188
- } | undefined | undefined;
189
- onCopy?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
190
- onCopyCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
191
- onCut?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
192
- onCutCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
193
- onPaste?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
194
- onPasteCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
195
- onCompositionEnd?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
196
- onCompositionEndCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
197
- onCompositionStart?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
198
- onCompositionStartCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
199
- onCompositionUpdate?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
200
- onCompositionUpdateCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
201
- onFocus?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
202
- onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
203
- onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
204
- onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
205
- onChangeCapture?: import('react').ChangeEventHandler<HTMLInputElement, Element> | undefined;
206
- onBeforeInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
207
- onBeforeInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
208
- onInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
209
- onInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
210
- onReset?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
211
- onResetCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
212
- onSubmit?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
213
- onSubmitCapture?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
214
- onInvalid?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
215
- onInvalidCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
216
- onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
217
- onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
218
- onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
219
- onErrorCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
220
- onKeyDown?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
221
- onKeyDownCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
222
- onKeyPress?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
223
- onKeyPressCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
224
- onKeyUp?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
225
- onKeyUpCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
226
- onAbort?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
227
- onAbortCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
228
- onCanPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
229
- onCanPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
230
- onCanPlayThrough?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
231
- onCanPlayThroughCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
232
- onDurationChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
233
- onDurationChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
234
- onEmptied?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
235
- onEmptiedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
236
- onEncrypted?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
237
- onEncryptedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
238
- onEnded?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
239
- onEndedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
240
- onLoadedData?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
241
- onLoadedDataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
242
- onLoadedMetadata?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
243
- onLoadedMetadataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
244
- onLoadStart?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
245
- onLoadStartCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
246
- onPause?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
247
- onPauseCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
248
- onPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
249
- onPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
250
- onPlaying?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
251
- onPlayingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
252
- onProgress?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
253
- onProgressCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
254
- onRateChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
255
- onRateChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
256
- onSeeked?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
257
- onSeekedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
258
- onSeeking?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
259
- onSeekingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
260
- onStalled?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
261
- onStalledCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
262
- onSuspend?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
263
- onSuspendCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
264
- onTimeUpdate?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
265
- onTimeUpdateCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
266
- onVolumeChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
267
- onVolumeChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
268
- onWaiting?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
269
- onWaitingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
270
- onAuxClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
271
- onAuxClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
272
- onClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
273
- onContextMenu?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
274
- onContextMenuCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
275
- onDoubleClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
276
- onDoubleClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
277
- onDrag?: import('react').DragEventHandler<HTMLInputElement> | undefined;
278
- onDragCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
279
- onDragEnd?: import('react').DragEventHandler<HTMLInputElement> | undefined;
280
- onDragEndCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
281
- onDragEnter?: import('react').DragEventHandler<HTMLInputElement> | undefined;
282
- onDragEnterCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
283
- onDragExit?: import('react').DragEventHandler<HTMLInputElement> | undefined;
284
- onDragExitCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
285
- onDragLeave?: import('react').DragEventHandler<HTMLInputElement> | undefined;
286
- onDragLeaveCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
287
- onDragOver?: import('react').DragEventHandler<HTMLInputElement> | undefined;
288
- onDragOverCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
289
- onDragStart?: import('react').DragEventHandler<HTMLInputElement> | undefined;
290
- onDragStartCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
291
- onDrop?: import('react').DragEventHandler<HTMLInputElement> | undefined;
292
- onDropCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
293
- onMouseDown?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
294
- onMouseDownCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
295
- onMouseEnter?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
296
- onMouseLeave?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
297
- onMouseMove?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
298
- onMouseMoveCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
299
- onMouseOut?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
300
- onMouseOutCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
301
- onMouseOver?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
302
- onMouseOverCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
303
- onMouseUp?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
304
- onMouseUpCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
305
- onSelect?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
306
- onSelectCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
307
- onTouchCancel?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
308
- onTouchCancelCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
309
- onTouchEnd?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
310
- onTouchEndCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
311
- onTouchMove?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
312
- onTouchMoveCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
313
- onTouchStart?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
314
- onTouchStartCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
315
- onPointerDown?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
316
- onPointerDownCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
317
- onPointerMove?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
318
- onPointerMoveCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
319
- onPointerUp?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
320
- onPointerUpCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
321
- onPointerCancel?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
322
- onPointerCancelCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
323
- onPointerEnter?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
324
- onPointerLeave?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
325
- onPointerOver?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
326
- onPointerOverCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
327
- onPointerOut?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
328
- onPointerOutCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
329
- onGotPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
330
- onGotPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
331
- onLostPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
332
- onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
333
- onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
334
- onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
335
- onScrollEnd?: import('react').UIEventHandler<HTMLInputElement> | undefined;
336
- onScrollEndCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
337
- onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
338
- onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
339
- onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
340
- onAnimationStartCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
341
- onAnimationEnd?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
342
- onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
343
- onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
344
- onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
345
- onToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
346
- onBeforeToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
347
- onTransitionCancel?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
348
- onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
349
- onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
350
- onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
351
- onTransitionRun?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
352
- onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
353
- onTransitionStart?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
354
- onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
355
- list?: string | undefined | undefined;
356
- step?: number | string | undefined | undefined;
357
- accept?: string | undefined | undefined;
358
- alt?: string | undefined | undefined;
359
- autoComplete?: import('react').HTMLInputAutoCompleteAttribute | undefined;
360
- capture?: boolean | "user" | "environment" | undefined | undefined;
361
- checked?: boolean | undefined | undefined;
362
- height?: number | string | undefined | undefined;
363
- maxLength?: number | undefined | undefined;
364
- minLength?: number | undefined | undefined;
365
- multiple?: boolean | undefined | undefined;
366
- pattern?: string | undefined | undefined;
367
- placeholder?: string | undefined | undefined;
368
- readOnly?: boolean | undefined | undefined;
369
- required?: boolean | undefined | undefined;
370
- size?: number | undefined | undefined;
371
- src?: string | undefined | undefined;
372
- width?: number | string | undefined | undefined;
373
- }>) => import("react/jsx-runtime").JSX.Element)[];
374
- };
375
- export default meta;
376
- type Story = StoryObj<typeof meta>;
377
- export declare const Default: Story;
378
- export declare const WithValue: Story;
379
- export declare const WithMinAndMaxDate: Story;
380
- export declare const Required: Story;
381
- export declare const Error: Story;
382
- export declare const Disabled: Story;
383
- export declare const Glassy: Story;
384
- export declare const GlassyWithValue: Story;
385
- export declare const GlassyError: Story;
386
- export declare const GlassyDisabled: Story;
387
- export declare const Controlled: Story;
388
- export declare const ControlledGlassy: Story;
389
- //# sourceMappingURL=DatePicker.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/form/date-picker/DatePicker.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAWpB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAYzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAsC9B,CAAC"}