plume-ui-react 0.1.0 → 0.3.0

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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-JMACSFO3.mjs +1 -0
  3. package/dist/chunk-PZGR7IS5.mjs +1 -0
  4. package/dist/components/form/checkbox/checkbox.mjs +1 -0
  5. package/dist/components/form/checkbox/index.mjs +1 -0
  6. package/dist/components/form/datepicker/calendar.mjs +1 -0
  7. package/dist/components/form/datepicker/datepicker-input.mjs +1 -0
  8. package/dist/components/form/datepicker/datepicker-reducer.mjs +1 -0
  9. package/dist/components/form/datepicker/datepicker.mjs +2 -0
  10. package/dist/components/form/datepicker/index.mjs +1 -1
  11. package/dist/components/form/datepicker/use-datepicker.mjs +1 -0
  12. package/dist/components/form/field/field-context.mjs +1 -0
  13. package/dist/components/form/field/field.mjs +1 -0
  14. package/dist/components/form/field/index.mjs +1 -1
  15. package/dist/components/form/input/index.mjs +1 -1
  16. package/dist/components/form/input/input.mjs +2 -0
  17. package/dist/components/form/radio/index.mjs +1 -0
  18. package/dist/components/form/radio/radio-group-context.mjs +1 -0
  19. package/dist/components/form/radio/radio-group.mjs +1 -0
  20. package/dist/components/form/radio/radio.mjs +1 -0
  21. package/dist/components/form/textarea/index.mjs +1 -0
  22. package/dist/components/form/textarea/textarea.mjs +1 -0
  23. package/dist/components/form/toggle/index.mjs +1 -0
  24. package/dist/components/form/toggle/toggle.mjs +1 -0
  25. package/dist/components/interaction/button/button.mjs +2 -0
  26. package/dist/components/interaction/button/index.mjs +1 -1
  27. package/dist/components/navigation/tabs/index.mjs +1 -1
  28. package/dist/components/navigation/tabs/tab-list.mjs +1 -0
  29. package/dist/components/navigation/tabs/tab-panel.mjs +1 -0
  30. package/dist/components/navigation/tabs/tab-panels.mjs +1 -0
  31. package/dist/components/navigation/tabs/tab.mjs +1 -0
  32. package/dist/components/navigation/tabs/tabs-reducer.mjs +1 -0
  33. package/dist/components/navigation/tabs/tabs.mjs +1 -0
  34. package/dist/components/navigation/tabs/use-tabs.mjs +1 -0
  35. package/dist/components/presentation/spinner/index.mjs +1 -1
  36. package/dist/components/presentation/spinner/spinner.mjs +5 -0
  37. package/dist/hooks/index.mjs +1 -0
  38. package/dist/hooks/use-click-outside.mjs +1 -1
  39. package/dist/hooks/use-debounce.mjs +1 -1
  40. package/dist/hooks/use-mask.mjs +1 -1
  41. package/dist/index.d.mts +68 -2
  42. package/dist/index.d.ts +68 -2
  43. package/dist/index.js +8 -8
  44. package/dist/index.mjs +1 -1
  45. package/dist/overlay/index.mjs +1 -0
  46. package/dist/overlay/layer.mjs +1 -0
  47. package/dist/overlay/portal.mjs +1 -0
  48. package/dist/overlay/position.mjs +1 -0
  49. package/dist/overlay/use-dismiss.mjs +1 -0
  50. package/dist/overlay/use-focus-trap.mjs +1 -0
  51. package/dist/overlay/use-isomorphic-layout-effect.mjs +1 -0
  52. package/dist/overlay/use-position.mjs +1 -0
  53. package/dist/overlay/use-scroll-lock.mjs +1 -0
  54. package/dist/styles.css +1 -1
  55. package/dist/theme/config.mjs +1 -0
  56. package/dist/theme/index.mjs +1 -1
  57. package/dist/theme/shared.types.mjs +0 -0
  58. package/dist/theme/shared.utils.mjs +1 -0
  59. package/dist/theme/theme-provider.mjs +1 -0
  60. package/dist/theme/theme-root.mjs +1 -0
  61. package/dist/theme/theme-to-css-vars.mjs +1 -0
  62. package/dist/theme/theme.types.mjs +0 -0
  63. package/dist/utils/colors.mjs +1 -1
  64. package/dist/utils/dates.mjs +1 -1
  65. package/dist/utils/index.mjs +1 -0
  66. package/dist/utils/lazy.mjs +1 -1
  67. package/dist/utils/merge.mjs +1 -1
  68. package/package.json +13 -10
  69. package/dist/chunk-6RTAEXNN.mjs +0 -1
  70. package/dist/chunk-A72ZRKNC.mjs +0 -1
  71. package/dist/chunk-AOJBMSYA.mjs +0 -1
  72. package/dist/chunk-BOTD5R53.mjs +0 -1
  73. package/dist/chunk-D237D3H5.mjs +0 -1
  74. package/dist/chunk-NFXMVNGX.mjs +0 -1
  75. package/dist/chunk-NNP2MCGD.mjs +0 -2
  76. package/dist/chunk-PEVXLYX3.mjs +0 -1
  77. package/dist/chunk-PNXPX444.mjs +0 -2
  78. package/dist/chunk-QON6DQTA.mjs +0 -1
  79. package/dist/chunk-TQ7ENVY5.mjs +0 -5
  80. package/dist/chunk-V5DKNP76.mjs +0 -2
  81. package/dist/chunk-WM4KUIPD.mjs +0 -1
  82. package/dist/chunk-ZN4UC4TJ.mjs +0 -1
package/README.md CHANGED
@@ -38,7 +38,7 @@ export function App() {
38
38
 
39
39
  ## Components
40
40
 
41
- `Button`, `DatePicker`, `Field`, `Input`, `Spinner` and `Tabs` (with `TabList`, `Tab`, `TabPanels` and `TabPanel`).
41
+ `Button`, `Checkbox`, `DatePicker`, `Field`, `Input`, `Radio`, `RadioGroup`, `Spinner`, `Tabs` (with `TabList`, `Tab`, `TabPanels` and `TabPanel`), `Textarea` and `Toggle`.
42
42
 
43
43
  The [documentation site](https://darioegb.github.io/plume-ui-react/) has a live playground, props and examples for each one, plus the color palette, design tokens and framework integration guides.
44
44
 
@@ -0,0 +1 @@
1
+ var e={"date-picker-padding":"var(--plume-space-4)","date-picker-border-radius":"var(--plume-radius-4)","date-picker-color":"var(--plume-muted)","date-picker-border-color":"var(--plume-border)","date-picker-control-border-color":"var(--plume-border-strong)",datePicker:"_datePicker_ez3xe_9",datePickerInputText:"_datePickerInputText_ez3xe_13",inputButton:"_inputButton_ez3xe_29",inputButtonIcon:"_inputButtonIcon_ez3xe_45",sm:"_sm_ez3xe_51",md:"_md_ez3xe_57",lg:"_lg_ez3xe_62",rounded:"_rounded_ez3xe_86",outline:"_outline_ez3xe_90 _datePickerInputText_ez3xe_13",pill:"_pill_ez3xe_90",filled:"_filled_ez3xe_99 _datePickerInputText_ez3xe_13",underline:"_underline_ez3xe_107 _datePickerInputText_ez3xe_13",invalid:"_invalid_ez3xe_117",datePickerModal:"_datePickerModal_ez3xe_141",calendarContainer:"_calendarContainer_ez3xe_156",calendarContainerDouble:"_calendarContainerDouble_ez3xe_161",calendar:"_calendar_ez3xe_156",calendarHeader:"_calendarHeader_ez3xe_171",day:"_day_ez3xe_178",year:"_year_ez3xe_179",month:"_month_ez3xe_180",monthYearSelectors:"_monthYearSelectors_ez3xe_181",monthSelector:"_monthSelector_ez3xe_218",yearSelector:"_yearSelector_ez3xe_219",yearSelectorGrid:"_yearSelectorGrid_ez3xe_223",selected:"_selected_ez3xe_237",monthSelectorGrid:"_monthSelectorGrid_ez3xe_247",daysOfWeek:"_daysOfWeek_ez3xe_253",dayOfWeek:"_dayOfWeek_ez3xe_260",calendarGrid:"_calendarGrid_ez3xe_269",today:"_today_ez3xe_286",rangeItem:"_rangeItem_ez3xe_290",selectedHover:"_selectedHover_ez3xe_300",hovered:"_hovered_ez3xe_305",disabledDay:"_disabledDay_ez3xe_309",outOfRangeDay:"_outOfRangeDay_ez3xe_314",footerActions:"_footerActions_ez3xe_318",footerButton:"_footerButton_ez3xe_325",footerButtonApply:"_footerButtonApply_ez3xe_329",disabled:"_disabled_ez3xe_309"};export{e as a};
@@ -0,0 +1 @@
1
+ var _={"tabs-padding":"var(--plume-space-2) var(--plume-space-3)","tabs-border-width":"2px","tabs-border-radius":"var(--plume-radius-4)",tabs:"_tabs_1ct2b_6",horizontal:"_horizontal_1ct2b_11",vertical:"_vertical_1ct2b_15",left:"_left_1ct2b_19",center:"_center_1ct2b_23",right:"_right_1ct2b_27",sm:"_sm_1ct2b_31",md:"_md_1ct2b_36",lg:"_lg_1ct2b_40",underline:"_underline_1ct2b_45",tablist:"_tablist_1ct2b_55",tab:"_tab_1ct2b_6",rounded:"_rounded_1ct2b_82",segment:"_segment_1ct2b_82",active:"_active_1ct2b_97",enclosed:"_enclosed_1ct2b_115",panel:"_panel_1ct2b_174"};export{_ as a};
@@ -0,0 +1 @@
1
+ "use client";import{forwardRef as y,useEffect as S,useImperativeHandle as E,useRef as P}from"react";var e={root:"_root_effkj_1",sm:"_sm_effkj_11",md:"_md_effkj_16",lg:"_lg_effkj_21",checkbox:"_checkbox_effkj_26",solid:"_solid_effkj_52",outline:"_outline_effkj_62",invalid:"_invalid_effkj_90",label:"_label_effkj_94",disabled:"_disabled_effkj_98"};import{jsx as u,jsxs as M}from"react/jsx-runtime";var j=(o,l)=>({"--checkbox-solid":`var(--plume-color-${o}-solid)`,"--checkbox-contrast":`var(--plume-color-${o}-solid-contrast)`,"--checkbox-text":`var(--plume-color-${o}-text)`,...l}),I=y(({children:o,className:l="",colorScheme:b="primary",disabled:s=!1,onChange:c,indeterminate:d=!1,readOnly:r=!1,size:m="md",style:k,variant:p="solid",...i},_)=>{let t=P(null),n=p!=="unstyled",f=i["aria-invalid"]===!0||i["aria-invalid"]==="true";E(_,()=>t.current),S(()=>{t.current&&(t.current.indeterminate=d)},[d]);let h=[n&&e.root,n&&e[m],s&&e.disabled,l].filter(Boolean).join(" "),C=n?[e.checkbox,e[p],f&&e.invalid].filter(Boolean).join(" "):void 0,x=a=>{r&&a.preventDefault()},v=a=>{r||c?.(a)};return M("label",{className:h,style:j(f?"error":b,k),children:[u("input",{"aria-readonly":r||void 0,className:C,disabled:s,onChange:c?v:void 0,onClick:x,ref:t,type:"checkbox",...i}),o?u("span",{className:n?e.label:void 0,children:o}):null]})});I.displayName="Checkbox";export{I as Checkbox};
@@ -0,0 +1 @@
1
+ import{Checkbox as p}from"./checkbox.mjs";export{p as Checkbox};
@@ -0,0 +1 @@
1
+ "use client";import{a as t}from"../../../chunk-JMACSFO3.mjs";import{useEffect as le,useRef as _,useState as P}from"react";import{formatDate as q,getDateFromDateString as ce,getDaysOfWeekByLanguage as de,getMonthsByLanguage as ie}from"../../../utils/dates.mjs";import{Button as f}from"../../interaction/button/index.mjs";import{useDatePicker as ue}from"./use-datepicker.mjs";import{Fragment as ve,jsx as a,jsxs as H}from"react/jsx-runtime";var C="yyyy-mm-dd",M=(e,d)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+d),G=(e,d)=>{let l=new Date(e.getFullYear(),e.getMonth()+d+1,0).getDate();return new Date(e.getFullYear(),e.getMonth()+d,Math.min(e.getDate(),l))},I=e=>(e.getDay()+6)%7,me={ArrowLeft:e=>M(e,-1),ArrowRight:e=>M(e,1),ArrowUp:e=>M(e,-7),ArrowDown:e=>M(e,7),Home:e=>M(e,-I(e)),End:e=>M(e,6-I(e)),PageUp:e=>G(e,-1),PageDown:e=>G(e,1)},T=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function ge({day:e}){return a("span",{className:t.dayOfWeek,children:e})}function ye({selectedMonth:e,months:d,onChange:l}){let D=i=>{l(i)};return a("div",{className:t.monthSelectorGrid,children:d.map((i,c)=>a(f,{"aria-pressed":c===e,className:`${c===e?t.selected:""} ${t.month}`,label:i,onClick:()=>{D(c)},variant:"unstyled"},i))})}function he({selectedYear:e,startYear:d,onChange:l}){let D=c=>{l(c)},i=()=>{let c=[];for(let y=d;y<d+20;y++)c.push(a(f,{"aria-pressed":e===y,className:`${e===y?t.selected:""} ${t.year}`,onClick:()=>{D(y)},variant:"unstyled",children:y},y));return c};return a("div",{className:t.yearSelectorGrid,children:i()})}function ke({language:e,isRange:d,isSecondCalendar:l,minDate:D,maxDate:i,onMonthChange:c,onSelectDate:y,onYearChange:U}){let{state:n}=ue(),[k,B]=P("day"),[L,O]=P(l?n.secondYear:n.year),[A,z]=P(null),R=_(!1),E=_(null),x=l?n.secondYear:n.year,N=l?n.secondMonth:n.month,J=ae(),W=ie(e);le(()=>{!R.current||!A||(R.current=!1,E.current?.querySelector(`[data-date="${q(A,C)}"]:enabled`)?.focus())});let V=s=>{let w=E.current?.closest('[role="dialog"]')??document,p=w.querySelectorAll(`.${t.day}:enabled`),u=Array.from(p).findIndex(g=>g.dataset.date===s),b=w.querySelector(`.${t.day}.${t.selected}`),m=d&&n.tempValue.startDate&&!n.tempValue.endDate&&b;p.forEach((g,S)=>{let Y=g.classList.contains(t.selected),o=S===u;if(m){let r=Array.from(p).indexOf(b),[h,v]=[Math.min(r,u),Math.max(r,u)];g.classList.toggle(t.rangeItem,S>=h&&S<=v),g.classList.toggle(t.selectedHover,o)}else g.classList.toggle(t.selectedHover,Y&&o),g.classList.toggle(t.hovered,!Y&&o)})},Q=()=>k==="month"?a(ye,{months:W,onChange:X,selectedMonth:l?n.secondMonth:n.month}):k==="year"?a(he,{onChange:j,selectedYear:l?n.secondYear:n.year,startYear:L}):H(ve,{children:[a("div",{className:t.daysOfWeek,children:de(e).map(s=>a(ge,{day:s},s))}),a("div",{className:t.calendarGrid,children:J})]}),X=s=>{c(s),B("day")},j=s=>{U(s),B("day")},Z=s=>{B(k!=="day"&&k===s?"day":s)},ee=()=>{O(L-20)},te=()=>{O(L+20)};function ae(){let s=I(new Date(x,N,1)),w=D?T(D):-1/0,p=i?T(i):1/0,u=new Date().toDateString(),b=new Intl.DateTimeFormat(e,{dateStyle:"full"}),m=(o,r)=>o?.toDateString()===r.toDateString(),g=Array.from({length:42},(o,r)=>{let h=new Date(x,N,r-s+1),v=h.getMonth()===N,$=!v||h.getTime()<w||h.getTime()>p;return{date:h,isCurrentMonth:v,isDisabled:$}}),S=g.filter(({isDisabled:o})=>!o).map(({date:o})=>o),Y=[A,n.tempValue.startDate,new Date].map(o=>S.find(r=>m(o,r))).find(Boolean)??S[0];return g.map(({date:o,isCurrentMonth:r,isDisabled:h})=>{let v=q(o,C),$=r&&m(n.tempValue.startDate,o),oe=r&&m(n.tempValue.endDate,o),F=$||oe,re=n.rangeDays.some(se=>m(se,o)),K=r&&o.toDateString()===u;return a(f,{"aria-current":K?"date":void 0,"aria-hidden":r?void 0:!0,"aria-label":b.format(o),"aria-pressed":r?F:void 0,className:`${t.day} ${r?"":t.disabledDay} ${F?t.selected:""} ${re&&!F&&r?t.rangeItem:""} ${r&&h?t.outOfRangeDay:""} ${K?t.today:""}`,"data-date":v,disabled:h,onClick:()=>{r&&y(o.getDate(),l)},onFocus:()=>{r&&V(v)},onKeyDown:ne,onMouseEnter:()=>{r&&V(v)},tabIndex:Y&&m(Y,o)?0:-1,variant:"unstyled",children:a("span",{className:t.dayText,children:o.getDate()})},v)})}function ne(s){let w=s.currentTarget.dataset.date,p=me[s.key];if(!w||!p)return;s.preventDefault();let u=p(ce(w,C)),b=u.getTime();if(D&&b<T(D)||i&&b>T(i))return;let m=(u.getFullYear()-x)*12+u.getMonth()-N;m!==0&&c(N+m),R.current=!0,z(u)}return H("div",{className:t.calendar,ref:E,children:[a("div",{className:t.calendarHeader,children:H("div",{className:t.monthYearSelectors,children:[k!=="year"?a(f,{"aria-label":"Previous month",onClick:()=>{c((l?n.secondMonth:n.month)-1)},variant:"icon",children:a("svg",{"aria-hidden":"true",fill:"currentColor",height:"16",stroke:"currentColor",strokeWidth:"10",viewBox:"0 0 256 256",width:"16",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"})})}):a(f,{"aria-label":"Previous years",onClick:ee,variant:"icon",children:a("svg",{"aria-hidden":"true",fill:"currentColor",height:"16",stroke:"currentColor",strokeWidth:"10",viewBox:"0 0 256 256",width:"16",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z"})})}),a(f,{className:t.monthSelector,label:W[l?n.secondMonth:n.month],onClick:()=>{Z("month")},variant:"unstyled"}),a("strong",{children:"/"}),a(f,{className:t.yearSelector,label:`${l?n.secondYear:n.year}`,onClick:()=>{Z("year")},variant:"unstyled"}),k!=="year"?a(f,{"aria-label":"Next month",onClick:()=>{c((l?n.secondMonth:n.month)+1)},variant:"icon",children:a("svg",{"aria-hidden":"true",fill:"currentColor",height:"16",stroke:"currentColor",strokeWidth:"10",viewBox:"0 0 256 256",width:"16",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"})})}):a(f,{"aria-label":"Next years",onClick:te,variant:"icon",children:a("svg",{"aria-hidden":"true",fill:"currentColor",height:"16",stroke:"currentColor",strokeWidth:"10",viewBox:"0 0 256 256",width:"16",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z"})})})]})}),Q()]})}export{ke as Calendar};
@@ -0,0 +1 @@
1
+ "use client";import{a as m}from"../../../chunk-JMACSFO3.mjs";import{useCallback as Z,useEffect as B,useRef as q,useState as C}from"react";import{Button as x}from"../../interaction/button/index.mjs";import{Input as N}from"../input/index.mjs";import{getDateFormatByLanguage as E,getDateFromDateString as v,getDateStringByLanguage as T,validateFormatDate as f}from"../../../utils/dates.mjs";import{useDebounce as O}from"../../../hooks/use-debounce.mjs";import{useDatePicker as R}from"./use-datepicker.mjs";import{Fragment as U,jsx as c,jsxs as _}from"react/jsx-runtime";function X({disabled:D,displayFormat:t,inputRef:i,isRange:r,language:e,onClick:b,onBlur:w,readOnly:d,...y}){let{state:{modalOpen:L,value:{startDate:a,endDate:s}},dispatch:u}=R(),[h,k]=C(T({displayFormat:t,isRange:r,...a&&{startDate:a},...s&&{endDate:s},language:e})),[P,I]=C(!0),n=O({value:h,delay:500}),g=q(null),S=Z(o=>{g.current=o,typeof i=="function"?i(o):i&&(i.current=o)},[i]);B(()=>{if(![10,23].includes(n.length)||P)return;let o=t??E(e);if(n.length===10&&!r&&f(n,e,t)){let l=v(n,o);u({type:"SET_VALUE",payload:{startDate:l,endDate:null}})}else if(n.length===23&&f(n.split(" - ")[0],e,t)&&f(n.split(" - ")[1],e,t)){let[l,V]=n.split(" - ");u({type:"SET_VALUE",payload:{startDate:v(l,o),endDate:v(V,o)}})}},[n,u,t,P,r,e]),B(()=>{k(T({displayFormat:t,isRange:r,...a&&{startDate:a},...s&&{endDate:s},language:e}))},[a,s,t,r,e]);let H=()=>{I(!0),g.current?.focus(),b()},M=o=>{I(!1),k(o.target.value)},p=(t??E(e)).replace(/[a-zA-Z]/g,"#"),A=r?`${p} - ${p}`:p;return _(U,{children:[c(N,{disabled:D,inputMode:"numeric",mask:A,onBlur:()=>{w?.({startDate:a,endDate:s})},onChange:M,readOnly:d,ref:S,type:"text",value:h,variant:"unstyled",...y}),c(x,{"aria-expanded":L,"aria-haspopup":"dialog","aria-label":"Open calendar",className:m.inputButton,disabled:D||d,onClick:H,shape:"pill",variant:"icon",children:c("svg",{className:m.inputButtonIcon,viewBox:"0 -960 960 960",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Z"})})})]})}export{X as DatePickerInput};
@@ -0,0 +1 @@
1
+ var o={startDate:null,endDate:null},r=new Date(new Date().getFullYear(),new Date().getMonth()+1,1),D={value:o,tempValue:o,modalOpen:!1,year:new Date().getFullYear(),secondYear:r.getFullYear(),month:new Date().getMonth(),secondMonth:r.getMonth(),rangeDays:[]},y=(e,a)=>{switch(a.type){case"SET_VALUE":{let{startDate:n,endDate:t}=a.payload,l=n?.getFullYear()??e.year,p=n?.getMonth()??e.month,E=t?.getFullYear()??e.secondYear,d=t&&(t.getMonth()>e.secondMonth||n&&n.getMonth()===11)?t.getMonth():e.secondMonth;return{...e,value:a.payload,tempValue:a.payload,year:l,month:p,secondYear:E,secondMonth:d}}case"TOGGLE_MODAL":return{...e,modalOpen:!e.modalOpen};case"CLOSE_MODAL":return e.modalOpen?{...e,modalOpen:!1}:e;case"SET_YEAR":return{...e,year:a.payload};case"SET_SECOND_YEAR":return{...e,secondYear:a.payload};case"SET_MONTH":return{...e,month:a.payload};case"SET_SECOND_MONTH":return{...e,secondMonth:a.payload};case"SET_RANGE_DAYS":return{...e,rangeDays:a.payload};default:return{...e,tempValue:a.payload}}};export{D as DATE_PICKER_INITIAL_STATE,o as DEFAULT_DATE_PICKER_VALUE,y as datePickerReducer};
@@ -0,0 +1,2 @@
1
+ "use client";import{a as l}from"../../../chunk-JMACSFO3.mjs";import{forwardRef as ae,useEffect as A,useRef as oe,useReducer as ne}from"react";import{getDateFormatByLanguage as re}from"../../../utils/dates.mjs";import{Button as $}from"../../interaction/button/index.mjs";import{useClickOutside as le}from"../../../hooks/use-click-outside.mjs";import{DatePickerContext as se}from"./use-datepicker.mjs";import{DEFAULT_DATE_PICKER_VALUE as ie,DATE_PICKER_INITIAL_STATE as w,datePickerReducer as I}from"./datepicker-reducer.mjs";import{Calendar as H}from"./calendar.mjs";import{DatePickerInput as ce}from"./datepicker-input.mjs";import{jsx as D,jsxs as L}from"react/jsx-runtime";var de="en",Y={apply:"Apply",cancel:"Cancel"},pe=(n,d)=>({"--datepicker-scheme":`var(--plume-color-${n}-text)`,"--datepicker-solid":`var(--plume-color-${n}-solid)`,"--datepicker-contrast":`var(--plume-color-${n}-solid-contrast)`,"--datepicker-range-item-color":`var(--plume-color-${n}-200)`,"--datepicker-range-item-text":`var(--plume-color-${n}-900)`,"--datepicker-hover-color":`var(--plume-color-${n}-100)`,"--datepicker-selected-hover-color":`var(--plume-color-${n}-solid-hover)`,...d??{}});function ue({colorScheme:n,labels:{cancel:d,apply:y},onApply:s,onCancel:p}){return L("div",{className:l.footerActions,children:[D($,{className:l.footerButton,label:d,onClick:p,variant:"ghost"}),D($,{className:l.footerButtonApply,colorScheme:n,label:y,onClick:s})]})}var me=(n,d,y,s,p,u)=>{let h=u&&(u!=="md"||s==="unstyled")?l[u]:"",v=p&&(p!=="rounded"||s==="unstyled")?l[p]:"",k=s!=="unstyled"?l[s]:"",f=d?l.disabled:"",g=y&&s!=="unstyled"?l.invalid:"";return`${h} ${v} ${k}
2
+ ${f} ${g} ${n}`.trim()},De=ae(({onChange:n,onBlur:d,inputRef:y,displayFormat:s,style:p,showFooter:u,minDate:h,maxDate:v,placeholder:k,value:f,disabled:g=!1,className:B="",colorScheme:R="secondary",variant:T="outline",config:M,isCalendar:E=!1,isRange:i=!1,...C},b)=>{let S=M?.language??de,U={apply:M?.footer?.apply??Y.apply,cancel:M?.footer?.cancel??Y.cancel},[t,o]=ne(I,f,e=>e?I(w,{type:"SET_VALUE",payload:e}):w),O=oe(!0),m=le({callback:()=>{o({type:"CLOSE_MODAL"})}}),G=e=>{m.current=e,typeof b=="function"?b(e):b&&(b.current=e)},{size:q=T!=="unstyled"?"md":void 0,shape:z=T!=="unstyled"?"rounded":void 0}=C,K=me(B,g,C["aria-invalid"]===!0||C["aria-invalid"]==="true",T,z,q);A(()=>{if(t.modalOpen)if(i&&t.tempValue.startDate&&t.tempValue.endDate){let e=[],a=new Date(t.tempValue.startDate);for(;a<=t.tempValue.endDate;)e.push(new Date(a)),a.setDate(a.getDate()+1);o({type:"SET_RANGE_DAYS",payload:e})}else o({type:"SET_RANGE_DAYS",payload:[]})},[i,t.tempValue,t.modalOpen]),A(()=>{if(O.current){O.current=!1;return}o({type:"SET_VALUE",payload:f??ie})},[f]),A(()=>{t.modalOpen&&m.current?.querySelector('[role="dialog"] [data-date][tabindex="0"]')?.focus()},[t.modalOpen,m]);let J=()=>{o({type:"TOGGLE_MODAL"})},_=()=>{E||(o({type:"CLOSE_MODAL"}),m.current?.querySelector("input")?.focus())};A(()=>{if(!t.modalOpen||E)return;let e=a=>{a.key!=="Escape"||!m.current?.contains(a.target)||(o({type:"CLOSE_MODAL"}),m.current.querySelector("input")?.focus())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t.modalOpen,E,m]);let Q=e=>{let a=e.relatedTarget;a&&!e.currentTarget.contains(a)&&o({type:"CLOSE_MODAL"})},P=(e,a)=>e*12+a,F=(e,a)=>{o({type:"SET_YEAR",payload:Math.floor(e/12)}),o({type:"SET_MONTH",payload:e%12}),o({type:"SET_SECOND_YEAR",payload:Math.floor(a/12)}),o({type:"SET_SECOND_MONTH",payload:a%12})},N=(e,a)=>{let c=P(e,a);F(c,Math.max(P(t.secondYear,t.secondMonth),c+1))},V=(e,a)=>{let c=P(e,a);F(Math.min(P(t.year,t.month),c-1),c)},W=e=>{N(e,t.month)},X=e=>{N(t.year,e)},Z=e=>{V(e,t.secondMonth)},j=e=>{V(t.secondYear,e)},ee=()=>{o({type:"SET_VALUE",payload:t.tempValue}),t.tempValue.startDate&&n({startDate:t.tempValue.startDate,endDate:t.tempValue.endDate}),_()},x=(e,a)=>{let c=new Date(a?t.secondYear:t.year,a?t.secondMonth:t.month,e),r={...t.tempValue};u||!i||!r.startDate||r.endDate?(r.startDate=c,r.endDate=null):c<r.startDate?(r.endDate=r.startDate,r.startDate=c):r.endDate=c,o({type:"SET_TEMP_VALUE",payload:r}),!u&&(!i||r.endDate)&&(n({startDate:r.startDate,endDate:r.endDate}),o({type:"SET_VALUE",payload:r}),_())},te=()=>{let e=s??re(S);return i?`${e} - ${e}`:e};return D(se.Provider,{value:{state:t,dispatch:o},children:L("div",{className:l.datePicker,onBlur:Q,ref:G,style:pe(R,p),children:[!E&&D(ce,{className:K,disabled:g,displayFormat:s,inputRef:y,isRange:i,language:S,onBlur:d,onClick:J,placeholder:k??te(),...C}),E||t.modalOpen?L("div",{"aria-label":"Calendar",className:l.datePickerModal,role:"dialog",children:[L("div",{className:i?l.calendarContainerDouble:l.calendarContainer,children:[D(H,{isRange:i,language:S,maxDate:v,minDate:h,onMonthChange:X,onSelectDate:x,onYearChange:W}),i?D(H,{isRange:i,isSecondCalendar:!0,language:S,maxDate:v,minDate:h,onMonthChange:j,onSelectDate:x,onYearChange:Z}):null]}),u?D(ue,{colorScheme:R,labels:U,onApply:ee,onCancel:_}):null]}):null]})})});De.displayName="DatePicker";export{De as DatePicker};
@@ -1 +1 @@
1
- export{a as DatePicker}from'../../../chunk-V5DKNP76.mjs';import'../../../chunk-PNXPX444.mjs';import'../../../chunk-NNP2MCGD.mjs';import'../../../chunk-TQ7ENVY5.mjs';import'../../../chunk-D237D3H5.mjs';import'../../../chunk-NFXMVNGX.mjs';import'../../../chunk-ZN4UC4TJ.mjs';import'../../../chunk-6RTAEXNN.mjs';import'../../../chunk-WM4KUIPD.mjs';import'../../../chunk-AOJBMSYA.mjs';import'../../../chunk-BOTD5R53.mjs';
1
+ import{DatePicker as r}from"./datepicker.mjs";export{r as DatePicker};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as t,useContext as r}from"react";var i=t(void 0),o=()=>{let e=r(i);if(!e)throw new Error("useDatePicker must be used within a DatePickerProvider");return e};export{i as DatePickerContext,o as useDatePicker};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,useContext as t}from"react";var n=e(void 0),o=()=>t(n);export{n as FieldContext,o as useFieldContext};
@@ -0,0 +1 @@
1
+ "use client";import{Children as I,cloneElement as O,forwardRef as T,useId as C,useMemo as $}from"react";import{FieldContext as E}from"./field-context.mjs";var e={field:"_field_wdljj_3",vertical:"_vertical_wdljj_10 _field_wdljj_3",horizontal:"_horizontal_wdljj_14 _field_wdljj_3",label:"_label_wdljj_22",requiredIndicator:"_requiredIndicator_wdljj_32",optionalText:"_optionalText_wdljj_37",helperText:"_helperText_wdljj_43",errorText:"_errorText_wdljj_44",disabled:"_disabled_wdljj_58"};import{jsx as o,jsxs as j}from"react/jsx-runtime";var q=T(({children:F,className:w="",disabled:s=!1,errorText:d,helperText:i,invalid:c=!!d,label:t,optionalText:p,orientation:y="vertical",readOnly:x=!1,required:a=!1,style:v},h)=>{let r=C(),_=I.only(F),l=_.props,b=l.id??`${r}-control`,n=t?`${r}-label`:void 0,m=`${r}-helper`,f=`${r}-error`,u=c&&!!d,N=[l["aria-describedby"],u?f:null,i?m:null].filter(Boolean).join(" ")||void 0,P=$(()=>({labelId:n}),[n]),R=`${e.field} ${e[y]} ${s?e.disabled:""} ${w}`.trim();return o(E.Provider,{value:P,children:j("div",{className:R,ref:h,style:v,children:[t?j("label",{className:e.label,htmlFor:b,id:n,children:[t,a?o("span",{"aria-hidden":"true",className:e.requiredIndicator,children:"*"}):null,!a&&p?o("span",{className:e.optionalText,children:p}):null]}):null,O(_,{id:b,"aria-describedby":N,"aria-invalid":c||l["aria-invalid"]||void 0,disabled:s||l.disabled,readOnly:x||l.readOnly,required:a||l.required}),i?o("p",{className:e.helperText,id:m,children:i}):null,u?o("p",{className:e.errorText,id:f,children:d}):null]})})});q.displayName="Field";export{q as Field};
@@ -1 +1 @@
1
- export{a as Field}from'../../../chunk-A72ZRKNC.mjs';
1
+ import{Field as t}from"./field.mjs";export{t as Field};
@@ -1 +1 @@
1
- export{a as Input}from'../../../chunk-PNXPX444.mjs';import'../../../chunk-ZN4UC4TJ.mjs';
1
+ import{Input as o}from"./input.mjs";export{o as Input};
@@ -0,0 +1,2 @@
1
+ "use client";import{forwardRef as $}from"react";import{useMask as L}from"../../../hooks/use-mask.mjs";var e={"input-padding":"var(--plume-space-4)","input-border-radius":"var(--plume-radius-4)","input-color":"var(--plume-foreground)","input-border-color":"var(--plume-border-strong)","input-background-color":"var(--plume-surface-muted)",base:"_base_162n4_9",input:"_input_162n4_16",sm:"_sm_162n4_32",md:"_md_162n4_38",lg:"_lg_162n4_43",rounded:"_rounded_162n4_49",outline:"_outline_162n4_53 _input_162n4_16",pill:"_pill_162n4_53",filled:"_filled_162n4_62 _input_162n4_16",underline:"_underline_162n4_70 _input_162n4_16",invalid:"_invalid_162n4_80",inputGroup:"_inputGroup_162n4_89",disabled:"_disabled_162n4_101",addOn:"_addOn_162n4_120",element:"_element_162n4_176"};import{jsx as r,jsxs as H}from"react/jsx-runtime";var M=(t,o,s,n,d,_,m)=>{let p=o?e.disabled:"",i=s&&n?e.invalid:"",c=n?e[d]:"",f=n?e[_]:"",l=n?e[m]:"";return`${e.base} ${f} ${c} ${l}
2
+ ${p} ${i} ${t}`.trim()},w=t=>({"--input-color":`var(--plume-color-${t}-text)`}),z=$(({addonBefore:t,addonAfter:o,elementBefore:s,elementAfter:n,style:d,className:_="",colorScheme:m="secondary",disabled:p=!1,readOnly:i=!1,shape:c="rounded",size:f="md",type:l="text",variant:g="outline",mask:b,value:v,defaultValue:C,onChange:P,...u},I)=>{let a=g!=="unstyled",h=u["aria-invalid"]===!0||u["aria-invalid"]==="true",y=M(_,p,h,a,c,f,g),S={...w(h?"error":m),...d},R=t||o||s||n,{value:O,onChange:x}=L({mask:b,value:typeof v=="string"?v:void 0,defaultValue:typeof C=="string"?C:void 0,onChange:P}),N={onChange:x,value:b?O:v,defaultValue:b?void 0:C};return R?H("div",{className:a?e.inputGroup:"",style:S,children:[t?r("span",{className:a?e.addOn:"",children:t}):null,s?r("span",{className:a?e.element:"",children:s}):null,r("input",{className:y,disabled:p,readOnly:i,ref:I,type:l,...N,...u}),o?r("span",{className:a?e.addOn:"",children:o}):null,n?r("span",{className:a?e.element:"",children:n}):null]}):r("input",{className:y,disabled:p,readOnly:i,ref:I,style:S,type:l,...N,...u})});z.displayName="Input";export{z as Input};
@@ -0,0 +1 @@
1
+ import{Radio as r}from"./radio.mjs";import{RadioGroup as d}from"./radio-group.mjs";export{r as Radio,d as RadioGroup};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,useContext as o}from"react";var n=e(void 0),i=()=>o(n);export{n as RadioGroupContext,i as useRadioGroupContext};
@@ -0,0 +1 @@
1
+ "use client";import{forwardRef as T,useCallback as I,useId as V,useMemo as w,useState as z}from"react";import{useFieldContext as S}from"../field/field-context.mjs";import{RadioGroupContext as A}from"./radio-group-context.mjs";var t={group:"_group_1yg36_1",vertical:"_vertical_1yg36_6",horizontal:"_horizontal_1yg36_11"};import{jsx as R}from"react/jsx-runtime";var O=T(({children:y,className:g="",colorScheme:n,defaultValue:G,disabled:o=!1,name:l,onChange:d,orientation:C="vertical",readOnly:a=!1,required:r=!1,size:p,style:h,value:u,variant:s,...e},P)=>{let m=V(),_=S(),[x,E]=z(G),i=u!==void 0,c=i?u:x,f=e["aria-invalid"]===!0||e["aria-invalid"]==="true",M=e["aria-labelledby"]??(e["aria-label"]?void 0:_?.labelId),v=I((b,L)=>{i||E(b),d?.(b,L)},[i,d]),H=w(()=>({colorScheme:n,disabled:o,invalid:f,name:l??m,readOnly:a,required:r,select:v,size:p,value:c,variant:s}),[n,c,o,m,f,l,a,r,v,p,s]);return R(A.Provider,{value:H,children:R("div",{...e,"aria-disabled":o||void 0,"aria-labelledby":M,"aria-readonly":a||void 0,"aria-required":r||void 0,className:`${t.group} ${t[C]} ${g}`.trim(),ref:P,role:"radiogroup",style:h,children:y})})});O.displayName="RadioGroup";export{O as RadioGroup};
@@ -0,0 +1 @@
1
+ "use client";import{forwardRef as T}from"react";import{useRadioGroupContext as B}from"./radio-group-context.mjs";var o={root:"_root_ge9em_1",sm:"_sm_ge9em_11",md:"_md_ge9em_16",lg:"_lg_ge9em_21",radio:"_radio_ge9em_26",solid:"_solid_ge9em_52",outline:"_outline_ge9em_61",invalid:"_invalid_ge9em_82",label:"_label_ge9em_86",disabled:"_disabled_ge9em_90"};import{jsx as _,jsxs as z}from"react/jsx-runtime";var k=(a,t)=>({"--radio-solid":`var(--plume-color-${a}-solid)`,"--radio-contrast":`var(--plume-color-${a}-solid-contrast)`,"--radio-text":`var(--plume-color-${a}-text)`,...t}),w=T(({checked:a,children:t,className:f="",colorScheme:v,defaultChecked:b,disabled:C=!1,name:g,onChange:d,readOnly:y=!1,required:s=!1,size:R,style:S,value:n,variant:h,...l},P)=>{let e=B(),p=h??e?.variant??"solid",i=p!=="unstyled",m=l["aria-invalid"]===!0||l["aria-invalid"]==="true"||!!e?.invalid,u=C||!!e?.disabled,c=y||!!e?.readOnly,E=R??e?.size??"md",M=v??e?.colorScheme??"primary",x=[i&&o.root,i&&o[E],u&&o.disabled,f].filter(Boolean).join(" "),I=i?[o.radio,o[p],m&&o.invalid].filter(Boolean).join(" "):void 0,H=r=>{c&&r.preventDefault()},L=r=>{c||(d?.(r),e?.select(String(n??""),r))},O=e?{checked:e.value===String(n??""),name:e.name,required:e.required||s}:{checked:a,defaultChecked:b,name:g,required:s};return z("label",{className:x,style:k(m?"error":M,S),children:[_("input",{className:I,disabled:u,onChange:d||e?L:void 0,onClick:H,ref:P,type:"radio",value:n,...O,...l}),t?_("span",{className:i?o.label:void 0,children:t}):null]})});w.displayName="Radio";export{w as Radio};
@@ -0,0 +1 @@
1
+ import{Textarea as a}from"./textarea.mjs";export{a as Textarea};
@@ -0,0 +1 @@
1
+ import{forwardRef as u}from"react";var e={"textarea-padding":"var(--plume-space-4)","textarea-border-radius":"var(--plume-radius-4)","textarea-border-color":"var(--plume-border-strong)","textarea-background-color":"var(--plume-surface-muted)",base:"_base_1qiho_6",textarea:"_textarea_1qiho_13",sm:"_sm_1qiho_28",md:"_md_1qiho_33",lg:"_lg_1qiho_37",rounded:"_rounded_1qiho_42",outline:"_outline_1qiho_46 _textarea_1qiho_13",pill:"_pill_1qiho_46",filled:"_filled_1qiho_55 _textarea_1qiho_13",underline:"_underline_1qiho_63 _textarea_1qiho_13",none:"_none_1qiho_69",vertical:"_vertical_1qiho_73",horizontal:"_horizontal_1qiho_77",both:"_both_1qiho_81",invalid:"_invalid_1qiho_89",disabled:"_disabled_1qiho_109"};import{jsx as T}from"react/jsx-runtime";var c=(r,a)=>({"--textarea-color":`var(--plume-color-${r}-text)`,...a}),b=u(({className:r="",colorScheme:a="secondary",disabled:o=!1,resize:d="vertical",rows:s=3,shape:_="rounded",size:p="md",style:x,variant:i="outline",...t},h)=>{let l=i!=="unstyled",n=t["aria-invalid"]===!0||t["aria-invalid"]==="true",m=`${l?`${e.base} ${e[i]} ${e[p]} ${e[_]} ${e[d]}`:""} ${n&&l?e.invalid:""} ${o?e.disabled:""} ${r}`.replace(/\s+/g," ").trim();return T("textarea",{className:m,disabled:o,ref:h,rows:s,style:c(n?"error":a,x),...t})});b.displayName="Textarea";export{b as Textarea};
@@ -0,0 +1 @@
1
+ import{Toggle as g}from"./toggle.mjs";export{g as Toggle};
@@ -0,0 +1 @@
1
+ "use client";import{forwardRef as y}from"react";var e={root:"_root_1soij_1",sm:"_sm_1soij_11",md:"_md_1soij_16",lg:"_lg_1soij_21",toggle:"_toggle_1soij_26",solid:"_solid_1soij_62",outline:"_outline_1soij_70",raised:"_raised_1soij_90",invalid:"_invalid_1soij_125",label:"_label_1soij_130",disabled:"_disabled_1soij_134"};import{jsx as g,jsxs as h}from"react/jsx-runtime";var C=(o,l)=>({"--toggle-solid":`var(--plume-color-${o}-solid)`,"--toggle-contrast":`var(--plume-color-${o}-solid-contrast)`,"--toggle-text":`var(--plume-color-${o}-text)`,...l}),S=y(({children:o,className:l="",colorScheme:u="primary",disabled:s=!1,onChange:a,readOnly:i=!1,size:_="md",style:m,variant:d="solid",...r},c)=>{let t=d!=="unstyled",p=r["aria-invalid"]===!0||r["aria-invalid"]==="true",f=[t&&e.root,t&&e[_],s&&e.disabled,l].filter(Boolean).join(" "),b=t?[e.toggle,e[d],p&&e.invalid].filter(Boolean).join(" "):void 0,v=n=>{i&&n.preventDefault()},T=n=>{i||a?.(n)};return h("label",{className:f,style:C(p?"error":u,m),children:[g("input",{"aria-readonly":i||void 0,className:b,disabled:s,onChange:a?T:void 0,onClick:v,ref:c,role:"switch",type:"checkbox",...r}),o?g("span",{className:t?e.label:void 0,children:o}):null]})});S.displayName="Toggle";export{S as Toggle};
@@ -0,0 +1,2 @@
1
+ import{forwardRef as v}from"react";import{Spinner as B}from"../../presentation/spinner/index.mjs";var o={button:"_button_1l5be_3",sm:"_sm_1l5be_18",md:"_md_1l5be_24",lg:"_lg_1l5be_29",rounded:"_rounded_1l5be_35",pill:"_pill_1l5be_39",solid:"_solid_1l5be_43 _button_1l5be_3",outline:"_outline_1l5be_49 _button_1l5be_3",ghost:"_ghost_1l5be_55 _button_1l5be_3",link:"_link_1l5be_60 _button_1l5be_3",icon:"_icon_1l5be_67 _button_1l5be_3",disabled:"_disabled_1l5be_111",iconMargin:"_iconMargin_1l5be_116",hidden:"_hidden_1l5be_120",spinnerMargin:"_spinnerMargin_1l5be_124"};import{Fragment as P,jsx as p,jsxs as _}from"react/jsx-runtime";var y=(t,l,s,r,u,a)=>{let e=u?o.iconMarginNone:o.iconMargin,d=l&&!t?o.hidden:e,n=l&&t?t:a;return _(P,{children:[s?p("span",{className:e,children:s}):null,n?p("span",{className:d,children:n}):null,r?p("span",{className:e,children:r}):null]})},M=(t,l,s,r,u,a)=>{let e=s||r?o.disabled:"",d=t!=="unstyled"?o[a]:"",n=t!=="unstyled"?o[u]:"",i=t!=="unstyled"?o[t]:"";return`${n} ${d} ${i}
2
+ ${e} ${l}`.trim()},$=t=>({"--button-color":`var(--plume-color-${t}-text)`,"--button-contrast-color":`var(--plume-color-${t}-solid-contrast)`,"--button-solid-bg":`var(--plume-color-${t}-solid)`,"--button-solid-hover":`var(--plume-color-${t}-solid-hover)`,"--button-solid-active":`var(--plume-color-${t}-solid-active)`,"--button-hover-color":`var(--plume-color-${t}-text-hover)`,"--button-focus-color":`var(--plume-color-${t}-text-active)`,"--button-hover-alt-color":`var(--plume-color-${t}-tint)`,"--button-focus-alt-color":`var(--plume-color-${t}-tint-strong)`}),N=v(({children:t,iconLeft:l,iconRight:s,label:r,style:u,busyText:a="",className:e="",colorScheme:d="secondary",disabled:n=!1,isBusy:i=!1,shape:c="rounded",size:m="md",type:g="button",variant:b="solid",...C},h)=>{let f=M(b,e,n,i,m,c);return _("button",{className:f,disabled:n||i,ref:h,style:{...$(d),...u},type:g,...C,children:[y(a,i,l,s,b==="unstyled",r),t,i?p(B,{style:{"--spinner-scheme":"var(--button-contrast-color)"},...a&&{className:o.spinnerMargin},size:"sm"}):null]})});N.displayName="Button";export{N as Button};
@@ -1 +1 @@
1
- export{a as Button}from'../../../chunk-NNP2MCGD.mjs';import'../../../chunk-TQ7ENVY5.mjs';import'../../../chunk-6RTAEXNN.mjs';import'../../../chunk-WM4KUIPD.mjs';import'../../../chunk-AOJBMSYA.mjs';
1
+ import{Button as p}from"./button.mjs";export{p as Button};
@@ -1 +1 @@
1
- export{c as Tab,b as TabList,e as TabPanel,d as TabPanels,a as Tabs}from'../../../chunk-PEVXLYX3.mjs';import'../../../chunk-NNP2MCGD.mjs';import'../../../chunk-TQ7ENVY5.mjs';import'../../../chunk-6RTAEXNN.mjs';import'../../../chunk-WM4KUIPD.mjs';import'../../../chunk-AOJBMSYA.mjs';import'../../../chunk-QON6DQTA.mjs';
1
+ import{Tabs as r}from"./tabs.mjs";import{TabList as e}from"./tab-list.mjs";import{Tab as s}from"./tab.mjs";import{TabPanels as T}from"./tab-panels.mjs";import{TabPanel as f}from"./tab-panel.mjs";export{s as Tab,e as TabList,f as TabPanel,T as TabPanels,r as Tabs};
@@ -0,0 +1 @@
1
+ "use client";import{a as i}from"../../../chunk-PZGR7IS5.mjs";import{Children as p,cloneElement as T,forwardRef as d,isValidElement as f}from"react";import{useTabs as L}from"./use-tabs.mjs";import{jsx as c}from"react/jsx-runtime";var u=d(({children:r,...a},s)=>{let{index:l,alignmentClass:n,isStyled:o,orientation:m,variantClass:b}=L();return c("div",{"aria-orientation":m,className:`${o?i.tablist:""} ${b} ${n}`.trim(),ref:s,role:"tablist",...a,children:p.map(r,(t,e)=>f(t)?T(t,{index:e,isActive:e===l}):t)})});u.displayName="TabList";export{u as TabList};
@@ -0,0 +1 @@
1
+ "use client";import{a as s}from"../../../chunk-PZGR7IS5.mjs";import{Suspense as c,createElement as b,forwardRef as d}from"react";import{Spinner as f}from"../../presentation/spinner/index.mjs";import{lazyLoadContent as y}from"../../../utils/lazy.mjs";import{getPanelId as P,getTabId as T,useTabs as L}from"./use-tabs.mjs";import{jsx as e}from"react/jsx-runtime";var u=d(({children:t,className:m="",index:o=0},p)=>{let{baseId:a,colorScheme:l,isLazy:r,isStyled:i}=L(),n=r?y(t):t;return e("div",{"aria-labelledby":T(a,o),className:`${i?s.panel:""} ${m}`.trim(),id:P(a,o),ref:p,role:"tabpanel",tabIndex:0,children:r?e(c,{fallback:e(f,{color:l}),children:b(n)}):n})});u.displayName="TabPanel";export{u as TabPanel};
@@ -0,0 +1 @@
1
+ "use client";import{Children as a,cloneElement as l,forwardRef as o,isValidElement as m}from"react";import{useTabs as p}from"./use-tabs.mjs";import{jsx as f}from"react/jsx-runtime";var b=o(({children:r,...n},s)=>{let{index:i}=p();return f("div",{ref:s,...n,children:a.map(r,(e,t)=>t!==i?null:m(e)?l(e,{index:t}):e)})});b.displayName="TabPanels";export{b as TabPanels};
@@ -0,0 +1 @@
1
+ "use client";import{a}from"../../../chunk-PZGR7IS5.mjs";import{forwardRef as B}from"react";import{Button as E}from"../../interaction/button/index.mjs";import{getPanelId as H,getTabId as M,useTabs as K}from"./use-tabs.mjs";import{jsx as v}from"react/jsx-runtime";var k=B(({label:d,isActive:e,disabled:p,extraContentLeft:m,extraContentRight:f,index:o=0,children:u,className:T=""},y)=>{let{alignmentClass:g,baseId:l,isStyled:s,orientation:h,sizeClass:w,setActiveTabIndex:L,onChange:i}=K(),[R,A]=h==="vertical"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],C=()=>{i&&i(o),L(o)},P=r=>{let b=r.currentTarget.closest('[role="tablist"]');if(!b)return;let t=Array.from(b.querySelectorAll('[role="tab"]:enabled')),c=t.indexOf(r.currentTarget),n={[R]:t[(c-1+t.length)%t.length],[A]:t[(c+1)%t.length],Home:t[0],End:t[t.length-1]}[r.key];n&&(r.preventDefault(),n.focus(),n.click())};return v(E,{"aria-controls":e?H(l,o):void 0,"aria-selected":!!e,className:`${s?a.tab:""} ${g} ${w} ${e&&s?a.active:""} ${T}`.trim(),disabled:p,iconLeft:m,iconRight:f,id:M(l,o),label:d??"",onClick:C,onKeyDown:P,ref:y,role:"tab",tabIndex:e?0:-1,variant:"unstyled",children:u})});k.displayName="Tab";export{k as Tab};
@@ -0,0 +1 @@
1
+ var n=(e,{type:a,payload:t})=>{switch(a){case"SET_ACTIVE_TAB_INDEX":return{...e,index:t};case"SET_CONFIG":return{...e,...t};default:return e}};export{n as tabsReducer};
@@ -0,0 +1 @@
1
+ import{a as s}from"../../../chunk-PZGR7IS5.mjs";import{forwardRef as P,useId as C}from"react";import{TabsProvider as S}from"./use-tabs.mjs";import{jsx as l}from"react/jsx-runtime";var h=(e,t)=>({"--tabs-scheme":`var(--plume-color-${e}-text)`,"--tabs-solid":`var(--plume-color-${e}-solid)`,"--tabs-solid-active":`var(--plume-color-${e}-solid-active)`,"--tabs-text-color":`var(--plume-color-${e}-solid-contrast)`,...t??{}}),x=P(({children:e,style:t,onChange:d,index:p=0,alignment:b="left",className:m="",colorScheme:a="secondary",orientation:o="horizontal",size:T="md",variant:i="underline",isLazy:c=!1,...n},f)=>{let u=C(),v=n.id??u,r=i!=="unstyled",y=`${o!=="horizontal"||r?s[o]:""} ${r?s.tabs:""} ${m}`.trim();return l(S,{config:{index:p,alignment:b,baseId:v,colorScheme:a,isLazy:c,isStyled:r,orientation:o,size:T,variant:i,onChange:d},children:l("div",{className:y,ref:f,style:h(a,t),...n,children:e})})});x.displayName="Tabs";export{x as Tabs};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-PZGR7IS5.mjs";import{createContext as p,useContext as c,useEffect as m,useMemo as u,useReducer as T}from"react";import{tabsReducer as x}from"./tabs-reducer.mjs";import{jsx as v}from"react/jsx-runtime";var d=p(void 0);function S({config:e,children:s}){let[t,a]=T(x,e),n=t.alignment!=="left"||t.isStyled?r[t.alignment]:"",o=t.isStyled?r[t.size]:"",i=t.isStyled?r[t.variant]:"";m(()=>{a({type:"SET_CONFIG",payload:e})},[e.alignment,e.baseId,e.colorScheme,e.index,e.isLazy,e.orientation,e.size,e.variant]);let b=l=>{a({type:"SET_ACTIVE_TAB_INDEX",payload:l})};return v(d.Provider,{value:u(()=>({...t,alignmentClass:n,sizeClass:o,variantClass:i,setActiveTabIndex:b}),[n,o,t,i]),children:s})}var I=(e,s)=>`${e}-tab-${s}`,f=(e,s)=>`${e}-panel-${s}`,g=()=>{let e=c(d);if(!e)throw new Error("useTabs must be used within a TabsProvider");return e};export{S as TabsProvider,f as getPanelId,I as getTabId,g as useTabs};
@@ -1 +1 @@
1
- export{a as Spinner}from'../../../chunk-TQ7ENVY5.mjs';import'../../../chunk-6RTAEXNN.mjs';import'../../../chunk-WM4KUIPD.mjs';import'../../../chunk-AOJBMSYA.mjs';
1
+ import{Spinner as e}from"./spinner.mjs";export{e as Spinner};
@@ -0,0 +1,5 @@
1
+ import{forwardRef as S}from"react";import{colorVar as z}from"../../../theme/index.mjs";var i={"spinner-border-width":"3px","spinner-border-style":"solid","primary-border-color":"currentColor","border-color":"transparent",spinner:"_spinner_q8rz1_7",spin:"_spin_q8rz1_7",sm:"_sm_q8rz1_18",md:"_md_q8rz1_23",lg:"_lg_q8rz1_28",solid:"_solid_q8rz1_33 _spinner_q8rz1_7",dashed:"_dashed_q8rz1_38 _spinner_q8rz1_7",dotted:"_dotted_q8rz1_43 _spinner_q8rz1_7",double:"_double_q8rz1_48 _spinner_q8rz1_7",loader:"_loader_q8rz1_63",l7:"_l7_q8rz1_1",l5:"_l5_q8rz1_1",l11:"_l11_q8rz1_1",l27:"_l27_q8rz1_1",animloader:"_animloader_q8rz1_1"};import{jsx as c}from"react/jsx-runtime";var u=({color:o,style:t,speed:r,thickness:e})=>({"--spinner-scheme":z(o),...e&&{"--spinner-border-width":`${e}px`},"--spinner-animation-duration":r?.length?r:"1s",...t??{}}),y=S(({color:o="secondary.900",style:t,speed:r,className:e="",thickness:p=3,variant:n="solid",size:s=n!=="unstyled"?"md":void 0,..._},l)=>{let d=s&&(s!=="md"||n==="unstyled")?i[s]:"",a=n!=="unstyled"?i[n]:"",m=`
2
+ ${d}
3
+ ${a}
4
+ ${e}
5
+ `.trim();return c("output",{"aria-label":"loading",className:m,ref:l,style:u({color:o,style:t,speed:r,thickness:p}),..._})});y.displayName="Spinner";export{y as Spinner};
@@ -0,0 +1 @@
1
+ export*from"./use-click-outside.mjs";export*from"./use-debounce.mjs";export*from"./use-mask.mjs";
@@ -1 +1 @@
1
- export{a as useClickOutside}from'../chunk-D237D3H5.mjs';
1
+ "use client";import{useEffect as r,useRef as i}from"react";function s({callback:t}){let e=i(null);return r(()=>{function n(o){e.current&&!e.current.contains(o.target)&&t()}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t]),e}export{s as useClickOutside};
@@ -1 +1 @@
1
- export{a as useDebounce}from'../chunk-NFXMVNGX.mjs';
1
+ "use client";import{useState as o,useEffect as c,useRef as s}from"react";function T({value:t,delay:u}){let[r,n]=o(t),e=s(null);return c(()=>(e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n(t)},u),()=>{e.current&&clearTimeout(e.current)}),[t,u]),r}export{T as useDebounce};
@@ -1 +1 @@
1
- export{a as applyMask,b as useMask}from'../chunk-ZN4UC4TJ.mjs';
1
+ "use client";import{useState as f}from"react";var u={"#":/^[0-9]$/,A:/^\p{L}$/u,"*":/^[\p{L}0-9]$/u};function h(e){let t=[];for(let r=0;r<e.length;r+=1){let s=e[r];s==="\\"&&r+1<e.length?(r+=1,t.push({literal:e[r]})):s in u?t.push({slot:u[s]}):t.push({literal:s})}return t}function l(e,t){if(!t)return e;let r="",s="",n=0;for(let a of h(t)){if(n>=e.length)break;if("literal"in a){s+=a.literal,e[n]===a.literal&&(n+=1);continue}for(;n<e.length&&!a.slot.test(e[n]);)n+=1;if(n>=e.length)break;r+=s+e[n],s="",n+=1}return r}function d({mask:e,value:t,defaultValue:r="",onChange:s}){let n=t!==void 0,[a,p]=f(()=>l(r,e??"")),o=i=>{if(e){let g=l(i.target.value,e);i.target.value=g,n||p(g)}s?.(i)};return e?{value:n?l(t,e):a,onChange:o}:{value:t,onChange:o}}export{l as applyMask,d as useMask};
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, RefObject, ChangeEvent, LazyExoticComponent, ButtonHTMLAttributes, InputHTMLAttributes, Ref, ReactElement, HtmlHTMLAttributes, HTMLAttributes } from 'react';
2
+ import { CSSProperties, ReactNode, RefObject, ChangeEvent, LazyExoticComponent, ButtonHTMLAttributes, InputHTMLAttributes, Ref, ReactElement, HTMLAttributes, HtmlHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
3
 
4
4
  type RadiusValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 'full';
5
5
  type SizeValue = 'max' | 'min' | 'full';
@@ -98,6 +98,7 @@ interface SemanticColors {
98
98
  foreground: string;
99
99
  muted: string;
100
100
  border: string;
101
+ borderStrong: string;
101
102
  }
102
103
  interface Theme {
103
104
  colors: ColorPalette;
@@ -247,6 +248,18 @@ type ButtonRootAttributes = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-
247
248
  type ButtonProps = ComponentProps & ButtonRootAttributes & ButtonOwnProps;
248
249
  declare const Button: react.ForwardRefExoticComponent<ComponentProps & ButtonRootAttributes & ButtonOwnProps & react.RefAttributes<HTMLButtonElement>>;
249
250
 
251
+ interface CheckboxOwnProps {
252
+ colorScheme?: ColorScheme;
253
+ indeterminate?: boolean;
254
+ readOnly?: boolean;
255
+ size?: Size;
256
+ variant?: CheckboxVariant;
257
+ }
258
+ type CheckboxVariant = 'solid' | 'outline' | 'unstyled';
259
+ type CheckboxRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
260
+ type CheckboxProps = Omit<ComponentProps, 'index'> & CheckboxRootAttributes & CheckboxOwnProps;
261
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CheckboxRootAttributes & CheckboxOwnProps & react.RefAttributes<HTMLInputElement>>;
262
+
250
263
  interface DatePickerOwnProps {
251
264
  colorScheme?: ColorScheme;
252
265
  config?: DatePickerConfig;
@@ -323,6 +336,35 @@ type InputVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
323
336
  type InputProps = ComponentProps & InputRootAttributes & InputOwnProps;
324
337
  declare const Input: react.ForwardRefExoticComponent<ComponentProps & InputRootAttributes & InputOwnProps & react.RefAttributes<HTMLInputElement>>;
325
338
 
339
+ interface RadioOwnProps {
340
+ colorScheme?: ColorScheme;
341
+ readOnly?: boolean;
342
+ size?: Size;
343
+ variant?: RadioVariant;
344
+ }
345
+ type RadioVariant = 'solid' | 'outline' | 'unstyled';
346
+ type RadioRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
347
+ type RadioProps = Omit<ComponentProps, 'index'> & RadioRootAttributes & RadioOwnProps;
348
+ declare const Radio: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioRootAttributes & RadioOwnProps & react.RefAttributes<HTMLInputElement>>;
349
+
350
+ interface RadioGroupOwnProps {
351
+ colorScheme?: ColorScheme;
352
+ defaultValue?: string;
353
+ disabled?: boolean;
354
+ name?: string;
355
+ onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
356
+ orientation?: RadioGroupOrientation;
357
+ readOnly?: boolean;
358
+ required?: boolean;
359
+ size?: Size;
360
+ value?: string;
361
+ variant?: RadioVariant;
362
+ }
363
+ type RadioGroupOrientation = 'vertical' | 'horizontal';
364
+ type RadioGroupRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'children' | 'id'>;
365
+ type RadioGroupProps = Omit<ComponentProps, 'index'> & RadioGroupRootAttributes & RadioGroupOwnProps;
366
+ declare const RadioGroup: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioGroupRootAttributes & RadioGroupOwnProps & react.RefAttributes<HTMLDivElement>>;
367
+
326
368
  interface SpinnerOwnProps {
327
369
  color?: ColorShade;
328
370
  size?: Size;
@@ -371,4 +413,28 @@ declare const TabPanels: react.ForwardRefExoticComponent<TabPanelsProps & react.
371
413
  type TabPanelProps = Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & Pick<ComponentProps, 'index'>;
372
414
  declare const TabPanel: react.ForwardRefExoticComponent<Pick<HTMLAttributes<HTMLDivElement>, "children" | "className"> & Pick<ComponentProps, "index"> & react.RefAttributes<HTMLDivElement>>;
373
415
 
374
- export { type Breakpoints, Button, type ButtonProps, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FontSizes, type FontWeights, Input, type InputProps, type LazyLoadedComponent, type LineHeights, type MaskChangeHandler, type Radii, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, type Size, type Sizes, type Spaces, Spinner, type SpinnerProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Tabs, type TabsProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, validateFormatDate };
416
+ interface TextareaOwnProps {
417
+ colorScheme?: ColorScheme;
418
+ resize?: TextareaResize;
419
+ shape?: Shape;
420
+ size?: Size;
421
+ variant?: TextareaVariant;
422
+ }
423
+ type TextareaVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
424
+ type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
425
+ type TextareaRootAttributes = Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'cols' | 'defaultValue' | 'disabled' | 'id' | 'maxLength' | 'minLength' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'readOnly' | 'required' | 'rows' | 'value' | 'wrap'>;
426
+ type TextareaProps = Omit<ComponentProps, 'index'> & TextareaRootAttributes & TextareaOwnProps;
427
+ declare const Textarea: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TextareaRootAttributes & TextareaOwnProps & react.RefAttributes<HTMLTextAreaElement>>;
428
+
429
+ interface ToggleOwnProps {
430
+ colorScheme?: ColorScheme;
431
+ readOnly?: boolean;
432
+ size?: Size;
433
+ variant?: ToggleVariant;
434
+ }
435
+ type ToggleVariant = 'solid' | 'outline' | 'raised' | 'unstyled';
436
+ type ToggleRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
437
+ type ToggleProps = Omit<ComponentProps, 'index'> & ToggleRootAttributes & ToggleOwnProps;
438
+ declare const Toggle: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ToggleRootAttributes & ToggleOwnProps & react.RefAttributes<HTMLInputElement>>;
439
+
440
+ export { type Breakpoints, Button, type ButtonProps, Checkbox, type CheckboxProps, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FontSizes, type FontWeights, Input, type InputProps, type LazyLoadedComponent, type LineHeights, type MaskChangeHandler, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, type Size, type Sizes, type Spaces, Spinner, type SpinnerProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Toggle, type ToggleProps, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, validateFormatDate };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, RefObject, ChangeEvent, LazyExoticComponent, ButtonHTMLAttributes, InputHTMLAttributes, Ref, ReactElement, HtmlHTMLAttributes, HTMLAttributes } from 'react';
2
+ import { CSSProperties, ReactNode, RefObject, ChangeEvent, LazyExoticComponent, ButtonHTMLAttributes, InputHTMLAttributes, Ref, ReactElement, HTMLAttributes, HtmlHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
3
 
4
4
  type RadiusValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 'full';
5
5
  type SizeValue = 'max' | 'min' | 'full';
@@ -98,6 +98,7 @@ interface SemanticColors {
98
98
  foreground: string;
99
99
  muted: string;
100
100
  border: string;
101
+ borderStrong: string;
101
102
  }
102
103
  interface Theme {
103
104
  colors: ColorPalette;
@@ -247,6 +248,18 @@ type ButtonRootAttributes = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-
247
248
  type ButtonProps = ComponentProps & ButtonRootAttributes & ButtonOwnProps;
248
249
  declare const Button: react.ForwardRefExoticComponent<ComponentProps & ButtonRootAttributes & ButtonOwnProps & react.RefAttributes<HTMLButtonElement>>;
249
250
 
251
+ interface CheckboxOwnProps {
252
+ colorScheme?: ColorScheme;
253
+ indeterminate?: boolean;
254
+ readOnly?: boolean;
255
+ size?: Size;
256
+ variant?: CheckboxVariant;
257
+ }
258
+ type CheckboxVariant = 'solid' | 'outline' | 'unstyled';
259
+ type CheckboxRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
260
+ type CheckboxProps = Omit<ComponentProps, 'index'> & CheckboxRootAttributes & CheckboxOwnProps;
261
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CheckboxRootAttributes & CheckboxOwnProps & react.RefAttributes<HTMLInputElement>>;
262
+
250
263
  interface DatePickerOwnProps {
251
264
  colorScheme?: ColorScheme;
252
265
  config?: DatePickerConfig;
@@ -323,6 +336,35 @@ type InputVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
323
336
  type InputProps = ComponentProps & InputRootAttributes & InputOwnProps;
324
337
  declare const Input: react.ForwardRefExoticComponent<ComponentProps & InputRootAttributes & InputOwnProps & react.RefAttributes<HTMLInputElement>>;
325
338
 
339
+ interface RadioOwnProps {
340
+ colorScheme?: ColorScheme;
341
+ readOnly?: boolean;
342
+ size?: Size;
343
+ variant?: RadioVariant;
344
+ }
345
+ type RadioVariant = 'solid' | 'outline' | 'unstyled';
346
+ type RadioRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
347
+ type RadioProps = Omit<ComponentProps, 'index'> & RadioRootAttributes & RadioOwnProps;
348
+ declare const Radio: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioRootAttributes & RadioOwnProps & react.RefAttributes<HTMLInputElement>>;
349
+
350
+ interface RadioGroupOwnProps {
351
+ colorScheme?: ColorScheme;
352
+ defaultValue?: string;
353
+ disabled?: boolean;
354
+ name?: string;
355
+ onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
356
+ orientation?: RadioGroupOrientation;
357
+ readOnly?: boolean;
358
+ required?: boolean;
359
+ size?: Size;
360
+ value?: string;
361
+ variant?: RadioVariant;
362
+ }
363
+ type RadioGroupOrientation = 'vertical' | 'horizontal';
364
+ type RadioGroupRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'children' | 'id'>;
365
+ type RadioGroupProps = Omit<ComponentProps, 'index'> & RadioGroupRootAttributes & RadioGroupOwnProps;
366
+ declare const RadioGroup: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioGroupRootAttributes & RadioGroupOwnProps & react.RefAttributes<HTMLDivElement>>;
367
+
326
368
  interface SpinnerOwnProps {
327
369
  color?: ColorShade;
328
370
  size?: Size;
@@ -371,4 +413,28 @@ declare const TabPanels: react.ForwardRefExoticComponent<TabPanelsProps & react.
371
413
  type TabPanelProps = Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & Pick<ComponentProps, 'index'>;
372
414
  declare const TabPanel: react.ForwardRefExoticComponent<Pick<HTMLAttributes<HTMLDivElement>, "children" | "className"> & Pick<ComponentProps, "index"> & react.RefAttributes<HTMLDivElement>>;
373
415
 
374
- export { type Breakpoints, Button, type ButtonProps, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FontSizes, type FontWeights, Input, type InputProps, type LazyLoadedComponent, type LineHeights, type MaskChangeHandler, type Radii, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, type Size, type Sizes, type Spaces, Spinner, type SpinnerProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Tabs, type TabsProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, validateFormatDate };
416
+ interface TextareaOwnProps {
417
+ colorScheme?: ColorScheme;
418
+ resize?: TextareaResize;
419
+ shape?: Shape;
420
+ size?: Size;
421
+ variant?: TextareaVariant;
422
+ }
423
+ type TextareaVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
424
+ type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
425
+ type TextareaRootAttributes = Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'cols' | 'defaultValue' | 'disabled' | 'id' | 'maxLength' | 'minLength' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'readOnly' | 'required' | 'rows' | 'value' | 'wrap'>;
426
+ type TextareaProps = Omit<ComponentProps, 'index'> & TextareaRootAttributes & TextareaOwnProps;
427
+ declare const Textarea: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TextareaRootAttributes & TextareaOwnProps & react.RefAttributes<HTMLTextAreaElement>>;
428
+
429
+ interface ToggleOwnProps {
430
+ colorScheme?: ColorScheme;
431
+ readOnly?: boolean;
432
+ size?: Size;
433
+ variant?: ToggleVariant;
434
+ }
435
+ type ToggleVariant = 'solid' | 'outline' | 'raised' | 'unstyled';
436
+ type ToggleRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
437
+ type ToggleProps = Omit<ComponentProps, 'index'> & ToggleRootAttributes & ToggleOwnProps;
438
+ declare const Toggle: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ToggleRootAttributes & ToggleOwnProps & react.RefAttributes<HTMLInputElement>>;
439
+
440
+ export { type Breakpoints, Button, type ButtonProps, Checkbox, type CheckboxProps, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FontSizes, type FontWeights, Input, type InputProps, type LazyLoadedComponent, type LineHeights, type MaskChangeHandler, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, type Size, type Sizes, type Spaces, Spinner, type SpinnerProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Toggle, type ToggleProps, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, validateFormatDate };