plume-ui-react 0.2.0 → 0.4.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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-BMTPOEL3.mjs +1 -0
  3. package/dist/chunk-DR53VNER.mjs +1 -0
  4. package/dist/chunk-JMACSFO3.mjs +1 -0
  5. package/dist/components/form/checkbox/checkbox.mjs +1 -0
  6. package/dist/components/form/checkbox/index.mjs +1 -0
  7. package/dist/components/form/datepicker/calendar.mjs +1 -1
  8. package/dist/components/form/datepicker/datepicker-input.mjs +1 -1
  9. package/dist/components/form/datepicker/datepicker.mjs +1 -1
  10. package/dist/components/form/field/field-context.mjs +1 -0
  11. package/dist/components/form/field/field.mjs +1 -1
  12. package/dist/components/form/field/use-control-labelled-by.mjs +1 -0
  13. package/dist/components/form/input/input.mjs +2 -2
  14. package/dist/components/form/radio/index.mjs +1 -0
  15. package/dist/components/form/radio/radio-group-context.mjs +1 -0
  16. package/dist/components/form/radio/radio-group.mjs +1 -0
  17. package/dist/components/form/radio/radio.mjs +1 -0
  18. package/dist/components/form/textarea/index.mjs +1 -0
  19. package/dist/components/form/textarea/textarea.mjs +1 -0
  20. package/dist/components/form/toggle/index.mjs +1 -0
  21. package/dist/components/form/toggle/toggle.mjs +1 -0
  22. package/dist/components/presentation/badge/badge.mjs +1 -0
  23. package/dist/components/presentation/badge/index.mjs +1 -0
  24. package/dist/components/presentation/card/card-body.mjs +1 -0
  25. package/dist/components/presentation/card/card-footer.mjs +1 -0
  26. package/dist/components/presentation/card/card-header.mjs +1 -0
  27. package/dist/components/presentation/card/card.mjs +1 -0
  28. package/dist/components/presentation/card/index.mjs +1 -0
  29. package/dist/components/presentation/icon/icon.mjs +1 -0
  30. package/dist/components/presentation/icon/index.mjs +1 -0
  31. package/dist/components/presentation/list/index.mjs +1 -0
  32. package/dist/components/presentation/list/list-divider.mjs +1 -0
  33. package/dist/components/presentation/list/list-item-button.mjs +1 -0
  34. package/dist/components/presentation/list/list-item-icon.mjs +1 -0
  35. package/dist/components/presentation/list/list-item-text.mjs +1 -0
  36. package/dist/components/presentation/list/list-item.mjs +1 -0
  37. package/dist/components/presentation/list/list-subheader.mjs +1 -0
  38. package/dist/components/presentation/list/list.mjs +1 -0
  39. package/dist/index.d.mts +166 -2
  40. package/dist/index.d.ts +166 -2
  41. package/dist/index.js +8 -8
  42. package/dist/index.mjs +1 -1
  43. package/dist/styles.css +1 -1
  44. package/dist/theme/config.mjs +1 -1
  45. package/dist/theme/theme-to-css-vars.mjs +1 -1
  46. package/package.json +1 -1
  47. package/dist/chunk-XCMY6VPH.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
+ `Badge`, `Button`, `Card` (with `CardHeader`, `CardBody` and `CardFooter`), `Checkbox`, `DatePicker`, `Field`, `Icon`, `Input`, `List` (with `ListDivider`, `ListItem`, `ListItemButton`, `ListItemIcon`, `ListItemText` and `ListSubheader`), `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 _={card:"_card_i47cm_1",sm:"_sm_i47cm_11",md:"_md_i47cm_16",lg:"_lg_i47cm_21",elevated:"_elevated_i47cm_26",outline:"_outline_i47cm_31",filled:"_filled_i47cm_36",header:"_header_i47cm_40",body:"_body_i47cm_41",footer:"_footer_i47cm_42"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={list:"_list_1ts57_1",sm:"_sm_1ts57_11",md:"_md_1ts57_17",lg:"_lg_1ts57_23",plain:"_plain_1ts57_29",bordered:"_bordered_1ts57_33",filled:"_filled_1ts57_40",bullet:"_bullet_1ts57_46",number:"_number_1ts57_50",item:"_item_1ts57_54",button:"_button_1ts57_66",divided:"_divided_1ts57_75",divider:"_divider_1ts57_75",selected:"_selected_1ts57_107",secondary:"_secondary_1ts57_112",icon:"_icon_1ts57_126",text:"_text_1ts57_132",primary:"_primary_1ts57_137",subheader:"_subheader_1ts57_147"};export{_ as a};
@@ -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
+ "use client";import{forwardRef as E,useEffect as P,useImperativeHandle as M,useRef as H}from"react";import{useControlLabelledBy as L}from"../field/use-control-labelled-by.mjs";var o={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 R}from"react/jsx-runtime";var T=(e,a)=>({"--checkbox-solid":`var(--plume-color-${e}-solid)`,"--checkbox-contrast":`var(--plume-color-${e}-solid-contrast)`,"--checkbox-text":`var(--plume-color-${e}-text)`,...a}),b=E(({children:e,className:a="",colorScheme:m="primary",disabled:s=!1,onChange:d,indeterminate:c=!1,readOnly:r=!1,size:k="md",style:C,variant:p="solid",...t},_)=>{let l=H(null),n=p!=="unstyled",{labelledBy:h,textId:x}=L({hasText:!!e,id:t.id,labelledBy:t["aria-labelledby"]}),y=e?"label":"span",f=t["aria-invalid"]===!0||t["aria-invalid"]==="true";M(_,()=>l.current),P(()=>{l.current&&(l.current.indeterminate=c)},[c]);let v=[n&&o.root,n&&o[k],s&&o.disabled,a].filter(Boolean).join(" "),I=n?[o.checkbox,o[p],f&&o.invalid].filter(Boolean).join(" "):void 0,S=i=>{r&&i.preventDefault()},j=i=>{r||d?.(i)};return R(y,{className:v,style:T(f?"error":m,C),children:[u("input",{"aria-readonly":r||void 0,className:I,disabled:s,onChange:d?j:void 0,onClick:S,ref:l,type:"checkbox",...t,"aria-labelledby":h}),e?u("span",{className:n?o.label:void 0,id:x,children:e}):null]})});b.displayName="Checkbox";var A=Object.assign(b,{labelsItself:!0});export{A as Checkbox};
@@ -0,0 +1 @@
1
+ import{Checkbox as p}from"./checkbox.mjs";export{p as Checkbox};
@@ -1 +1 @@
1
- "use client";import{a as t}from"../../../chunk-XCMY6VPH.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};
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};
@@ -1 +1 @@
1
- "use client";import{a as m}from"../../../chunk-XCMY6VPH.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};
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};
@@ -1,2 +1,2 @@
1
- "use client";import{a as l}from"../../../chunk-XCMY6VPH.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}
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
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};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,useContext as t}from"react";var n=e(void 0),l=()=>t(n);export{n as FieldContext,l as useFieldContext};
@@ -1 +1 @@
1
- import{Children as v,cloneElement as P,forwardRef as O,useId as T}from"react";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 I=O(({children:u,className:w="",disabled:t=!1,errorText:r,helperText:d,invalid:n=!!r,label:s,optionalText:p,orientation:y="vertical",readOnly:F=!1,required:a=!1,style:h},x)=>{let i=T(),c=v.only(u),l=c.props,_=l.id??`${i}-control`,b=`${i}-helper`,f=`${i}-error`,m=n&&!!r,N=[l["aria-describedby"],m?f:null,d?b:null].filter(Boolean).join(" ")||void 0,R=`${e.field} ${e[y]} ${t?e.disabled:""} ${w}`.trim();return j("div",{className:R,ref:x,style:h,children:[s?j("label",{className:e.label,htmlFor:_,children:[s,a?o("span",{"aria-hidden":"true",className:e.requiredIndicator,children:"*"}):null,!a&&p?o("span",{className:e.optionalText,children:p}):null]}):null,P(c,{id:_,"aria-describedby":N,"aria-invalid":n||l["aria-invalid"]||void 0,disabled:t||l.disabled,readOnly:F||l.readOnly,required:a||l.required}),d?o("p",{className:e.helperText,id:b,children:d}):null,m?o("p",{className:e.errorText,id:f,children:r}):null]})});I.displayName="Field";export{I as Field};
1
+ "use client";import{Children as T,cloneElement as O,forwardRef as C,useId as $,useMemo as q}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 d,jsxs as y}from"react/jsx-runtime";function L({children:n,htmlFor:s,id:t,optionalText:o,required:r}){return y("label",{className:e.label,htmlFor:s,id:t,children:[n,r?d("span",{"aria-hidden":"true",className:e.requiredIndicator,children:"*"}):null,!r&&o?d("span",{className:e.optionalText,children:o}):null]})}var B=C(({children:n,className:s="",disabled:t=!1,errorText:o,helperText:r,invalid:_=!!o,label:c,optionalText:h,orientation:x="vertical",readOnly:w=!1,required:m=!1,style:R},N)=>{let i=$(),p=T.only(n),l=p.props,a=l.id??`${i}-control`,b=c?`${i}-label`:void 0,u=`${i}-helper`,F=`${i}-error`,j=_&&!!o,v=[l["aria-describedby"],j?F:null,r?u:null].filter(Boolean).join(" ")||void 0,f=!!(p.type.labelsItself&&l.children),P=q(()=>({controlId:a,labelId:b,labelsItself:f}),[a,b,f]),I=`${e.field} ${e[x]} ${t?e.disabled:""} ${s}`.trim();return d(E.Provider,{value:P,children:y("div",{className:I,ref:N,style:R,children:[c?d(L,{htmlFor:f?void 0:a,id:b,optionalText:h,required:m,children:c}):null,O(p,{id:a,"aria-describedby":v,"aria-invalid":_||l["aria-invalid"]||void 0,disabled:t||l.disabled,readOnly:w||l.readOnly,required:m||l.required}),r?d("p",{className:e.helperText,id:u,children:r}):null,j?d("p",{className:e.errorText,id:F,children:o}):null]})})});B.displayName="Field";export{B as Field};
@@ -0,0 +1 @@
1
+ "use client";import{useId as i}from"react";import{useFieldContext as d}from"./field-context.mjs";function f({hasText:t,id:o,labelledBy:n}){let e=d(),l=i();return!!!(e?.labelsItself&&e.labelId&&o===e.controlId)||n?{labelledBy:n,textId:l}:{labelledBy:[e?.labelId,t?l:null].filter(Boolean).join(" "),textId:l}}export{f as useControlLabelledBy};
@@ -1,2 +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)","input-background-color":"var(--plume-surface-muted)",base:"_base_h3ylb_9",input:"_input_h3ylb_16",sm:"_sm_h3ylb_32",md:"_md_h3ylb_38",lg:"_lg_h3ylb_43",rounded:"_rounded_h3ylb_49",outline:"_outline_h3ylb_53 _input_h3ylb_16",pill:"_pill_h3ylb_53",filled:"_filled_h3ylb_62 _input_h3ylb_16",underline:"_underline_h3ylb_70 _input_h3ylb_16",invalid:"_invalid_h3ylb_80",inputGroup:"_inputGroup_h3ylb_89",disabled:"_disabled_h3ylb_101",addOn:"_addOn_h3ylb_120",element:"_element_h3ylb_176"};import{jsx as l,jsxs as H}from"react/jsx-runtime";var M=(t,r,o,n,d,_,m)=>{let s=r?e.disabled:"",p=o&&n?e.invalid:"",c=n?e[d]:"",b=n?e[_]:"",i=n?e[m]:"";return`${e.base} ${b} ${c} ${i}
2
- ${s} ${p} ${t}`.trim()},w=t=>({"--input-color":`var(--plume-color-${t}-text)`}),z=$(({addonBefore:t,addonAfter:r,elementBefore:o,elementAfter:n,style:d,className:_="",colorScheme:m="secondary",disabled:s=!1,readOnly:p=!1,shape:c="rounded",size:b="md",type:i="text",variant:v="outline",mask:h,value:y,defaultValue:f,onChange:P,...u},C)=>{let a=v!=="unstyled",I=u["aria-invalid"]===!0||u["aria-invalid"]==="true",g=M(_,s,I,a,c,b,v),S={...w(I?"error":m),...d},R=t||r||o||n,{value:O,onChange:x}=L({mask:h,value:typeof y=="string"?y:void 0,defaultValue:typeof f=="string"?f:void 0,onChange:P}),N={onChange:x,value:h?O:y,defaultValue:h?void 0:f};return R?H("div",{className:a?e.inputGroup:"",style:S,children:[t?l("span",{className:a?e.addOn:"",children:t}):null,o?l("span",{className:a?e.element:"",children:o}):null,l("input",{className:g,disabled:s,readOnly:p,ref:C,type:i,...N,...u}),r?l("span",{className:a?e.addOn:"",children:r}):null,n?l("span",{className:a?e.element:"",children:n}):null]}):l("input",{className:g,disabled:s,readOnly:p,ref:C,style:S,type:i,...N,...u})});z.displayName="Input";export{z as Input};
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 z}from"react";import{useControlLabelledBy as A}from"../field/use-control-labelled-by.mjs";import{useRadioGroupContext as N}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 b,jsxs as F}from"react/jsx-runtime";var V=(t,a)=>({"--radio-solid":`var(--plume-color-${t}-solid)`,"--radio-contrast":`var(--plume-color-${t}-solid-contrast)`,"--radio-text":`var(--plume-color-${t}-text)`,...a}),_=z(({checked:t,children:a,className:f="",colorScheme:v,defaultChecked:y,disabled:C=!1,name:g,onChange:d,readOnly:R=!1,required:s=!1,size:S,style:h,value:n,variant:P,...i},x)=>{let e=N(),p=P??e?.variant??"solid",{labelledBy:B,textId:I}=A({hasText:!!a,id:i.id,labelledBy:i["aria-labelledby"]}),E=a?"label":"span",l=p!=="unstyled",m=i["aria-invalid"]===!0||i["aria-invalid"]==="true"||!!e?.invalid,u=C||!!e?.disabled,c=R||!!e?.readOnly,M=S??e?.size??"md",L=v??e?.colorScheme??"primary",O=[l&&o.root,l&&o[M],u&&o.disabled,f].filter(Boolean).join(" "),T=l?[o.radio,o[p],m&&o.invalid].filter(Boolean).join(" "):void 0,H=r=>{c&&r.preventDefault()},k=r=>{c||(d?.(r),e?.select(String(n??""),r))},w=e?{checked:e.value===String(n??""),name:e.name,required:e.required||s}:{checked:t,defaultChecked:y,name:g,required:s};return F(E,{className:O,style:V(m?"error":L,h),children:[b("input",{className:T,disabled:u,onChange:d||e?k:void 0,onClick:H,ref:x,type:"radio",value:n,...w,...i,"aria-labelledby":B}),a?b("span",{className:l?o.label:void 0,id:I,children:a}):null]})});_.displayName="Radio";var G=Object.assign(_,{labelsItself:!0});export{G 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 P}from"react";import{useControlLabelledBy as h}from"../field/use-control-labelled-by.mjs";var o={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 I}from"react/jsx-runtime";var x=(e,i)=>({"--toggle-solid":`var(--plume-color-${e}-solid)`,"--toggle-contrast":`var(--plume-color-${e}-solid-contrast)`,"--toggle-text":`var(--plume-color-${e}-text)`,...i}),u=P(({children:e,className:i="",colorScheme:m="primary",disabled:s=!1,onChange:n,readOnly:a=!1,size:_="md",style:c,variant:d="solid",...l},b)=>{let t=d!=="unstyled",{labelledBy:f,textId:y}=h({hasText:!!e,id:l.id,labelledBy:l["aria-labelledby"]}),T=e?"label":"span",p=l["aria-invalid"]===!0||l["aria-invalid"]==="true",v=[t&&o.root,t&&o[_],s&&o.disabled,i].filter(Boolean).join(" "),C=t?[o.toggle,o[d],p&&o.invalid].filter(Boolean).join(" "):void 0,j=r=>{a&&r.preventDefault()},S=r=>{a||n?.(r)};return I(T,{className:v,style:x(p?"error":m,c),children:[g("input",{"aria-readonly":a||void 0,className:C,disabled:s,onChange:n?S:void 0,onClick:j,ref:b,role:"switch",type:"checkbox",...l,"aria-labelledby":f}),e?g("span",{className:t?o.label:void 0,id:y,children:e}):null]})});u.displayName="Toggle";var H=Object.assign(u,{labelsItself:!0});export{H as Toggle};
@@ -0,0 +1 @@
1
+ import{forwardRef as c}from"react";var l={badge:"_badge_lalgz_1",sm:"_sm_lalgz_12",md:"_md_lalgz_17",lg:"_lg_lalgz_22",rounded:"_rounded_lalgz_27",pill:"_pill_lalgz_31",solid:"_solid_lalgz_35",outline:"_outline_lalgz_40",subtle:"_subtle_lalgz_45",dotOnly:"_dotOnly_lalgz_50",dot:"_dot_lalgz_50"};import{jsx as z,jsxs as B}from"react/jsx-runtime";var S=(e,o)=>({"--badge-solid":`var(--plume-color-${e}-solid)`,"--badge-contrast":`var(--plume-color-${e}-solid-contrast)`,"--badge-text":`var(--plume-color-${e}-text)`,"--badge-tint":`var(--plume-color-${e}-tint)`,"--badge-tint-text":`var(--plume-color-${e}-tint-text)`,...o}),f=c(({children:e,className:o="",colorScheme:s="primary",dot:r=!1,role:i,shape:n="rounded",size:p="md",style:g,variant:d="solid",...a},_)=>{let t=d!=="unstyled",m=r&&!e,u=!!(a["aria-label"]??a["aria-labelledby"]),b=i??(u?"img":void 0),y=[t&&l.badge,t&&l[p],t&&l[n],t&&l[d],t&&m&&l.dotOnly,o].filter(Boolean).join(" ");return B("span",{className:y,ref:_,role:b,style:S(s,g),...a,children:[r&&t?z("span",{"aria-hidden":"true",className:l.dot}):null,e]})});f.displayName="Badge";export{f as Badge};
@@ -0,0 +1 @@
1
+ import{Badge as p}from"./badge.mjs";export{p as Badge};
@@ -0,0 +1 @@
1
+ import{a as o}from"../../../chunk-BMTPOEL3.mjs";import{forwardRef as p}from"react";import{jsx as a}from"react/jsx-runtime";var m=p(({children:t,className:e="",style:r,...d},i)=>a("div",{className:[o.body,e].filter(Boolean).join(" "),ref:i,style:r,...d,children:t}));m.displayName="CardBody";export{m as CardBody};
@@ -0,0 +1 @@
1
+ import{a as o}from"../../../chunk-BMTPOEL3.mjs";import{forwardRef as p}from"react";import{jsx as a}from"react/jsx-runtime";var m=p(({children:t,className:e="",style:r,...i},d)=>a("div",{className:[o.footer,e].filter(Boolean).join(" "),ref:d,style:r,...i,children:t}));m.displayName="CardFooter";export{m as CardFooter};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-BMTPOEL3.mjs";import{forwardRef as i}from"react";import{jsx as m}from"react/jsx-runtime";var p=i(({children:r,className:t="",style:o,...d},a)=>m("div",{className:[e.header,t].filter(Boolean).join(" "),ref:a,style:o,...d,children:r}));p.displayName="CardHeader";export{p as CardHeader};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-BMTPOEL3.mjs";import{forwardRef as p}from"react";import{jsx as C}from"react/jsx-runtime";var m=p(({children:o,className:a="",size:d="md",style:i,variant:t="elevated",...l},s)=>{let r=t!=="unstyled",n=[r&&e.card,r&&e[d],r&&e[t],a].filter(Boolean).join(" ");return C("div",{className:n,ref:s,style:i,...l,children:o})});m.displayName="Card";export{m as Card};
@@ -0,0 +1 @@
1
+ import{Card as e}from"./card.mjs";import{CardBody as p}from"./card-body.mjs";import{CardFooter as t}from"./card-footer.mjs";import{CardHeader as y}from"./card-header.mjs";export{e as Card,p as CardBody,t as CardFooter,y as CardHeader};
@@ -0,0 +1 @@
1
+ import{forwardRef as a}from"react";var t={icon:"_icon_c6d4m_1",sm:"_sm_c6d4m_18",md:"_md_c6d4m_22",lg:"_lg_c6d4m_26"};import{jsx as f}from"react/jsx-runtime";var d=(e,o)=>({...e?{"--icon-color":`var(--plume-color-${e}-text)`}:{},...o}),l=a(({children:e,className:o="",colorScheme:n,label:r,size:i="md",style:p,...s},c)=>{let m=[t.icon,t[i],o].filter(Boolean).join(" ");return f("span",{"aria-hidden":r?void 0:!0,"aria-label":r,className:m,ref:c,role:r?"img":void 0,style:d(n,p),...s,children:e})});l.displayName="Icon";export{l as Icon};
@@ -0,0 +1 @@
1
+ import{Icon as r}from"./icon.mjs";export{r as Icon};
@@ -0,0 +1 @@
1
+ import{List as o}from"./list.mjs";import{ListDivider as p}from"./list-divider.mjs";import{ListItem as i}from"./list-item.mjs";import{ListItemButton as L}from"./list-item-button.mjs";import{ListItemIcon as x}from"./list-item-icon.mjs";import{ListItemText as y}from"./list-item-text.mjs";import{ListSubheader as d}from"./list-subheader.mjs";export{o as List,p as ListDivider,i as ListItem,L as ListItemButton,x as ListItemIcon,y as ListItemText,d as ListSubheader};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-DR53VNER.mjs";import{forwardRef as s}from"react";import{jsx as p}from"react/jsx-runtime";var d=s(({className:i="",style:t,...r},o)=>p("li",{"aria-hidden":"true",className:[e.divider,i].filter(Boolean).join(" "),ref:o,style:t,...r}));d.displayName="ListDivider";export{d as ListDivider};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-DR53VNER.mjs";import{forwardRef as f}from"react";import{jsx as l}from"react/jsx-runtime";var c=f(({"aria-current":m,children:r,className:p="",disabled:t=!1,href:o,selected:n=!1,style:a,...i},s)=>{let u=[e.button,n&&e.selected,p].filter(Boolean).join(" "),d=m??(n?"true":void 0);return o!==void 0?l("a",{"aria-current":d,"aria-disabled":t||void 0,className:u,href:t?void 0:o,ref:s,role:t?"link":void 0,style:a,...i,children:r}):l("button",{"aria-current":d,className:u,disabled:t,ref:s,style:a,type:"button",...i,children:r})});c.displayName="ListItemButton";export{c as ListItemButton};
@@ -0,0 +1 @@
1
+ import{a as t}from"../../../chunk-DR53VNER.mjs";import{forwardRef as s}from"react";import{jsx as p}from"react/jsx-runtime";var m=s(({children:e,className:o="",style:r,...i},n)=>p("span",{"aria-hidden":"true",className:[t.icon,o].filter(Boolean).join(" "),ref:n,style:r,...i,children:e}));m.displayName="ListItemIcon";export{m as ListItemIcon};
@@ -0,0 +1 @@
1
+ import{a as t}from"../../../chunk-DR53VNER.mjs";import{forwardRef as d}from"react";import{jsx as r,jsxs as L}from"react/jsx-runtime";var l=d(({children:s,className:i="",primary:m,secondary:e,style:p,...n},a)=>{let o=m??s;return L("div",{className:[t.text,i].filter(Boolean).join(" "),ref:a,style:p,...n,children:[o?r("span",{className:t.primary,children:o}):null,e?r("span",{className:t.secondary,children:e}):null]})});l.displayName="ListItemText";export{l as ListItemText};
@@ -0,0 +1 @@
1
+ import{a as t}from"../../../chunk-DR53VNER.mjs";import{forwardRef as s}from"react";import{jsx as L}from"react/jsx-runtime";var p=s(({children:e,className:o="",style:i,...r},m)=>L("li",{className:[t.item,o].filter(Boolean).join(" "),ref:m,style:i,...r,children:e}));p.displayName="ListItem";export{p as ListItem};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-DR53VNER.mjs";import{forwardRef as d}from"react";import{jsx as L}from"react/jsx-runtime";var p=d(({children:t,className:r="",style:o,...i},s)=>L("li",{className:[e.subheader,r].filter(Boolean).join(" "),ref:s,style:o,...i,children:t}));p.displayName="ListSubheader";export{p as ListSubheader};
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../chunk-DR53VNER.mjs";import{forwardRef as b}from"react";import{jsx as C}from"react/jsx-runtime";var P=(t,i)=>({"--list-text":`var(--plume-color-${t}-text)`,"--list-tint":`var(--plume-color-${t}-tint)`,"--list-tint-strong":`var(--plume-color-${t}-tint-strong)`,"--list-tint-text":`var(--plume-color-${t}-tint-text)`,...i}),S=b(({as:t,children:i,className:l="",colorScheme:n="primary",divided:p,marker:o="none",role:a,size:d="md",style:m,variant:s="plain",...L},u)=>{let c=t??(o==="number"?"ol":"ul"),r=s!=="unstyled",f=p??s==="bordered",y=[r&&e.list,r&&e[s],r&&e[d],r&&e[o],r&&f&&e.divided,l].filter(Boolean).join(" ");return C(c,{className:y,ref:u,role:a??(o==="none"?"list":void 0),style:P(n,m),...L,children:i})});S.displayName="List";export{S as List};
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, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Ref, ReactElement, LiHTMLAttributes, 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;
@@ -231,6 +232,18 @@ declare function lazyLoadContent(content: ReactNode): LazyExoticComponent<() =>
231
232
  */
232
233
  declare function deepMerge<T>(target: T, ...sources: (Partial<T> | undefined)[]): T;
233
234
 
235
+ interface BadgeOwnProps {
236
+ colorScheme?: ColorScheme;
237
+ dot?: boolean;
238
+ shape?: Shape;
239
+ size?: Size;
240
+ variant?: BadgeVariant;
241
+ }
242
+ type BadgeVariant = 'solid' | 'outline' | 'subtle' | 'unstyled';
243
+ type BadgeRootAttributes = Pick<HTMLAttributes<HTMLSpanElement>, 'aria-label' | 'aria-labelledby' | 'children' | 'hidden' | 'id' | 'role' | 'title'>;
244
+ type BadgeProps = Omit<ComponentProps, 'index'> & BadgeRootAttributes & BadgeOwnProps;
245
+ declare const Badge: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & BadgeRootAttributes & BadgeOwnProps & react.RefAttributes<HTMLSpanElement>>;
246
+
234
247
  interface ButtonOwnProps {
235
248
  busyText?: string;
236
249
  colorScheme?: ColorScheme;
@@ -247,6 +260,41 @@ type ButtonRootAttributes = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-
247
260
  type ButtonProps = ComponentProps & ButtonRootAttributes & ButtonOwnProps;
248
261
  declare const Button: react.ForwardRefExoticComponent<ComponentProps & ButtonRootAttributes & ButtonOwnProps & react.RefAttributes<HTMLButtonElement>>;
249
262
 
263
+ interface CardOwnProps {
264
+ size?: Size;
265
+ variant?: CardVariant;
266
+ }
267
+ type CardVariant = 'elevated' | 'outline' | 'filled' | 'unstyled';
268
+ type CardRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'children' | 'hidden' | 'id' | 'role' | 'title'>;
269
+ type CardProps = Omit<ComponentProps, 'index'> & CardRootAttributes & CardOwnProps;
270
+ declare const Card: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CardRootAttributes & CardOwnProps & react.RefAttributes<HTMLDivElement>>;
271
+
272
+ type CardBodyRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'children' | 'hidden' | 'id' | 'title'>;
273
+ type CardBodyProps = Omit<ComponentProps, 'index'> & CardBodyRootAttributes;
274
+ declare const CardBody: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CardBodyRootAttributes & react.RefAttributes<HTMLDivElement>>;
275
+
276
+ type CardFooterRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'children' | 'hidden' | 'id' | 'title'>;
277
+ type CardFooterProps = Omit<ComponentProps, 'index'> & CardFooterRootAttributes;
278
+ declare const CardFooter: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CardFooterRootAttributes & react.RefAttributes<HTMLDivElement>>;
279
+
280
+ type CardHeaderRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'children' | 'hidden' | 'id' | 'title'>;
281
+ type CardHeaderProps = Omit<ComponentProps, 'index'> & CardHeaderRootAttributes;
282
+ declare const CardHeader: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CardHeaderRootAttributes & react.RefAttributes<HTMLDivElement>>;
283
+
284
+ interface CheckboxOwnProps {
285
+ colorScheme?: ColorScheme;
286
+ indeterminate?: boolean;
287
+ readOnly?: boolean;
288
+ size?: Size;
289
+ variant?: CheckboxVariant;
290
+ }
291
+ type CheckboxVariant = 'solid' | 'outline' | 'unstyled';
292
+ type CheckboxRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
293
+ type CheckboxProps = Omit<ComponentProps, 'index'> & CheckboxRootAttributes & CheckboxOwnProps;
294
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & CheckboxRootAttributes & CheckboxOwnProps & react.RefAttributes<HTMLInputElement>> & {
295
+ labelsItself: boolean;
296
+ };
297
+
250
298
  interface DatePickerOwnProps {
251
299
  colorScheme?: ColorScheme;
252
300
  config?: DatePickerConfig;
@@ -296,6 +344,7 @@ type FieldOrientation = 'vertical' | 'horizontal';
296
344
  interface FieldControlProps {
297
345
  'aria-describedby'?: string;
298
346
  'aria-invalid'?: boolean | 'true' | 'false';
347
+ children?: ReactNode;
299
348
  disabled?: boolean;
300
349
  id?: string;
301
350
  readOnly?: boolean;
@@ -307,6 +356,15 @@ type FieldRootAttributes = {
307
356
  type FieldProps = Omit<ComponentProps, 'index'> & FieldRootAttributes & FieldOwnProps;
308
357
  declare const Field: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & FieldRootAttributes & FieldOwnProps & react.RefAttributes<HTMLDivElement>>;
309
358
 
359
+ interface IconOwnProps {
360
+ colorScheme?: ColorScheme;
361
+ label?: string;
362
+ size?: Size;
363
+ }
364
+ type IconRootAttributes = Pick<HTMLAttributes<HTMLSpanElement>, 'children' | 'hidden' | 'id' | 'title'>;
365
+ type IconProps = Omit<ComponentProps, 'index'> & IconRootAttributes & IconOwnProps;
366
+ declare const Icon: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & IconRootAttributes & IconOwnProps & react.RefAttributes<HTMLSpanElement>>;
367
+
310
368
  interface InputOwnProps {
311
369
  addonBefore?: ReactNode;
312
370
  addonAfter?: ReactNode;
@@ -323,6 +381,86 @@ type InputVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
323
381
  type InputProps = ComponentProps & InputRootAttributes & InputOwnProps;
324
382
  declare const Input: react.ForwardRefExoticComponent<ComponentProps & InputRootAttributes & InputOwnProps & react.RefAttributes<HTMLInputElement>>;
325
383
 
384
+ interface ListOwnProps {
385
+ as?: 'ul' | 'ol';
386
+ colorScheme?: ColorScheme;
387
+ divided?: boolean;
388
+ marker?: ListMarker;
389
+ size?: Size;
390
+ variant?: ListVariant;
391
+ }
392
+ type ListVariant = 'plain' | 'bordered' | 'filled' | 'unstyled';
393
+ type ListMarker = 'none' | 'bullet' | 'number';
394
+ type ListRootAttributes = Pick<HTMLAttributes<HTMLUListElement>, 'aria-label' | 'aria-labelledby' | 'children' | 'hidden' | 'id' | 'role' | 'title'>;
395
+ type ListProps = Omit<ComponentProps, 'index'> & ListRootAttributes & ListOwnProps;
396
+ declare const List: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListRootAttributes & ListOwnProps & react.RefAttributes<HTMLUListElement>>;
397
+
398
+ type ListDividerRootAttributes = Pick<LiHTMLAttributes<HTMLLIElement>, 'hidden' | 'id'>;
399
+ type ListDividerProps = Omit<ComponentProps, 'index'> & ListDividerRootAttributes;
400
+ declare const ListDivider: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListDividerRootAttributes & react.RefAttributes<HTMLLIElement>>;
401
+
402
+ type ListItemRootAttributes = Pick<LiHTMLAttributes<HTMLLIElement>, 'children' | 'hidden' | 'id' | 'title' | 'value'>;
403
+ type ListItemProps = Omit<ComponentProps, 'index'> & ListItemRootAttributes;
404
+ declare const ListItem: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListItemRootAttributes & react.RefAttributes<HTMLLIElement>>;
405
+
406
+ interface ListItemButtonOwnProps {
407
+ disabled?: boolean;
408
+ href?: string;
409
+ rel?: string;
410
+ selected?: boolean;
411
+ target?: string;
412
+ }
413
+ type ListItemButtonRootAttributes = Pick<HTMLAttributes<HTMLElement>, 'aria-controls' | 'aria-current' | 'aria-describedby' | 'aria-expanded' | 'aria-haspopup' | 'aria-label' | 'aria-labelledby' | 'children' | 'hidden' | 'id' | 'onBlur' | 'onClick' | 'onFocus' | 'onKeyDown' | 'tabIndex' | 'title'>;
414
+ type ListItemButtonProps = Omit<ComponentProps, 'index'> & ListItemButtonRootAttributes & ListItemButtonOwnProps;
415
+ declare const ListItemButton: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListItemButtonRootAttributes & ListItemButtonOwnProps & react.RefAttributes<HTMLElement>>;
416
+
417
+ type ListItemIconRootAttributes = Pick<HTMLAttributes<HTMLSpanElement>, 'children' | 'hidden' | 'id'>;
418
+ type ListItemIconProps = Omit<ComponentProps, 'index'> & ListItemIconRootAttributes;
419
+ declare const ListItemIcon: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListItemIconRootAttributes & react.RefAttributes<HTMLSpanElement>>;
420
+
421
+ interface ListItemTextOwnProps {
422
+ primary?: ReactNode;
423
+ secondary?: ReactNode;
424
+ }
425
+ type ListItemTextRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'children' | 'hidden' | 'id'>;
426
+ type ListItemTextProps = Omit<ComponentProps, 'index'> & ListItemTextRootAttributes & ListItemTextOwnProps;
427
+ declare const ListItemText: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListItemTextRootAttributes & ListItemTextOwnProps & react.RefAttributes<HTMLDivElement>>;
428
+
429
+ type ListSubheaderRootAttributes = Pick<LiHTMLAttributes<HTMLLIElement>, 'children' | 'hidden' | 'id'>;
430
+ type ListSubheaderProps = Omit<ComponentProps, 'index'> & ListSubheaderRootAttributes;
431
+ declare const ListSubheader: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ListSubheaderRootAttributes & react.RefAttributes<HTMLLIElement>>;
432
+
433
+ interface RadioOwnProps {
434
+ colorScheme?: ColorScheme;
435
+ readOnly?: boolean;
436
+ size?: Size;
437
+ variant?: RadioVariant;
438
+ }
439
+ type RadioVariant = 'solid' | 'outline' | 'unstyled';
440
+ type RadioRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
441
+ type RadioProps = Omit<ComponentProps, 'index'> & RadioRootAttributes & RadioOwnProps;
442
+ declare const Radio: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioRootAttributes & RadioOwnProps & react.RefAttributes<HTMLInputElement>> & {
443
+ labelsItself: boolean;
444
+ };
445
+
446
+ interface RadioGroupOwnProps {
447
+ colorScheme?: ColorScheme;
448
+ defaultValue?: string;
449
+ disabled?: boolean;
450
+ name?: string;
451
+ onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
452
+ orientation?: RadioGroupOrientation;
453
+ readOnly?: boolean;
454
+ required?: boolean;
455
+ size?: Size;
456
+ value?: string;
457
+ variant?: RadioVariant;
458
+ }
459
+ type RadioGroupOrientation = 'vertical' | 'horizontal';
460
+ type RadioGroupRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'children' | 'id'>;
461
+ type RadioGroupProps = Omit<ComponentProps, 'index'> & RadioGroupRootAttributes & RadioGroupOwnProps;
462
+ declare const RadioGroup: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & RadioGroupRootAttributes & RadioGroupOwnProps & react.RefAttributes<HTMLDivElement>>;
463
+
326
464
  interface SpinnerOwnProps {
327
465
  color?: ColorShade;
328
466
  size?: Size;
@@ -371,4 +509,30 @@ declare const TabPanels: react.ForwardRefExoticComponent<TabPanelsProps & react.
371
509
  type TabPanelProps = Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & Pick<ComponentProps, 'index'>;
372
510
  declare const TabPanel: react.ForwardRefExoticComponent<Pick<HTMLAttributes<HTMLDivElement>, "children" | "className"> & Pick<ComponentProps, "index"> & react.RefAttributes<HTMLDivElement>>;
373
511
 
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 };
512
+ interface TextareaOwnProps {
513
+ colorScheme?: ColorScheme;
514
+ resize?: TextareaResize;
515
+ shape?: Shape;
516
+ size?: Size;
517
+ variant?: TextareaVariant;
518
+ }
519
+ type TextareaVariant = 'outline' | 'filled' | 'underline' | 'unstyled';
520
+ type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
521
+ 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'>;
522
+ type TextareaProps = Omit<ComponentProps, 'index'> & TextareaRootAttributes & TextareaOwnProps;
523
+ declare const Textarea: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TextareaRootAttributes & TextareaOwnProps & react.RefAttributes<HTMLTextAreaElement>>;
524
+
525
+ interface ToggleOwnProps {
526
+ colorScheme?: ColorScheme;
527
+ readOnly?: boolean;
528
+ size?: Size;
529
+ variant?: ToggleVariant;
530
+ }
531
+ type ToggleVariant = 'solid' | 'outline' | 'raised' | 'unstyled';
532
+ type ToggleRootAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby' | 'checked' | 'children' | 'defaultChecked' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'required' | 'value'>;
533
+ type ToggleProps = Omit<ComponentProps, 'index'> & ToggleRootAttributes & ToggleOwnProps;
534
+ declare const Toggle: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & ToggleRootAttributes & ToggleOwnProps & react.RefAttributes<HTMLInputElement>> & {
535
+ labelsItself: boolean;
536
+ };
537
+
538
+ export { Badge, type BadgeProps, type Breakpoints, Button, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, 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, Icon, type IconProps, Input, type InputProps, type LazyLoadedComponent, type LineHeights, List, ListDivider, type ListDividerProps, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, 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 };