plume-ui-react 0.8.0 → 0.10.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 (72) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-4HSNVSFY.mjs +1 -0
  3. package/dist/chunk-4RTWLIQ6.mjs +1 -0
  4. package/dist/chunk-6EES7OVH.mjs +1 -0
  5. package/dist/chunk-AUNT6PUD.mjs +1 -0
  6. package/dist/chunk-H4KFRPQR.mjs +1 -0
  7. package/dist/chunk-OQEOAZF3.mjs +1 -0
  8. package/dist/chunk-T34B4PAZ.mjs +1 -0
  9. package/dist/chunk-TLZRYQKI.mjs +1 -0
  10. package/dist/chunk-YXXQZOHK.mjs +1 -0
  11. package/dist/components/form/datepicker/calendar.mjs +1 -1
  12. package/dist/components/form/datepicker/datepicker-input.mjs +1 -1
  13. package/dist/components/form/datepicker/datepicker.mjs +2 -2
  14. package/dist/components/form/rating/rating.mjs +1 -1
  15. package/dist/components/form/select/select-content.mjs +1 -1
  16. package/dist/components/form/select/select-group.mjs +1 -1
  17. package/dist/components/form/select/select-option.mjs +1 -1
  18. package/dist/components/form/select/select-trigger.mjs +1 -1
  19. package/dist/components/form/select/select-value.mjs +1 -1
  20. package/dist/components/form/textarea/textarea-counter.mjs +1 -0
  21. package/dist/components/form/textarea/textarea.mjs +1 -1
  22. package/dist/components/interaction/dropdown/dropdown-item.mjs +1 -1
  23. package/dist/components/interaction/dropdown/dropdown-label.mjs +1 -1
  24. package/dist/components/interaction/dropdown/dropdown-menu.mjs +1 -1
  25. package/dist/components/interaction/dropdown/dropdown-separator.mjs +1 -1
  26. package/dist/components/navigation/breadcrumb/breadcrumb-context.mjs +1 -0
  27. package/dist/components/navigation/breadcrumb/breadcrumb-item.mjs +1 -0
  28. package/dist/components/navigation/breadcrumb/breadcrumb-link.mjs +1 -0
  29. package/dist/components/navigation/breadcrumb/breadcrumb-separator.mjs +1 -0
  30. package/dist/components/navigation/breadcrumb/breadcrumb.mjs +1 -0
  31. package/dist/components/navigation/breadcrumb/index.mjs +1 -0
  32. package/dist/components/navigation/navbar/index.mjs +1 -0
  33. package/dist/components/navigation/navbar/navbar-brand.mjs +1 -0
  34. package/dist/components/navigation/navbar/navbar-content.mjs +1 -0
  35. package/dist/components/navigation/navbar/navbar-context.mjs +1 -0
  36. package/dist/components/navigation/navbar/navbar-item.mjs +1 -0
  37. package/dist/components/navigation/navbar/navbar-toggle.mjs +1 -0
  38. package/dist/components/navigation/navbar/navbar.mjs +1 -0
  39. package/dist/components/navigation/shared/nav-link.mjs +1 -0
  40. package/dist/components/navigation/sidebar/index.mjs +1 -0
  41. package/dist/components/navigation/sidebar/sidebar-content.mjs +1 -0
  42. package/dist/components/navigation/sidebar/sidebar-context.mjs +1 -0
  43. package/dist/components/navigation/sidebar/sidebar-item.mjs +1 -0
  44. package/dist/components/navigation/sidebar/sidebar-provider.mjs +1 -0
  45. package/dist/components/navigation/sidebar/sidebar-toggle.mjs +1 -0
  46. package/dist/components/navigation/sidebar/sidebar.mjs +1 -0
  47. package/dist/components/navigation/stepper/index.mjs +1 -0
  48. package/dist/components/navigation/stepper/step-description.mjs +1 -0
  49. package/dist/components/navigation/stepper/step-indicator.mjs +1 -0
  50. package/dist/components/navigation/stepper/step-separator.mjs +1 -0
  51. package/dist/components/navigation/stepper/step-title.mjs +1 -0
  52. package/dist/components/navigation/stepper/step.mjs +1 -0
  53. package/dist/components/navigation/stepper/stepper-context.mjs +1 -0
  54. package/dist/components/navigation/stepper/stepper.mjs +1 -0
  55. package/dist/components/overlay/popover/popover-close.mjs +1 -1
  56. package/dist/components/overlay/popover/popover-content.mjs +1 -1
  57. package/dist/components/presentation/chip/chip.mjs +1 -1
  58. package/dist/index.d.mts +175 -3
  59. package/dist/index.d.ts +175 -3
  60. package/dist/index.js +5 -5
  61. package/dist/index.mjs +1 -1
  62. package/dist/overlay/icons.mjs +1 -1
  63. package/dist/overlay/position.mjs +1 -1
  64. package/dist/overlay/use-media-query.mjs +1 -0
  65. package/dist/overlay/use-position.mjs +1 -1
  66. package/dist/overlay/visually-hidden.mjs +1 -0
  67. package/dist/styles.css +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-JMACSFO3.mjs +0 -1
  70. package/dist/chunk-LFT6MZ6P.mjs +0 -1
  71. package/dist/chunk-MREJ5C76.mjs +0 -1
  72. package/dist/chunk-V7QXMR67.mjs +0 -1
package/README.md CHANGED
@@ -38,7 +38,7 @@ export function App() {
38
38
 
39
39
  ## Components
40
40
 
41
- `Accordion` (with `AccordionContent`, `AccordionItem` and `AccordionTrigger`), `Badge`, `Button`, `Card` (with `CardHeader`, `CardBody` and `CardFooter`), `Checkbox`, `Chip`, `DatePicker`, `Dropdown` (with `DropdownItem`, `DropdownLabel`, `DropdownMenu`, `DropdownSeparator` and `DropdownTrigger`), `Field`, `Icon`, `Input`, `List` (with `ListDivider`, `ListItem`, `ListItemButton`, `ListItemIcon`, `ListItemText` and `ListSubheader`), `Modal` (with `ModalBody`, `ModalClose`, `ModalContent`, `ModalFooter`, `ModalHeader` and `ModalTrigger`), `NumberInput`, `PinInput`, `Popover` (with `PopoverClose`, `PopoverContent` and `PopoverTrigger`), `ProgressBar`, `Radio`, `RadioGroup`, `Rating`, `Select` (with `SelectContent`, `SelectGroup`, `SelectOption`, `SelectTrigger` and `SelectValue`), `Skeleton`, `Spinner`, `Tabs` (with `TabList`, `Tab`, `TabPanels` and `TabPanel`), `Textarea`, `ToastProvider` (with the `useToast` hook), `Toggle` and `Tooltip`.
41
+ `Accordion` (with `AccordionContent`, `AccordionItem` and `AccordionTrigger`), `Badge`, `Breadcrumb` (with `BreadcrumbItem`, `BreadcrumbLink` and `BreadcrumbSeparator`), `Button`, `Card` (with `CardHeader`, `CardBody` and `CardFooter`), `Checkbox`, `Chip`, `DatePicker`, `Dropdown` (with `DropdownItem`, `DropdownLabel`, `DropdownMenu`, `DropdownSeparator` and `DropdownTrigger`), `Field`, `Icon`, `Input`, `List` (with `ListDivider`, `ListItem`, `ListItemButton`, `ListItemIcon`, `ListItemText` and `ListSubheader`), `Modal` (with `ModalBody`, `ModalClose`, `ModalContent`, `ModalFooter`, `ModalHeader` and `ModalTrigger`), `Navbar` (with `NavbarBrand`, `NavbarContent`, `NavbarItem` and `NavbarToggle`), `NumberInput`, `PinInput`, `Popover` (with `PopoverClose`, `PopoverContent` and `PopoverTrigger`), `ProgressBar`, `Radio`, `RadioGroup`, `Rating`, `Select` (with `SelectContent`, `SelectGroup`, `SelectOption`, `SelectTrigger` and `SelectValue`), `Sidebar` (with `SidebarContent`, `SidebarItem`, `SidebarProvider` and `SidebarToggle`), `Skeleton`, `Spinner`, `Stepper` (with `Step`, `StepDescription`, `StepIndicator`, `StepSeparator` and `StepTitle`), `Tabs` (with `TabList`, `Tab`, `TabPanels` and `TabPanel`), `Textarea`, `ToastProvider` (with the `useToast` hook), `Toggle` and `Tooltip`.
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 _={breadcrumb:"_breadcrumb_1491k_20",sm:"_sm_1491k_26",md:"_md_1491k_32",lg:"_lg_1491k_38",list:"_list_1491k_44",separator:"_separator_1491k_48",link:"_link_1491k_53",filled:"_filled_1491k_69"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={content:"_content_9g2wy_21",sm:"_sm_9g2wy_35",md:"_md_9g2wy_39",lg:"_lg_9g2wy_43",elevated:"_elevated_9g2wy_47",outline:"_outline_9g2wy_51",close:"_close_9g2wy_55","content-in":"_content-in_9g2wy_1"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={navbar:"_navbar_1i47e_128",sm:"_sm_1i47e_136",md:"_md_1i47e_142",lg:"_lg_1i47e_148",plain:"_plain_1i47e_154",filled:"_filled_1i47e_159",solid:"_solid_1i47e_163",brand:"_brand_1i47e_168",content:"_content_1i47e_175",item:"_item_1i47e_179",toggle:"_toggle_1i47e_218"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={sidebar:"_sidebar_1jkcr_268",sm:"_sm_1jkcr_274",md:"_md_1jkcr_280",lg:"_lg_1jkcr_286",plain:"_plain_1jkcr_292",filled:"_filled_1jkcr_302",solid:"_solid_1jkcr_306",item:"_item_1jkcr_311",toggle:"_toggle_1jkcr_321",backdrop:"_backdrop_1jkcr_325",content:"_content_1jkcr_329",icon:"_icon_1jkcr_355"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={"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_650is_6",textarea:"_textarea_650is_13",sm:"_sm_650is_28",md:"_md_650is_33",lg:"_lg_650is_37",rounded:"_rounded_650is_42",outline:"_outline_650is_46 _textarea_650is_13",pill:"_pill_650is_46",filled:"_filled_650is_55 _textarea_650is_13",underline:"_underline_650is_63 _textarea_650is_13",none:"_none_650is_69",vertical:"_vertical_650is_73",horizontal:"_horizontal_650is_77",both:"_both_650is_81",invalid:"_invalid_650is_89",disabled:"_disabled_650is_109",count:"_count_650is_124"};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_922qz_9",datePickerInputText:"_datePickerInputText_922qz_13",inputButton:"_inputButton_922qz_29",inputButtonIcon:"_inputButtonIcon_922qz_45",sm:"_sm_922qz_51",md:"_md_922qz_57",lg:"_lg_922qz_62",rounded:"_rounded_922qz_86",outline:"_outline_922qz_90 _datePickerInputText_922qz_13",pill:"_pill_922qz_90",filled:"_filled_922qz_99 _datePickerInputText_922qz_13",underline:"_underline_922qz_107 _datePickerInputText_922qz_13",invalid:"_invalid_922qz_117",datePickerModal:"_datePickerModal_922qz_141",calendarContainer:"_calendarContainer_922qz_160",calendarContainerDouble:"_calendarContainerDouble_922qz_165",calendar:"_calendar_922qz_160",calendarHeader:"_calendarHeader_922qz_182",day:"_day_922qz_189",year:"_year_922qz_190",month:"_month_922qz_191",monthYearSelectors:"_monthYearSelectors_922qz_192",monthSelector:"_monthSelector_922qz_229",yearSelector:"_yearSelector_922qz_230",yearSelectorGrid:"_yearSelectorGrid_922qz_234",selected:"_selected_922qz_248",monthSelectorGrid:"_monthSelectorGrid_922qz_258",daysOfWeek:"_daysOfWeek_922qz_264",dayOfWeek:"_dayOfWeek_922qz_271",calendarGrid:"_calendarGrid_922qz_280",today:"_today_922qz_297",rangeItem:"_rangeItem_922qz_301",selectedHover:"_selectedHover_922qz_311",hovered:"_hovered_922qz_316",disabledDay:"_disabledDay_922qz_320",outOfRangeDay:"_outOfRangeDay_922qz_325",footerActions:"_footerActions_922qz_329",footerButton:"_footerButton_922qz_336",footerButtonApply:"_footerButtonApply_922qz_340",disabled:"_disabled_922qz_320"};export{e as a};
@@ -0,0 +1 @@
1
+ var _={stepper:"_stepper_mo2qt_109",sm:"_sm_mo2qt_115",md:"_md_mo2qt_120",lg:"_lg_mo2qt_125",step:"_step_mo2qt_109",indicator:"_indicator_mo2qt_142",solid:"_solid_mo2qt_154",outline:"_outline_mo2qt_170",title:"_title_mo2qt_185",description:"_description_mo2qt_193",separator:"_separator_mo2qt_198"};export{_ as a};
@@ -0,0 +1 @@
1
+ var _={menu:"_menu_47da1_28",sm:"_sm_47da1_44",md:"_md_47da1_48",lg:"_lg_47da1_52",elevated:"_elevated_47da1_56",outline:"_outline_47da1_60",item:"_item_47da1_64",icon:"_icon_47da1_111",label:"_label_47da1_116",shortcut:"_shortcut_47da1_121",separator:"_separator_47da1_128",groupLabel:"_groupLabel_47da1_136","menu-in":"_menu-in_47da1_1"};export{_ as a};
@@ -0,0 +1 @@
1
+ var l={"select-border-color":"var(--plume-border-strong)","select-background-color":"var(--plume-surface-muted)",control:"_control_lfo2l_76",sm:"_sm_lfo2l_88",lg:"_lg_lfo2l_93",outline:"_outline_lfo2l_98",filled:"_filled_lfo2l_102",underline:"_underline_lfo2l_109",pill:"_pill_lfo2l_114",disabled:"_disabled_lfo2l_118",invalid:"_invalid_lfo2l_133",field:"_field_lfo2l_142",trigger:"_trigger_lfo2l_157",chevron:"_chevron_lfo2l_167",clear:"_clear_lfo2l_181",placeholder:"_placeholder_lfo2l_201",value:"_value_lfo2l_208",valueIcon:"_valueIcon_lfo2l_215",optionIcon:"_optionIcon_lfo2l_216",valueText:"_valueText_lfo2l_231",panel:"_panel_lfo2l_237",search:"_search_lfo2l_259",searchInput:"_searchInput_lfo2l_264",list:"_list_lfo2l_284",option:"_option_lfo2l_216",optionBody:"_optionBody_lfo2l_315",description:"_description_lfo2l_322",check:"_check_lfo2l_328",group:"_group_lfo2l_335",groupLabel:"_groupLabel_lfo2l_339",empty:"_empty_lfo2l_346","panel-in":"_panel-in_lfo2l_1"};export{l as a};
@@ -1 +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};
1
+ "use client";import{a as t}from"../../../chunk-OQEOAZF3.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-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
+ "use client";import{a as m}from"../../../chunk-OQEOAZF3.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-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
+ "use client";import{a as l}from"../../../chunk-OQEOAZF3.mjs";import{forwardRef as ie,useCallback as ce,useEffect as L,useRef as de,useReducer as pe,useState as w}from"react";import{getDateFormatByLanguage as ue}from"../../../utils/dates.mjs";import{Button as I}from"../../interaction/button/index.mjs";import{useClickOutside as me}from"../../../hooks/use-click-outside.mjs";import{usePosition as De}from"../../../overlay/use-position.mjs";import{DatePickerContext as ye}from"./use-datepicker.mjs";import{DEFAULT_DATE_PICKER_VALUE as fe,DATE_PICKER_INITIAL_STATE as H,datePickerReducer as Y}from"./datepicker-reducer.mjs";import{Calendar as B}from"./calendar.mjs";import{DatePickerInput as Ee}from"./datepicker-input.mjs";import{jsx as y,jsxs as A}from"react/jsx-runtime";var he="en",U={apply:"Apply",cancel:"Cancel"},ve=(n,p)=>({"--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)`,...p??{}});function ge({colorScheme:n,labels:{cancel:p,apply:f},onApply:s,onCancel:u}){return A("div",{className:l.footerActions,children:[y(I,{className:l.footerButton,label:p,onClick:u,variant:"ghost"}),y(I,{className:l.footerButtonApply,colorScheme:n,label:f,onClick:s})]})}var be=(n,p,f,s,u,m)=>{let v=m&&(m!=="md"||s==="unstyled")?l[m]:"",g=u&&(u!=="rounded"||s==="unstyled")?l[u]:"",k=s!=="unstyled"?l[s]:"",E=p?l.disabled:"",b=f&&s!=="unstyled"?l.invalid:"";return`${v} ${g} ${k}
2
+ ${E} ${b} ${n}`.trim()},Pe=ie(({onChange:n,onBlur:p,inputRef:f,displayFormat:s,style:u,showFooter:m,minDate:v,maxDate:g,placeholder:k,value:E,disabled:b=!1,className:G="",colorScheme:O="secondary",variant:T="outline",config:M,isCalendar:D=!1,isRange:i=!1,...P},h)=>{let S=M?.language??he,q={apply:M?.footer?.apply??U.apply,cancel:M?.footer?.cancel??U.cancel},[t,o]=pe(Y,E,e=>e?Y(H,{type:"SET_VALUE",payload:e}):H),R=de(!0),d=me({callback:()=>{o({type:"CLOSE_MODAL"})}}),[z,K]=w(null),[J,Q]=w(null),W=ce(e=>{d.current=e,K(e),typeof h=="function"?h(e):h&&(h.current=e)},[h,d]),F=De({anchor:z,enabled:!D&&t.modalOpen,floating:J,offset:8,placement:"bottom-start"}),{size:X=T!=="unstyled"?"md":void 0,shape:Z=T!=="unstyled"?"rounded":void 0}=P,j=be(G,b,P["aria-invalid"]===!0||P["aria-invalid"]==="true",T,Z,X);L(()=>{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]),L(()=>{if(R.current){R.current=!1;return}o({type:"SET_VALUE",payload:E??fe})},[E]),L(()=>{t.modalOpen&&d.current?.querySelector('[role="dialog"] [data-date][tabindex="0"]')?.focus()},[t.modalOpen,d]);let ee=()=>{o({type:"TOGGLE_MODAL"})},_=()=>{D||(o({type:"CLOSE_MODAL"}),d.current?.querySelector("input")?.focus())};L(()=>{if(!t.modalOpen||D)return;let e=a=>{a.key!=="Escape"||!d.current?.contains(a.target)||(o({type:"CLOSE_MODAL"}),d.current.querySelector("input")?.focus())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t.modalOpen,D,d]);let te=e=>{let a=e.relatedTarget;a&&!e.currentTarget.contains(a)&&o({type:"CLOSE_MODAL"})},C=(e,a)=>e*12+a,N=(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})},V=(e,a)=>{let c=C(e,a);N(c,Math.max(C(t.secondYear,t.secondMonth),c+1))},x=(e,a)=>{let c=C(e,a);N(Math.min(C(t.year,t.month),c-1),c)},ae=e=>{V(e,t.month)},oe=e=>{V(t.year,e)},ne=e=>{x(e,t.secondMonth)},re=e=>{x(t.secondYear,e)},le=()=>{o({type:"SET_VALUE",payload:t.tempValue}),t.tempValue.startDate&&n({startDate:t.tempValue.startDate,endDate:t.tempValue.endDate}),_()},$=(e,a)=>{let c=new Date(a?t.secondYear:t.year,a?t.secondMonth:t.month,e),r={...t.tempValue};m||!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}),!m&&(!i||r.endDate)&&(n({startDate:r.startDate,endDate:r.endDate}),o({type:"SET_VALUE",payload:r}),_())},se=()=>{let e=s??ue(S);return i?`${e} - ${e}`:e};return y(ye.Provider,{value:{state:t,dispatch:o},children:A("div",{className:l.datePicker,onBlur:te,ref:W,style:ve(O,u),children:[!D&&y(Ee,{className:j,disabled:b,displayFormat:s,inputRef:f,isRange:i,language:S,onBlur:p,onClick:ee,placeholder:k??se(),...P}),D||t.modalOpen?A("div",{"aria-label":"Calendar",className:l.datePickerModal,ref:Q,role:"dialog",style:D?void 0:{...F.style,margin:0,opacity:F.isPositioned?void 0:0},children:[A("div",{className:i?l.calendarContainerDouble:l.calendarContainer,children:[y(B,{isRange:i,language:S,maxDate:g,minDate:v,onMonthChange:oe,onSelectDate:$,onYearChange:ae}),i?y(B,{isRange:i,isSecondCalendar:!0,language:S,maxDate:g,minDate:v,onMonthChange:re,onSelectDate:$,onYearChange:ne}):null]}),m?y(ge,{colorScheme:O,labels:q,onApply:le,onCancel:_}):null]}):null]})})});Pe.displayName="DatePicker";export{Pe as DatePicker};
@@ -1 +1 @@
1
- "use client";import{a as l}from"../../../chunk-SMKRX752.mjs";import{forwardRef as B,useId as K}from"react";import{joinClasses as j}from"../../../overlay/class-names.mjs";import{useFieldContext as G}from"../field/field-context.mjs";import{StarIcon as I}from"./rating-icons.mjs";import{itemState as w,RatingItem as C}from"./rating-item.mjs";import{useRating as J}from"./use-rating.mjs";import{jsx as i,jsxs as Z}from"react/jsx-runtime";var Q=(e,o,d)=>{if(e)return o===d?"end":"start"},U=e=>`${e} ${e===1?"star":"stars"}`,W=(e,o)=>`${e} out of ${o}`,X={border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:1},Y=B(({allowHalf:e=!1,className:o,classNames:d,clearable:p=!1,colorScheme:L="warning",defaultValue:N,disabled:u=!1,emptyIcon:k,getItemLabel:V=U,icon:f,max:m=5,name:O,onValueChange:x,readOnly:b=!1,readOnlyLabel:H=W,required:M=!1,size:T="md",style:A,value:E,variant:F="solid",...s},g)=>{let y=G(),$=K(),t=J({allowHalf:e,defaultValue:N,max:m,onValueChange:x,value:E}),n=F!=="unstyled",z=y?.controlId===s.id?y?.labelId:void 0,D=s["aria-labelledby"]??(s["aria-label"]?void 0:z),R=f??i(I,{filled:!0}),v=k??f??i(I,{filled:!1}),q=e?.5:1,S=[...new Array(m).keys()].map(a=>a+1),P=j(n&&l.rating,n&&l[T],n&&!b&&!u&&l.interactive,n&&u&&l.disabled,o),h={"--rating-solid":`var(--plume-color-${L}-solid)`,"--rating-empty":"var(--plume-border-strong)",...A};return b?Z("span",{className:P,"data-plume-rating":"",ref:g,style:h,...s,"aria-invalid":void 0,"aria-label":void 0,"aria-labelledby":void 0,children:[i("span",{style:X,children:H(t.value,m)}),S.map(a=>i(C,{classNames:d,emptyIcon:v,icon:R,isStyled:n,state:w(a,t.value)},a))]}):i("fieldset",{...s,"aria-labelledby":D,"aria-required":M||void 0,className:P,"data-plume-rating":"",disabled:u,onPointerLeave:()=>t.setHover(void 0),ref:g,role:"radiogroup",style:h,children:S.map(a=>i(C,{classNames:d,emptyIcon:v,icon:R,isStyled:n,state:w(a,t.preview),children:(e?[a-q,a]:[a]).map(r=>i("input",{"aria-label":V(r,m),checked:t.value===r,className:n?l.radio:void 0,"data-half":Q(e,r,a),"data-plume-rating-radio":"",name:O??$,onChange:()=>t.setValue(r),onClick:()=>{p&&t.value===r&&t.setValue(0)},onKeyDown:c=>{p&&(c.key==="Backspace"||c.key==="Delete")&&(c.preventDefault(),t.setValue(0))},onPointerEnter:()=>t.setHover(r),type:"radio",value:r},r))},a))})});Y.displayName="Rating";export{Y as Rating};
1
+ "use client";import{a as i}from"../../../chunk-SMKRX752.mjs";import{forwardRef as B,useId as K}from"react";import{joinClasses as j}from"../../../overlay/class-names.mjs";import{visuallyHidden as G}from"../../../overlay/visually-hidden.mjs";import{useFieldContext as J}from"../field/field-context.mjs";import{StarIcon as L}from"./rating-icons.mjs";import{itemState as C,RatingItem as N}from"./rating-item.mjs";import{useRating as Q}from"./use-rating.mjs";import{jsx as l,jsxs as Z}from"react/jsx-runtime";var U=(e,o,d)=>{if(e)return o===d?"end":"start"},W=e=>`${e} ${e===1?"star":"stars"}`,X=(e,o)=>`${e} out of ${o}`,Y=B(({allowHalf:e=!1,className:o,classNames:d,clearable:f=!1,colorScheme:h="warning",defaultValue:k,disabled:u=!1,emptyIcon:w,getItemLabel:V=W,icon:b,max:m=5,name:H,onValueChange:x,readOnly:p=!1,readOnlyLabel:M=X,required:O=!1,size:T="md",style:A,value:E,variant:F="solid",...s},y)=>{let g=J(),$=K(),t=Q({allowHalf:e,defaultValue:k,max:m,onValueChange:x,value:E}),n=F!=="unstyled",z=g?.controlId===s.id?g?.labelId:void 0,D=s["aria-labelledby"]??(s["aria-label"]?void 0:z),R=b??l(L,{filled:!0}),v=w??b??l(L,{filled:!1}),q=e?.5:1,P=[...new Array(m).keys()].map(a=>a+1),S=j(n&&i.rating,n&&i[T],n&&!p&&!u&&i.interactive,n&&u&&i.disabled,o),I={"--rating-solid":`var(--plume-color-${h}-solid)`,"--rating-empty":"var(--plume-border-strong)",...A};return p?Z("span",{className:S,"data-plume-rating":"",ref:y,style:I,...s,"aria-invalid":void 0,"aria-label":void 0,"aria-labelledby":void 0,children:[l("span",{style:G,children:M(t.value,m)}),P.map(a=>l(N,{classNames:d,emptyIcon:v,icon:R,isStyled:n,state:C(a,t.value)},a))]}):l("fieldset",{...s,"aria-labelledby":D,"aria-required":O||void 0,className:S,"data-plume-rating":"",disabled:u,onPointerLeave:()=>t.setHover(void 0),ref:y,role:"radiogroup",style:I,children:P.map(a=>l(N,{classNames:d,emptyIcon:v,icon:R,isStyled:n,state:C(a,t.preview),children:(e?[a-q,a]:[a]).map(r=>l("input",{"aria-label":V(r,m),checked:t.value===r,className:n?i.radio:void 0,"data-half":U(e,r,a),"data-plume-rating-radio":"",name:H??$,onChange:()=>t.setValue(r),onClick:()=>{f&&t.value===r&&t.setValue(0)},onKeyDown:c=>{f&&(c.key==="Backspace"||c.key==="Delete")&&(c.preventDefault(),t.setValue(0))},onPointerEnter:()=>t.setHover(r),type:"radio",value:r},r))},a))})});Y.displayName="Rating";export{Y as Rating};
@@ -1 +1 @@
1
- "use client";import{a as n}from"../../../chunk-V7QXMR67.mjs";import{forwardRef as B,useEffect as f,useState as h}from"react";import{Portal as F}from"../../../overlay/index.mjs";import{useFloatingPanel as O}from"../../../overlay/use-floating-panel.mjs";import{joinClasses as c}from"../../../overlay/class-names.mjs";import{mergeRefs as k}from"../../../overlay/trigger.mjs";import{useSelectContext as K}from"./select-context.mjs";import{jsx as a,jsxs as j}from"react/jsx-runtime";var W=B(({"aria-label":m,children:b,className:C="",classNames:r,emptyText:y="No results",searchLabel:v="Search",searchPlaceholder:S,style:P},g)=>{let e=K("SelectContent"),{close:x,flip:L,isStyled:l,labelling:u,multiple:w,offset:R,open:t,placement:E,query:i,shift:M,trigger:s}=e,[p,T]=h(null),[H,I]=h(void 0),{position:d,setPanel:N}=O({anchor:s,enabled:t,flip:L,offset:R,onDismiss:o=>x(o==="escape"),placement:E,shift:M});f(()=>{t&&s&&I(s.getBoundingClientRect().width)},[t,s]),f(()=>{t&&p&&p.focus({preventScroll:!0})},[t,p]);let D=[l&&n.panel,C].filter(Boolean).join(" "),A=e.options.some(o=>!i||o.label.toLowerCase().includes(i.toLowerCase()));return a(F,{children:j("div",{className:D||void 0,"data-placement":d.placement,"data-plume-select-panel":"",hidden:!t,ref:k(N,g),style:{...d.style,minWidth:H,opacity:d.isPositioned?void 0:0,...P},children:[e.searchable?a("div",{className:c(l&&n.search,r?.search),children:a("input",{"aria-activedescendant":e.activeId,"aria-autocomplete":"list","aria-controls":e.listboxId,"aria-expanded":t,"aria-label":v,autoComplete:"off",className:c(l&&n.searchInput,r?.searchInput),onChange:o=>e.setQuery(o.target.value),onKeyDown:o=>e.onListKeyDown(o,!0),placeholder:S,ref:T,role:"combobox",spellCheck:!1,type:"text",value:i})}):null,a("div",{"aria-label":m??u.label,"aria-labelledby":m?void 0:u.labelledBy,"aria-multiselectable":w||void 0,className:c(l&&n.list,r?.list),"data-plume-select-list":"",id:e.listboxId,ref:e.setListbox,role:"listbox",children:b}),i&&!A?a("div",{className:c(l&&n.empty,r?.empty),children:y}):null]})})});W.displayName="SelectContent";export{W as SelectContent};
1
+ "use client";import{a as n}from"../../../chunk-YXXQZOHK.mjs";import{forwardRef as B,useEffect as f,useState as h}from"react";import{Portal as F}from"../../../overlay/index.mjs";import{useFloatingPanel as O}from"../../../overlay/use-floating-panel.mjs";import{joinClasses as c}from"../../../overlay/class-names.mjs";import{mergeRefs as k}from"../../../overlay/trigger.mjs";import{useSelectContext as K}from"./select-context.mjs";import{jsx as a,jsxs as j}from"react/jsx-runtime";var W=B(({"aria-label":m,children:b,className:C="",classNames:r,emptyText:y="No results",searchLabel:v="Search",searchPlaceholder:S,style:P},g)=>{let e=K("SelectContent"),{close:x,flip:L,isStyled:l,labelling:u,multiple:w,offset:R,open:t,placement:E,query:i,shift:M,trigger:s}=e,[p,T]=h(null),[H,I]=h(void 0),{position:d,setPanel:N}=O({anchor:s,enabled:t,flip:L,offset:R,onDismiss:o=>x(o==="escape"),placement:E,shift:M});f(()=>{t&&s&&I(s.getBoundingClientRect().width)},[t,s]),f(()=>{t&&p&&p.focus({preventScroll:!0})},[t,p]);let D=[l&&n.panel,C].filter(Boolean).join(" "),A=e.options.some(o=>!i||o.label.toLowerCase().includes(i.toLowerCase()));return a(F,{children:j("div",{className:D||void 0,"data-placement":d.placement,"data-plume-select-panel":"",hidden:!t,ref:k(N,g),style:{...d.style,minWidth:H,opacity:d.isPositioned?void 0:0,...P},children:[e.searchable?a("div",{className:c(l&&n.search,r?.search),children:a("input",{"aria-activedescendant":e.activeId,"aria-autocomplete":"list","aria-controls":e.listboxId,"aria-expanded":t,"aria-label":v,autoComplete:"off",className:c(l&&n.searchInput,r?.searchInput),onChange:o=>e.setQuery(o.target.value),onKeyDown:o=>e.onListKeyDown(o,!0),placeholder:S,ref:T,role:"combobox",spellCheck:!1,type:"text",value:i})}):null,a("div",{"aria-label":m??u.label,"aria-labelledby":m?void 0:u.labelledBy,"aria-multiselectable":w||void 0,className:c(l&&n.list,r?.list),"data-plume-select-list":"",id:e.listboxId,ref:e.setListbox,role:"listbox",children:b}),i&&!A?a("div",{className:c(l&&n.empty,r?.empty),children:y}):null]})})});W.displayName="SelectContent";export{W as SelectContent};
@@ -1 +1 @@
1
- "use client";import{a as e}from"../../../chunk-V7QXMR67.mjs";import{forwardRef as d,useId as c}from"react";import{useSelectContext as m}from"./select-context.mjs";import{jsx as f,jsxs as S}from"react/jsx-runtime";var u=d(({children:t,className:l="",label:p,labelClassName:s="",style:a},i)=>{let{isStyled:o}=m("SelectGroup"),r=c(),n=[o&&e.group,l].filter(Boolean).join(" ");return S("div",{"aria-labelledby":r,className:n||void 0,ref:i,role:"group",style:a,children:[f("div",{className:[o&&e.groupLabel,s].filter(Boolean).join(" ")||void 0,id:r,children:p}),t]})});u.displayName="SelectGroup";export{u as SelectGroup};
1
+ "use client";import{a as e}from"../../../chunk-YXXQZOHK.mjs";import{forwardRef as d,useId as c}from"react";import{useSelectContext as m}from"./select-context.mjs";import{jsx as f,jsxs as S}from"react/jsx-runtime";var u=d(({children:t,className:l="",label:p,labelClassName:s="",style:a},i)=>{let{isStyled:o}=m("SelectGroup"),r=c(),n=[o&&e.group,l].filter(Boolean).join(" ");return S("div",{"aria-labelledby":r,className:n||void 0,ref:i,role:"group",style:a,children:[f("div",{className:[o&&e.groupLabel,s].filter(Boolean).join(" ")||void 0,id:r,children:p}),t]})});u.displayName="SelectGroup";export{u as SelectGroup};
@@ -1 +1 @@
1
- "use client";import{a}from"../../../chunk-V7QXMR67.mjs";import{forwardRef as j,useEffect as w,useId as h,useRef as P,useState as A}from"react";import{joinClasses as O}from"../../../overlay/class-names.mjs";import{CheckIcon as D}from"../../../overlay/icons.mjs";import{useSelectContext as F}from"./select-context.mjs";import{Fragment as J,jsx as n,jsxs as S}from"react/jsx-runtime";var $=(e,o)=>e.toLowerCase().includes(o.toLowerCase()),q=e=>e==="Enter"||e===" ";function y({children:e,className:o,show:t}){return t?n("span",{"aria-hidden":"true",className:o,children:e}):null}function Q({children:e,className:o,id:t}){return e?S(J,{children:[" ",n("span",{className:o,id:t,children:e})]}):null}function z({children:e,disabled:o,icon:t,label:r,value:i},d){let f=P(null),m=P(t),[s,R]=A(r??""),c=r??s;return m.current=t,w(()=>{r===void 0&&R(f.current?.textContent??"")},[e,r]),w(()=>d({disabled:!!o,get icon(){return m.current},label:c,value:i}),[o,d,c,i]),{resolved:c,textRef:f}}var G=j(({children:e,className:o="",classNames:t,description:r,disabled:i=!1,icon:d,label:f,style:m,value:s},R)=>{let c=F("SelectOption"),u=h(),N=h(),x=h(),{isStyled:l,multiple:M,query:E,register:g,select:b,setActiveId:C}=c,{resolved:k,textRef:I}=z({children:e,disabled:i,icon:d,label:f,value:s},g),v=c.isSelected(s),L=$(k,E),T=[l&&a.option,o].filter(Boolean).join(" "),H=()=>{!i&&c.activeId!==u&&C(u)},K=p=>{p.preventDefault(),i||b(s)},B=p=>{q(p.key)&&(p.preventDefault(),i||b(s))};return S("div",{"aria-disabled":i||void 0,"aria-labelledby":r?`${x} ${N}`:void 0,"aria-selected":v,className:T||void 0,"data-active":c.activeId===u?"":void 0,"data-label":k,"data-plume-select-option":"","data-value":s,hidden:!L,id:u,onClick:K,onKeyDown:B,onMouseDown:p=>p.preventDefault(),onPointerMove:H,ref:R,role:"option",style:m,tabIndex:-1,children:[n(y,{className:O(l&&a.checkbox,t?.checkbox),show:M,children:v?n(D,{}):null}),n(y,{className:O(l&&a.optionIcon,t?.icon),show:!!d,children:d}),S("span",{className:l?a.optionBody:void 0,"data-plume-select-option-body":"",children:[n("span",{id:x,ref:I,children:e??f}),n(Q,{className:O(l&&a.description,t?.description),id:N,children:r})]}),n(y,{className:O(l&&a.check,t?.check),show:!M&&v,children:n(D,{})})]})});G.displayName="SelectOption";export{G as SelectOption};
1
+ "use client";import{a as l}from"../../../chunk-YXXQZOHK.mjs";import{forwardRef as K,useEffect as P,useId as O,useRef as w,useState as B}from"react";import{joinClasses as v}from"../../../overlay/class-names.mjs";import{CheckIcon as j}from"../../../overlay/icons.mjs";import{useSelectContext as A}from"./select-context.mjs";import{Fragment as G,jsx as s,jsxs as y}from"react/jsx-runtime";var F=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),$=e=>e==="Enter"||e===" ";function D({children:e,className:t,show:o}){return o?s("span",{"aria-hidden":"true",className:t,children:e}):null}function q({children:e,className:t,id:o}){return e?y(G,{children:[" ",s("span",{className:t,id:o,children:e})]}):null}function Q({children:e,disabled:t,icon:o,label:r,value:n},a){let p=w(null),m=w(o),[c,R]=B(r??""),i=r??c;return m.current=o,P(()=>{r===void 0&&R(p.current?.textContent??"")},[e,r]),P(()=>a({disabled:!!t,get icon(){return m.current},label:i,value:n}),[t,a,i,n]),{resolved:i,textRef:p}}var z=K(({children:e,className:t="",classNames:o,description:r,disabled:n=!1,icon:a,label:p,style:m,value:c},R)=>{let i=A("SelectOption"),f=O(),S=O(),N=O(),{isStyled:u,query:E,register:b,select:h,setActiveId:g}=i,{resolved:x,textRef:k}=Q({children:e,disabled:n,icon:a,label:p,value:c},b),M=i.isSelected(c),C=F(x,E),I=[u&&l.option,t].filter(Boolean).join(" "),L=()=>{!n&&i.activeId!==f&&g(f)},T=d=>{d.preventDefault(),n||h(c)},H=d=>{$(d.key)&&(d.preventDefault(),n||h(c))};return y("div",{"aria-disabled":n||void 0,"aria-labelledby":r?`${N} ${S}`:void 0,"aria-selected":M,className:I||void 0,"data-active":i.activeId===f?"":void 0,"data-label":x,"data-plume-select-option":"","data-value":c,hidden:!C,id:f,onClick:T,onKeyDown:H,onMouseDown:d=>d.preventDefault(),onPointerMove:L,ref:R,role:"option",style:m,tabIndex:-1,children:[s(D,{className:v(u&&l.optionIcon,o?.icon),show:!!a,children:a}),y("span",{className:u?l.optionBody:void 0,"data-plume-select-option-body":"",children:[s("span",{id:N,ref:k,children:e??p}),s(q,{className:v(u&&l.description,o?.description),id:S,children:r})]}),s(D,{className:v(u&&l.check,o?.check),show:M,children:s(j,{})})]})});z.displayName="SelectOption";export{z as SelectOption};
@@ -1 +1 @@
1
- "use client";import{a as i}from"../../../chunk-V7QXMR67.mjs";import{forwardRef as N,useEffect as O,useRef as V}from"react";import{ChevronDownIcon as D,CloseIcon as E}from"../../../overlay/icons.mjs";import{joinClasses as g}from"../../../overlay/class-names.mjs";import{mergeRefs as H}from"../../../overlay/trigger.mjs";import{Chip as S}from"../../presentation/chip/index.mjs";import{useFieldContext as M}from"../field/field-context.mjs";import{useSelectContext as R}from"./select-context.mjs";import{SelectValue as x}from"./select-value.mjs";import{Fragment as P,jsx as a,jsxs as b}from"react/jsx-runtime";var k={border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:1};function z({classNames:l,context:t,maxDisplay:n,removeLabel:e}){let{isStyled:o,selectedOptions:c}=t,d=c.slice(0,n),p=c.length-d.length,m=!t.disabled&&!t.readOnly,u=o?"subtle":"unstyled";return b(P,{children:[d.map(s=>a(S,{className:l?.chip,classNames:{remove:l?.chipRemove},icon:s.icon,onRemove:m?()=>t.remove(s.value):void 0,removeLabel:e(s.label),size:t.size,variant:u,children:a("span",{"aria-hidden":"true",children:s.label})},s.value)),p>0?b(S,{className:l?.chip,size:t.size,variant:u,children:["+",p]}):null]})}function F(l,t){let{isStyled:n}=l;return[n&&i.control,n&&i[l.variant],n&&i[l.size],n&&i[l.shape],n&&l.invalid&&i.invalid,n&&l.disabled&&i.disabled,t].filter(Boolean).join(" ")||void 0}var T=N(({ariaLabel:l,children:t,classNames:n,context:e,labelledBy:o,placeholder:c,showChips:d},p)=>{let{isStyled:m,open:u}=e,s=e.selected.length>0,f=e.selectedOptions.map(r=>r.label).join(", ");return a("button",{"aria-activedescendant":u&&!e.searchable?e.activeId:void 0,"aria-controls":e.listboxId,"aria-describedby":e.describedBy,"aria-expanded":u,"aria-invalid":e.invalid||void 0,"aria-label":l,"aria-labelledby":o,"aria-readonly":e.readOnly||void 0,"aria-required":e.required||void 0,className:g(m&&i.trigger,n?.trigger),"data-placeholder":s?void 0:"","data-plume-select-trigger":"",disabled:e.disabled,id:e.controlId,onClick:()=>u?e.close(!1):e.setOpen(!0),onKeyDown:r=>e.onListKeyDown(r,!1),ref:p,role:"combobox",type:"button",children:d?b(P,{children:[s?null:a("span",{className:m?i.placeholder:void 0,children:c}),s?a("span",{style:k,children:f}):null]}):t??a(x,{placeholder:c})})});T.displayName="ComboboxButton";function j({classNames:l,clearLabel:t,context:n}){return a("button",{"aria-label":t,className:g(n.isStyled&&i.clear,l?.clear),"data-plume-select-clear":"",onClick:n.clear,type:"button",children:a(E,{})})}function q({classNames:l,context:t,onToggle:n}){return a("button",{"aria-hidden":"true",className:g(t.isStyled&&i.chevron,l?.chevron),"data-plume-select-chevron":"",disabled:t.disabled,onClick:n,onMouseDown:e=>e.preventDefault(),tabIndex:-1,type:"button",children:a(D,{})})}function K(l,t,n){let e=M(),{setLabelling:o}=l,c=e?.controlId===l.controlId?e.labelId:void 0,d=n??(t?void 0:c);return O(()=>{o({label:t,labelledBy:d})},[t,d,o]),d}var $=N(({"aria-label":l,"aria-labelledby":t,children:n,className:e="",classNames:o,clearLabel:c="Clear",display:d="chips",maxDisplay:p=Number.POSITIVE_INFINITY,placeholder:m,removeLabel:u=r=>`Remove ${r}`,style:s},f)=>{let r=R("SelectTrigger"),h=V(null),B=K(r,l,t),{isStyled:w,name:y,open:v}=r,C=r.multiple&&d==="chips"&&n===void 0,L={"--select-color":`var(--plume-color-${r.colorScheme}-text)`,...s},I=()=>{h.current?.focus(),v?r.close(!1):r.setOpen(!0)};return b("div",{className:F(r,e),"data-open":v?"":void 0,"data-plume-select-control":"",ref:r.setTrigger,style:L,children:[b("div",{className:g(w&&i.field,o?.field),"data-plume-select-field":"",children:[C?a(z,{classNames:o,context:r,maxDisplay:p,removeLabel:u}):null,a(T,{ariaLabel:l,classNames:o,context:r,labelledBy:B,placeholder:m,ref:H(h,f),showChips:C,children:n})]}),r.canClear&&r.selected.length>0?a(j,{classNames:o,clearLabel:c,context:r}):null,a(q,{classNames:o,context:r,onToggle:I}),y?a(Y,{name:y}):null]})});function Y({name:l}){let{multiple:t,selected:n}=R("SelectTrigger");return t?n.map(e=>a("input",{name:l,type:"hidden",value:e},e)):a("input",{name:l,type:"hidden",value:n[0]??""})}$.displayName="SelectTrigger";export{$ as SelectTrigger};
1
+ "use client";import{a as s}from"../../../chunk-YXXQZOHK.mjs";import{forwardRef as N,useEffect as O,useRef as V}from"react";import{ChevronDownIcon as D,CloseIcon as E}from"../../../overlay/icons.mjs";import{joinClasses as g}from"../../../overlay/class-names.mjs";import{mergeRefs as H}from"../../../overlay/trigger.mjs";import{visuallyHidden as M}from"../../../overlay/visually-hidden.mjs";import{Chip as S}from"../../presentation/chip/index.mjs";import{useFieldContext as x}from"../field/field-context.mjs";import{useSelectContext as R}from"./select-context.mjs";import{SelectValue as k}from"./select-value.mjs";import{Fragment as P,jsx as r,jsxs as b}from"react/jsx-runtime";function z({classNames:l,context:t,maxDisplay:a,removeLabel:e}){let{isStyled:o,selectedOptions:c}=t,d=c.slice(0,a),p=c.length-d.length,m=!t.disabled&&!t.readOnly,u=o?"subtle":"unstyled";return b(P,{children:[d.map(i=>r(S,{className:l?.chip,classNames:{remove:l?.chipRemove},icon:i.icon,onRemove:m?()=>t.remove(i.value):void 0,removeLabel:e(i.label),size:t.size,variant:u,children:r("span",{"aria-hidden":"true",children:i.label})},i.value)),p>0?b(S,{className:l?.chip,size:t.size,variant:u,children:["+",p]}):null]})}function F(l,t){let{isStyled:a}=l;return[a&&s.control,a&&s[l.variant],a&&s[l.size],a&&s[l.shape],a&&l.invalid&&s.invalid,a&&l.disabled&&s.disabled,t].filter(Boolean).join(" ")||void 0}var T=N(({ariaLabel:l,children:t,classNames:a,context:e,labelledBy:o,placeholder:c,showChips:d},p)=>{let{isStyled:m,open:u}=e,i=e.selected.length>0,f=e.selectedOptions.map(n=>n.label).join(", ");return r("button",{"aria-activedescendant":u&&!e.searchable?e.activeId:void 0,"aria-controls":e.listboxId,"aria-describedby":e.describedBy,"aria-expanded":u,"aria-invalid":e.invalid||void 0,"aria-label":l,"aria-labelledby":o,"aria-readonly":e.readOnly||void 0,"aria-required":e.required||void 0,className:g(m&&s.trigger,a?.trigger),"data-placeholder":i?void 0:"","data-plume-select-trigger":"",disabled:e.disabled,id:e.controlId,onClick:()=>u?e.close(!1):e.setOpen(!0),onKeyDown:n=>e.onListKeyDown(n,!1),ref:p,role:"combobox",type:"button",children:d?b(P,{children:[i?null:r("span",{className:m?s.placeholder:void 0,children:c}),i?r("span",{style:M,children:f}):null]}):t??r(k,{placeholder:c})})});T.displayName="ComboboxButton";function j({classNames:l,clearLabel:t,context:a}){return r("button",{"aria-label":t,className:g(a.isStyled&&s.clear,l?.clear),"data-plume-select-clear":"",onClick:a.clear,type:"button",children:r(E,{})})}function q({classNames:l,context:t,onToggle:a}){return r("button",{"aria-hidden":"true",className:g(t.isStyled&&s.chevron,l?.chevron),"data-plume-select-chevron":"",disabled:t.disabled,onClick:a,onMouseDown:e=>e.preventDefault(),tabIndex:-1,type:"button",children:r(D,{})})}function K(l,t,a){let e=x(),{setLabelling:o}=l,c=e?.controlId===l.controlId?e.labelId:void 0,d=a??(t?void 0:c);return O(()=>{o({label:t,labelledBy:d})},[t,d,o]),d}var $=N(({"aria-label":l,"aria-labelledby":t,children:a,className:e="",classNames:o,clearLabel:c="Clear",display:d="chips",maxDisplay:p=Number.POSITIVE_INFINITY,placeholder:m,removeLabel:u=n=>`Remove ${n}`,style:i},f)=>{let n=R("SelectTrigger"),y=V(null),B=K(n,l,t),{isStyled:L,name:h,open:v}=n,C=n.multiple&&d==="chips"&&a===void 0,I={"--select-color":`var(--plume-color-${n.colorScheme}-text)`,...i},w=()=>{y.current?.focus(),v?n.close(!1):n.setOpen(!0)};return b("div",{className:F(n,e),"data-open":v?"":void 0,"data-plume-select-control":"",ref:n.setTrigger,style:I,children:[b("div",{className:g(L&&s.field,o?.field),"data-plume-select-field":"",children:[C?r(z,{classNames:o,context:n,maxDisplay:p,removeLabel:u}):null,r(T,{ariaLabel:l,classNames:o,context:n,labelledBy:B,placeholder:m,ref:H(y,f),showChips:C,children:a})]}),n.canClear&&n.selected.length>0?r(j,{classNames:o,clearLabel:c,context:n}):null,r(q,{classNames:o,context:n,onToggle:w}),h?r(Y,{name:h}):null]})});function Y({name:l}){let{multiple:t,selected:a}=R("SelectTrigger");return t?a.map(e=>r("input",{name:l,type:"hidden",value:e},e)):r("input",{name:l,type:"hidden",value:a[0]??""})}$.displayName="SelectTrigger";export{$ as SelectTrigger};
@@ -1 +1 @@
1
- "use client";import{a as n}from"../../../chunk-V7QXMR67.mjs";import{useSelectContext as s}from"./select-context.mjs";import{Fragment as u,jsx as t,jsxs as r}from"react/jsx-runtime";function i({option:e}){let{isStyled:l}=s("SelectValue");return r(u,{children:[e.icon?t("span",{"aria-hidden":"true",className:l?n.valueIcon:void 0,children:e.icon}):null,t("span",{className:l?n.valueText:void 0,children:e.label})]})}function S({children:e,placeholder:l}){let{isStyled:o,multiple:c,selected:d,selectedOptions:a}=s("SelectValue");return d.length===0?l?t("span",{className:o?n.placeholder:void 0,children:l}):null:e?e(a):c?t("span",{className:o?n.valueText:void 0,children:a.map(p=>p.label).join(", ")}):a[0]?t("span",{className:o?n.value:void 0,children:t(i,{option:a[0]})}):null}export{i as OptionContent,S as SelectValue};
1
+ "use client";import{a as n}from"../../../chunk-YXXQZOHK.mjs";import{useSelectContext as s}from"./select-context.mjs";import{Fragment as u,jsx as t,jsxs as r}from"react/jsx-runtime";function i({option:e}){let{isStyled:l}=s("SelectValue");return r(u,{children:[e.icon?t("span",{"aria-hidden":"true",className:l?n.valueIcon:void 0,children:e.icon}):null,t("span",{className:l?n.valueText:void 0,children:e.label})]})}function S({children:e,placeholder:l}){let{isStyled:o,multiple:c,selected:d,selectedOptions:a}=s("SelectValue");return d.length===0?l?t("span",{className:o?n.placeholder:void 0,children:l}):null:e?e(a):c?t("span",{className:o?n.valueText:void 0,children:a.map(p=>p.label).join(", ")}):a[0]?t("span",{className:o?n.value:void 0,children:t(i,{option:a[0]})}):null}export{i as OptionContent,S as SelectValue};
@@ -0,0 +1 @@
1
+ "use client";import{a as m}from"../../../chunk-H4KFRPQR.mjs";import{forwardRef as y,useId as C,useState as M}from"react";import{joinClasses as L}from"../../../overlay/class-names.mjs";import{visuallyHidden as R}from"../../../overlay/visually-hidden.mjs";import{jsx as o,jsxs as v}from"react/jsx-runtime";var H=(e,t)=>t===void 0?String(e):`${e} / ${t}`,N=e=>`${e} ${e===1?"character":"characters"} left`,A=(e,t)=>e<=Math.max(10,Math.ceil(t/10)),S=y(({countClassName:e,formatCount:t=H,formatRemaining:l=N,isStyled:c,textareaProps:r},f)=>{let{defaultValue:g,maxLength:n,onChange:p,value:i}=r,d=C(),[b,T]=M(String(g??"").length),u=i===void 0?b:String(i).length,a=n===void 0?void 0:n-u,x=n!==void 0&&a!==void 0&&A(a,n)?l(Math.max(a,0)):"",h=[r["aria-describedby"],d].filter(Boolean).join(" ");return v("div",{"data-plume-textarea-group":"",children:[o("textarea",{...r,"aria-describedby":h,onChange:s=>{T(s.target.value.length),p?.(s)},ref:f}),o("span",{className:L(c&&m.count,e),"data-limit":a!==void 0&&a<=0?"":void 0,"data-plume-textarea-count":"",id:d,children:t(u,n)}),o("output",{style:R,children:x})]})});S.displayName="TextareaCounter";export{S as TextareaCounter};
@@ -1 +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};
1
+ import{a as e}from"../../../chunk-H4KFRPQR.mjs";import{forwardRef as b}from"react";import{TextareaCounter as h}from"./textarea-counter.mjs";import{jsx as p}from"react/jsx-runtime";var P=(r,a)=>({"--textarea-color":`var(--plume-color-${r}-text)`,...a}),g=b(({className:r="",colorScheme:a="secondary",countClassName:d,disabled:i=!1,formatCount:x,formatRemaining:u,resize:c="vertical",rows:T=3,shape:f="rounded",showCount:S=!1,size:y="md",style:C,variant:n="outline",...t},s)=>{let o=n!=="unstyled",l=t["aria-invalid"]===!0||t["aria-invalid"]==="true",m={className:`${o?`${e.base} ${e[n]} ${e[y]} ${e[f]} ${e[c]}`:""} ${l&&o?e.invalid:""} ${i?e.disabled:""} ${r}`.replace(/\s+/g," ").trim(),disabled:i,rows:T,style:P(l?"error":a,C),...t};return S?p(h,{countClassName:d,formatCount:x,formatRemaining:u,isStyled:o,ref:s,textareaProps:m}):p("textarea",{ref:s,...m})});g.displayName="Textarea";export{g as Textarea};
@@ -1 +1 @@
1
- "use client";import{a as o}from"../../../chunk-MREJ5C76.mjs";import{forwardRef as P}from"react";import{useDropdownContext as T}from"./dropdown-context.mjs";import{Fragment as I,jsx as r,jsxs as R}from"react/jsx-runtime";var h=P(({children:y,className:E="",closeOnSelect:M,disabled:n=!1,href:l,icon:d,onSelect:D,rel:b,shortcut:i,style:s,target:v,...m},c)=>{let t=T("DropdownItem"),p=[t.isStyled&&o.item,E].filter(Boolean).join(" "),u=e=>{if(n){e.preventDefault();return}D?.(e),!e.defaultPrevented&&(M??t.closeOnSelect)&&t.setOpen(!1)},f=e=>{!n&&document.activeElement!==e.currentTarget&&e.currentTarget.focus({preventScroll:!0})},w=R(I,{children:[d?r("span",{"aria-hidden":"true",className:t.isStyled?o.icon:void 0,children:d}):null,r("span",{className:t.isStyled?o.label:void 0,"data-plume-menu-item-label":"",children:y}),i?r("span",{className:t.isStyled?o.shortcut:void 0,children:i}):null]});return l!==void 0?r("a",{...m,"aria-disabled":n||void 0,className:p,"data-plume-menu-item":"",href:n?void 0:l,onClick:u,onKeyDown:a=>{a.key===" "&&(a.preventDefault(),a.currentTarget.click())},onPointerMove:f,ref:c,rel:b,role:"menuitem",style:s,tabIndex:-1,target:v,children:w}):r("button",{...m,className:p,"data-plume-menu-item":"",disabled:n,onClick:u,onPointerMove:f,ref:c,role:"menuitem",style:s,tabIndex:-1,type:"button",children:w})});h.displayName="DropdownItem";export{h as DropdownItem};
1
+ "use client";import{a as o}from"../../../chunk-TLZRYQKI.mjs";import{forwardRef as P}from"react";import{useDropdownContext as T}from"./dropdown-context.mjs";import{Fragment as I,jsx as r,jsxs as R}from"react/jsx-runtime";var h=P(({children:y,className:E="",closeOnSelect:M,disabled:n=!1,href:l,icon:d,onSelect:D,rel:b,shortcut:i,style:s,target:v,...m},c)=>{let t=T("DropdownItem"),p=[t.isStyled&&o.item,E].filter(Boolean).join(" "),u=e=>{if(n){e.preventDefault();return}D?.(e),!e.defaultPrevented&&(M??t.closeOnSelect)&&t.setOpen(!1)},f=e=>{!n&&document.activeElement!==e.currentTarget&&e.currentTarget.focus({preventScroll:!0})},w=R(I,{children:[d?r("span",{"aria-hidden":"true",className:t.isStyled?o.icon:void 0,children:d}):null,r("span",{className:t.isStyled?o.label:void 0,"data-plume-menu-item-label":"",children:y}),i?r("span",{className:t.isStyled?o.shortcut:void 0,children:i}):null]});return l!==void 0?r("a",{...m,"aria-disabled":n||void 0,className:p,"data-plume-menu-item":"",href:n?void 0:l,onClick:u,onKeyDown:a=>{a.key===" "&&(a.preventDefault(),a.currentTarget.click())},onPointerMove:f,ref:c,rel:b,role:"menuitem",style:s,tabIndex:-1,target:v,children:w}):r("button",{...m,className:p,"data-plume-menu-item":"",disabled:n,onClick:u,onPointerMove:f,ref:c,role:"menuitem",style:s,tabIndex:-1,type:"button",children:w})});h.displayName="DropdownItem";export{h as DropdownItem};
@@ -1 +1 @@
1
- "use client";import{a as o}from"../../../chunk-MREJ5C76.mjs";import{forwardRef as i}from"react";import{useDropdownContext as s}from"./dropdown-context.mjs";import{jsx as a}from"react/jsx-runtime";var l=i(({children:e,className:t="",style:r},p)=>{let{isStyled:n}=s("DropdownLabel"),d=[n&&o.groupLabel,t].filter(Boolean).join(" ");return a("div",{className:d||void 0,ref:p,style:r,children:e})});l.displayName="DropdownLabel";export{l as DropdownLabel};
1
+ "use client";import{a as o}from"../../../chunk-TLZRYQKI.mjs";import{forwardRef as i}from"react";import{useDropdownContext as s}from"./dropdown-context.mjs";import{jsx as a}from"react/jsx-runtime";var l=i(({children:e,className:t="",style:r},p)=>{let{isStyled:n}=s("DropdownLabel"),d=[n&&o.groupLabel,t].filter(Boolean).join(" ");return a("div",{className:d||void 0,ref:p,style:r,children:e})});l.displayName="DropdownLabel";export{l as DropdownLabel};
@@ -1 +1 @@
1
- "use client";import{a as s}from"../../../chunk-MREJ5C76.mjs";import{forwardRef as K,useEffect as C}from"react";import{Portal as N,useFocusTrap as O}from"../../../overlay/index.mjs";import{useFloatingPanel as S}from"../../../overlay/use-floating-panel.mjs";import{mergeRefs as B}from"../../../overlay/trigger.mjs";import{isTypeaheadKey as q,matchTypeahead as z,useTypeahead as U}from"../../../overlay/use-typeahead.mjs";import{useDropdownContext as j}from"./dropdown-context.mjs";import{jsx as T}from"react/jsx-runtime";var D=n=>Array.from(n.querySelectorAll('[role="menuitem"]')).filter(i=>i.getAttribute("aria-disabled")!=="true"&&!i.disabled),d=n=>n?.focus({preventScroll:!0}),G=K(({children:n,className:i="",style:w,...m},E)=>{let p=j("DropdownMenu"),{flip:h,initialItem:u,isStyled:f,menuId:H,offset:L,open:r,placement:g,setOpen:b,shift:P,trigger:c}=p,A=U(),{isTopmost:v,panel:l,position:y,setPanel:x}=S({anchor:c,enabled:r,flip:h,offset:L,onDismiss:()=>b(!1),placement:g,shift:P});if(O(l,{active:r,isTopmost:v,returnFocus:c}),C(()=>{if(!r||!l)return;let e=D(l);u.current==="first"?d(e[0]):u.current==="last"&&d(e[e.length-1])},[u,r,l]),!r)return null;let R=e=>{let t=D(e.currentTarget),a=t.indexOf(document.activeElement),o;if(e.key==="ArrowDown")o=(a+1)%t.length;else if(e.key==="ArrowUp")o=a<=0?t.length-1:a-1;else if(e.key==="Home")o=0;else if(e.key==="End")o=t.length-1;else if(e.key==="Tab"){e.preventDefault(),b(!1);return}else if(q(e)){let F=t.map(I=>I.textContent??""),M=z(F,A(e.key),a);M>=0&&d(t[M]);return}o!==void 0&&(e.preventDefault(),d(t[o]))},k=[f&&s.menu,f&&s[p.size],f&&s[p.variant],i].filter(Boolean).join(" ");return T(N,{children:T("div",{"aria-labelledby":m["aria-label"]?void 0:m["aria-labelledby"]??c?.id,...m,className:k,"data-placement":y.placement,id:H,onKeyDown:R,ref:B(x,E),role:"menu",style:{...y.style,opacity:y.isPositioned?void 0:0,...w},tabIndex:-1,children:n})})});G.displayName="DropdownMenu";export{G as DropdownMenu};
1
+ "use client";import{a as s}from"../../../chunk-TLZRYQKI.mjs";import{forwardRef as K,useEffect as C}from"react";import{Portal as N,useFocusTrap as O}from"../../../overlay/index.mjs";import{useFloatingPanel as S}from"../../../overlay/use-floating-panel.mjs";import{mergeRefs as B}from"../../../overlay/trigger.mjs";import{isTypeaheadKey as q,matchTypeahead as z,useTypeahead as U}from"../../../overlay/use-typeahead.mjs";import{useDropdownContext as j}from"./dropdown-context.mjs";import{jsx as T}from"react/jsx-runtime";var D=n=>Array.from(n.querySelectorAll('[role="menuitem"]')).filter(i=>i.getAttribute("aria-disabled")!=="true"&&!i.disabled),m=n=>n?.focus({preventScroll:!0}),G=K(({children:n,className:i="",style:w,...d},E)=>{let p=j("DropdownMenu"),{flip:h,initialItem:u,isStyled:f,menuId:H,offset:L,open:r,placement:g,setOpen:b,shift:P,trigger:c}=p,A=U(),{isTopmost:v,panel:l,position:y,setPanel:x}=S({anchor:c,enabled:r,flip:h,offset:L,onDismiss:()=>b(!1),placement:g,shift:P});if(O(l,{active:r,isTopmost:v,returnFocus:c}),C(()=>{if(!r||!l)return;let e=D(l);u.current==="first"?m(e[0]):u.current==="last"&&m(e[e.length-1])},[u,r,l]),!r)return null;let R=e=>{let t=D(e.currentTarget),a=t.indexOf(document.activeElement),o;if(e.key==="ArrowDown")o=(a+1)%t.length;else if(e.key==="ArrowUp")o=a<=0?t.length-1:a-1;else if(e.key==="Home")o=0;else if(e.key==="End")o=t.length-1;else if(e.key==="Tab"){e.preventDefault(),b(!1);return}else if(q(e)){let F=t.map(I=>I.textContent??""),M=z(F,A(e.key),a);M>=0&&m(t[M]);return}o!==void 0&&(e.preventDefault(),m(t[o]))},k=[f&&s.menu,f&&s[p.size],f&&s[p.variant],i].filter(Boolean).join(" ");return T(N,{children:T("div",{"aria-labelledby":d["aria-label"]?void 0:d["aria-labelledby"]??c?.id,...d,className:k,"data-placement":y.placement,"data-plume-menu":"",id:H,onKeyDown:R,ref:B(x,E),role:"menu",style:{...y.style,opacity:y.isPositioned?void 0:0,...w},tabIndex:-1,children:n})})});G.displayName="DropdownMenu";export{G as DropdownMenu};
@@ -1 +1 @@
1
- "use client";import{a as o}from"../../../chunk-MREJ5C76.mjs";import{forwardRef as n}from"react";import{useDropdownContext as s}from"./dropdown-context.mjs";import{jsx as m}from"react/jsx-runtime";var d=n(({className:r="",style:e},t)=>{let{isStyled:p}=s("DropdownSeparator"),a=[p&&o.separator,r].filter(Boolean).join(" ");return m("hr",{className:a||void 0,ref:t,style:e})});d.displayName="DropdownSeparator";export{d as DropdownSeparator};
1
+ "use client";import{a as o}from"../../../chunk-TLZRYQKI.mjs";import{forwardRef as n}from"react";import{useDropdownContext as s}from"./dropdown-context.mjs";import{jsx as m}from"react/jsx-runtime";var d=n(({className:r="",style:e},t)=>{let{isStyled:p}=s("DropdownSeparator"),a=[p&&o.separator,r].filter(Boolean).join(" ");return m("hr",{className:a||void 0,ref:t,style:e})});d.displayName="DropdownSeparator";export{d as DropdownSeparator};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as r,useContext as n}from"react";var o=r(void 0);function u(t){let e=n(o);if(!e)throw new Error(`${t} must be used within a <Breadcrumb>`);return e}export{o as BreadcrumbContext,u as useBreadcrumbContext};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-4HSNVSFY.mjs";import{forwardRef as i}from"react";import{joinClasses as c}from"../../../overlay/class-names.mjs";import{useBreadcrumbContext as s}from"./breadcrumb-context.mjs";import{BreadcrumbSeparator as u}from"./breadcrumb-separator.mjs";import{jsx as b,jsxs as l}from"react/jsx-runtime";var n=i(({children:t,className:m,separator:e,style:o,...a},d)=>{let{isStyled:p}=s("BreadcrumbItem");return l("li",{className:c(p&&r.item,m),"data-plume-breadcrumb-item":"",ref:d,style:o,...a,children:[t,e===null?null:b(u,{children:e})]})});n.displayName="BreadcrumbItem";export{n as BreadcrumbItem};
@@ -0,0 +1 @@
1
+ "use client";import{a}from"../../../chunk-4HSNVSFY.mjs";import{forwardRef as L}from"react";import{joinClasses as k}from"../../../overlay/class-names.mjs";import{useBreadcrumbContext as B}from"./breadcrumb-context.mjs";import{jsx as i}from"react/jsx-runtime";var P=L(({children:e,className:m,current:r=!1,href:t,hrefLang:d,onClick:c,referrerPolicy:s,rel:p,style:u,target:f,...l},o)=>{let{isStyled:b}=B("BreadcrumbLink"),n={"aria-current":r?"page":void 0,className:k(b&&a.link,m),"data-current":r?"":void 0,"data-plume-breadcrumb-link":"",style:u,...l};return t===void 0?i("span",{...n,ref:o,children:e}):i("a",{...n,href:t,hrefLang:d,onClick:c,ref:o,referrerPolicy:s,rel:p,target:f,children:e})});P.displayName="BreadcrumbLink";export{P as BreadcrumbLink};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-4HSNVSFY.mjs";import{forwardRef as n}from"react";import{joinClasses as i}from"../../../overlay/class-names.mjs";import{useBreadcrumbContext as c}from"./breadcrumb-context.mjs";import{jsx as b}from"react/jsx-runtime";var u=n(({children:e,className:t,style:a,...o},p)=>{let{isStyled:m,separator:s,separatorClassName:d}=c("BreadcrumbSeparator");return b("span",{"aria-hidden":"true",className:i(m&&r.separator,d,t),"data-plume-breadcrumb-separator":"",ref:p,style:a,...o,children:e??s})});u.displayName="BreadcrumbSeparator";export{u as BreadcrumbSeparator};
@@ -0,0 +1 @@
1
+ "use client";import{a as t}from"../../../chunk-4HSNVSFY.mjs";import{forwardRef as y,useMemo as B}from"react";import{joinClasses as d}from"../../../overlay/class-names.mjs";import{BreadcrumbContext as x}from"./breadcrumb-context.mjs";import{jsx as o}from"react/jsx-runtime";var S=(r,a)=>({"--breadcrumb-text":`var(--plume-color-${r}-text)`,"--breadcrumb-text-hover":`var(--plume-color-${r}-text-hover)`,"--breadcrumb-tint":`var(--plume-color-${r}-tint)`,"--breadcrumb-tint-text":`var(--plume-color-${r}-tint-text)`,...a}),v=y(({"aria-label":r,"aria-labelledby":a,children:s,className:b,colorScheme:c="primary",listClassName:u,separator:m="/",separatorClassName:i,size:n="md",style:p,variant:l="plain",...C},P)=>{let e=l!=="unstyled",f=B(()=>({isStyled:e,separator:m,separatorClassName:i}),[e,m,i]);return o(x.Provider,{value:f,children:o("nav",{"aria-label":r??(a?void 0:"Breadcrumb"),"aria-labelledby":a,className:d(e&&t.breadcrumb,e&&t[l],e&&t[n],b),"data-plume-breadcrumb":"",ref:P,style:S(c,p),...C,children:o("ol",{className:d(e&&t.list,u),"data-plume-breadcrumb-list":"",children:s})})})});v.displayName="Breadcrumb";export{v as Breadcrumb};
@@ -0,0 +1 @@
1
+ import{Breadcrumb as m}from"./breadcrumb.mjs";import{BreadcrumbItem as p}from"./breadcrumb-item.mjs";import{BreadcrumbLink as a}from"./breadcrumb-link.mjs";import{BreadcrumbSeparator as c}from"./breadcrumb-separator.mjs";export{m as Breadcrumb,p as BreadcrumbItem,a as BreadcrumbLink,c as BreadcrumbSeparator};
@@ -0,0 +1 @@
1
+ import{Navbar as o}from"./navbar.mjs";import{NavbarBrand as e}from"./navbar-brand.mjs";import{NavbarContent as b}from"./navbar-content.mjs";import{NavbarItem as N}from"./navbar-item.mjs";import{NavbarToggle as m}from"./navbar-toggle.mjs";export{o as Navbar,e as NavbarBrand,b as NavbarContent,N as NavbarItem,m as NavbarToggle};
@@ -0,0 +1 @@
1
+ "use client";import{a as o}from"../../../chunk-6EES7OVH.mjs";import{forwardRef as c}from"react";import{joinClasses as f}from"../../../overlay/class-names.mjs";import{useNavbarContext as N}from"./navbar-context.mjs";import{jsx as n}from"react/jsx-runtime";var v=c(({children:r,className:d,href:e,onClick:s,rel:p,style:m,target:i,...l},a)=>{let{isStyled:b}=N("NavbarBrand"),t={className:f(b&&o.brand,d),"data-plume-navbar-brand":"",style:m,...l};return e===void 0?n("span",{...t,ref:a,children:r}):n("a",{...t,href:e,onClick:s,ref:a,rel:p,target:i,children:r})});v.displayName="NavbarBrand";export{v as NavbarBrand};
@@ -0,0 +1 @@
1
+ "use client";import{a as t}from"../../../chunk-6EES7OVH.mjs";import{forwardRef as v}from"react";import{joinClasses as b}from"../../../overlay/class-names.mjs";import{useNavbarContext as l}from"./navbar-context.mjs";import{jsx as C}from"react/jsx-runtime";var N=v(({align:e="start",children:o,className:n,id:r,style:a,...i},p)=>{let{contentId:s,isStyled:d,open:m}=l("NavbarContent");return C("div",{className:b(d&&t.content,n),"data-align":e,"data-open":m?"":void 0,"data-plume-navbar-content":"",id:r??s,ref:p,style:a,...i,children:o})});N.displayName="NavbarContent";export{N as NavbarContent};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as n,useContext as o}from"react";var r=n(void 0);function i(t){let e=o(r);if(!e)throw new Error(`${t} must be used within a <Navbar>`);return e}export{r as NavbarContext,i as useNavbarContext};
@@ -0,0 +1 @@
1
+ "use client";import{a as e}from"../../../chunk-6EES7OVH.mjs";import{forwardRef as n}from"react";import{joinClasses as s}from"../../../overlay/class-names.mjs";import{NavLink as p}from"../shared/nav-link.mjs";import{useNavbarContext as l}from"./navbar-context.mjs";import{jsx as b}from"react/jsx-runtime";var d=n(({active:t=!1,className:r,disabled:a=!1,...o},m)=>{let{isStyled:i}=l("NavbarItem");return b(p,{active:t,className:s(i&&e.item,r),dataAttribute:"data-plume-navbar-item",disabled:a,ref:m,...o})});d.displayName="NavbarItem";export{d as NavbarItem};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-6EES7OVH.mjs";import{forwardRef as c}from"react";import{joinClasses as N}from"../../../overlay/class-names.mjs";import{CloseIcon as T,MenuIcon as v}from"../../../overlay/icons.mjs";import{mergeRefs as R}from"../../../overlay/trigger.mjs";import{useNavbarContext as y}from"./navbar-context.mjs";import{jsx as t}from"react/jsx-runtime";var P=c(({children:a,className:n,icon:l,label:i="Toggle navigation",onClick:g,style:p,...s},m)=>{let{contentId:d,isStyled:b,open:e,setOpen:f,toggleRef:u}=y("NavbarToggle");return t("button",{"aria-controls":d,"aria-expanded":e,"aria-label":i,className:N(b&&r.toggle,n),"data-open":e?"":void 0,"data-plume-navbar-toggle":"",onClick:o=>{g?.(o),o.defaultPrevented||f(!e)},ref:R(m,u),style:p,type:"button",...s,children:a??l??(e?t(T,{}):t(v,{}))})});P.displayName="NavbarToggle";export{P as NavbarToggle};
@@ -0,0 +1 @@
1
+ "use client";import{a as o}from"../../../chunk-6EES7OVH.mjs";import{forwardRef as $,useCallback as H,useId as L,useMemo as T,useRef as O,useState as h}from"react";import{joinClasses as w}from"../../../overlay/class-names.mjs";import{useControllableState as E}from"../../../overlay/use-controllable-state.mjs";import{useDismiss as A}from"../../../overlay/use-dismiss.mjs";import{mergeRefs as I}from"../../../overlay/trigger.mjs";import{NavbarContext as V}from"./navbar-context.mjs";import{jsx as p}from"react/jsx-runtime";var z=(e,r)=>({"--navbar-solid":`var(--plume-color-${e}-solid)`,"--navbar-contrast":`var(--plume-color-${e}-solid-contrast)`,"--navbar-solid-active":`var(--plume-color-${e}-solid-active)`,"--navbar-solid-hover":`var(--plume-color-${e}-solid-hover)`,"--navbar-text":`var(--plume-color-${e}-text)`,"--navbar-tint":`var(--plume-color-${e}-tint)`,"--navbar-tint-text":`var(--plume-color-${e}-tint-text)`,...r}),B=$(({breakpoint:e="md",children:r,className:v,colorScheme:d="primary",defaultOpen:m=!1,id:b,onOpenChange:u,open:c,size:f="md",sticky:C=!1,style:N,variant:l="plain",...y},P)=>{let S=L(),n=b??S,t=l!=="unstyled",[s,a]=E({defaultValue:m,onChange:u,value:c}),[x,R]=h(null),i=O(null),g=H(M=>{a(!1),M==="escape"&&i.current?.focus()},[a]);A({elements:[x],enabled:s,onDismiss:g});let k=T(()=>({contentId:`${n}-content`,isStyled:t,open:s,setOpen:a,toggleRef:i}),[t,s,n,a]);return p(V.Provider,{value:k,children:p("nav",{className:w(t&&o.navbar,t&&o[l],t&&o[f],v),"data-breakpoint":e,"data-plume-navbar":"","data-sticky":C?"":void 0,id:n,ref:I(P,R),style:z(d,N),...y,children:r})})});B.displayName="Navbar";export{B as Navbar};
@@ -0,0 +1 @@
1
+ "use client";import{forwardRef as c}from"react";import{jsx as i}from"react/jsx-runtime";var p=c(({active:n,children:t,dataAttribute:s,disabled:e,href:r,onClick:a,rel:f,target:l,...u},o)=>{let d={"aria-current":n?"page":void 0,"data-active":n?"":void 0,"data-disabled":e?"":void 0,[s]:"",...u};return r===void 0?i("button",{...d,disabled:e,onClick:a,ref:o,type:"button",children:t}):i("a",{...d,"aria-disabled":e||void 0,href:e?void 0:r,onClick:a,ref:o,rel:f,tabIndex:e?-1:void 0,target:l,children:t})});p.displayName="NavLink";export{p as NavLink};
@@ -0,0 +1 @@
1
+ import{Sidebar as o}from"./sidebar.mjs";import{SidebarContent as i}from"./sidebar-content.mjs";import{SidebarItem as a}from"./sidebar-item.mjs";import{SidebarProvider as b}from"./sidebar-provider.mjs";import{SidebarToggle as m}from"./sidebar-toggle.mjs";export{o as Sidebar,i as SidebarContent,a as SidebarItem,b as SidebarProvider,m as SidebarToggle};
@@ -0,0 +1 @@
1
+ "use client";import{a as e}from"../../../chunk-AUNT6PUD.mjs";import{forwardRef as d,useContext as s}from"react";import{joinClasses as m}from"../../../overlay/class-names.mjs";import{SidebarStyleContext as p}from"./sidebar-context.mjs";import{jsx as b}from"react/jsx-runtime";var l=d(({children:t,className:o,style:r,...n},i)=>{let{isStyled:a}=s(p);return b("nav",{className:m(a&&e.content,o),"data-plume-sidebar-content":"",ref:i,style:r,...n,children:t})});l.displayName="SidebarContent";export{l as SidebarContent};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as t,useContext as r}from"react";var a={sm:"(width < 40rem)",md:"(width < 48rem)",lg:"(width < 64rem)",never:"not all"},n=t(void 0),d=t({isStyled:!0});function l(o){let e=r(n);if(!e)throw new Error(`${o} must be used within a <SidebarProvider>`);return e}export{n as SidebarContext,d as SidebarStyleContext,a as sidebarQueries,l as useSidebarContext};
@@ -0,0 +1 @@
1
+ "use client";import{a as e}from"../../../chunk-AUNT6PUD.mjs";import{forwardRef as b,useContext as c}from"react";import{joinClasses as r}from"../../../overlay/class-names.mjs";import{NavLink as f}from"../shared/nav-link.mjs";import{SidebarStyleContext as u}from"./sidebar-context.mjs";import{jsx as i,jsxs as I}from"react/jsx-runtime";var S=b(({active:d=!1,children:n,className:m,classNames:a,disabled:s=!1,icon:o,...l},p)=>{let{isStyled:t}=c(u);return I(f,{active:d,className:r(t&&e.item,m),dataAttribute:"data-plume-sidebar-item",disabled:s,ref:p,...l,children:[o?i("span",{"aria-hidden":"true",className:r(t&&e.icon,a?.icon),"data-plume-sidebar-icon":"",children:o}):null,i("span",{className:r(t&&e.label,a?.label),"data-plume-sidebar-label":"",children:n})]})});S.displayName="SidebarItem";export{S as SidebarItem};
@@ -0,0 +1 @@
1
+ "use client";import{useId as S,useMemo as P,useRef as R}from"react";import{useControllableState as d}from"../../../overlay/use-controllable-state.mjs";import{useMediaQuery as h}from"../../../overlay/use-media-query.mjs";import{SidebarContext as x,sidebarQueries as y}from"./sidebar-context.mjs";import{jsx as M}from"react/jsx-runtime";function Q({breakpoint:e="md",children:i,collapsed:s,defaultCollapsed:p=!1,defaultOpen:u=!1,id:c,onCollapsedChange:b,onOpenChange:f,open:m}){let v=S(),[o,a]=d({defaultValue:u,onChange:f,value:m}),[l,n]=d({defaultValue:p,onChange:b,value:s}),r=h(y[e]),C=R(null),t=c??`${v}-sidebar`,g=P(()=>({breakpoint:e,collapsed:l,isMobile:r,open:o,panelId:t,setCollapsed:n,setOpen:a,toggleRef:C}),[e,l,r,o,t,n,a]);return M(x.Provider,{value:g,children:i})}export{Q as SidebarProvider};
@@ -0,0 +1 @@
1
+ "use client";import{a as l}from"../../../chunk-AUNT6PUD.mjs";import{forwardRef as y}from"react";import{joinClasses as R}from"../../../overlay/class-names.mjs";import{MenuIcon as P}from"../../../overlay/icons.mjs";import{mergeRefs as M}from"../../../overlay/trigger.mjs";import{useSidebarContext as x}from"./sidebar-context.mjs";import{jsx as a}from"react/jsx-runtime";var C=y(({children:i,className:n,icon:d,label:s="Toggle sidebar",onClick:p,style:g,variant:m="default",...u},b)=>{let{collapsed:t,isMobile:o,open:r,panelId:f,setCollapsed:c,setOpen:T,toggleRef:S}=x("SidebarToggle");return a("button",{"aria-controls":f,"aria-expanded":o?r:!t,"aria-label":s,className:R(m!=="unstyled"&&l.toggle,n),"data-plume-sidebar-toggle":"",onClick:e=>{p?.(e),!e.defaultPrevented&&(o?T(!r):c(!t))},ref:M(b,e=>{S.current=e}),style:g,type:"button",...u,children:i??d??a(P,{})})});C.displayName="SidebarToggle";export{C as SidebarToggle};
@@ -0,0 +1 @@
1
+ "use client";import{a}from"../../../chunk-AUNT6PUD.mjs";import{forwardRef as H,useMemo as g,useState as w}from"react";import{joinClasses as m}from"../../../overlay/class-names.mjs";import{useDismiss as h}from"../../../overlay/use-dismiss.mjs";import{useFocusTrap as A}from"../../../overlay/use-focus-trap.mjs";import{useLayer as E}from"../../../overlay/layer.mjs";import{useScrollLock as F}from"../../../overlay/use-scroll-lock.mjs";import{mergeRefs as N}from"../../../overlay/trigger.mjs";import{SidebarStyleContext as O,useSidebarContext as z}from"./sidebar-context.mjs";import{jsx as b,jsxs as j}from"react/jsx-runtime";var V=(e,i)=>({"--sidebar-contrast":`var(--plume-color-${e}-solid-contrast)`,"--sidebar-solid":`var(--plume-color-${e}-solid)`,"--sidebar-solid-active":`var(--plume-color-${e}-solid-active)`,"--sidebar-solid-hover":`var(--plume-color-${e}-solid-hover)`,"--sidebar-text":`var(--plume-color-${e}-text)`,"--sidebar-tint":`var(--plume-color-${e}-tint)`,"--sidebar-tint-text":`var(--plume-color-${e}-tint-text)`,...i}),I=H(({"aria-label":e,"aria-labelledby":i,backdropClassName:u,children:S,className:c,colorScheme:f="primary",side:v="left",size:y="md",style:C,variant:s="plain",...P},x)=>{let{breakpoint:d,collapsed:k,isMobile:L,open:o,panelId:M,setOpen:l,toggleRef:T}=z("Sidebar"),r=s!=="unstyled",t=L&&o,[n,R]=w(null),p=E(t);h({enabled:t,isTopmost:p,onDismiss:()=>l(!1),outsidePress:!1,elements:[n]}),A(n,{active:t,isTopmost:p,returnFocus:T.current}),F(t);let $=g(()=>({isStyled:r}),[r]),D=t?{"aria-label":e,"aria-labelledby":i,"aria-modal":!0,role:"dialog"}:{};return j(O.Provider,{value:$,children:[b("div",{"aria-hidden":"true",className:m(r&&a.backdrop,u),"data-breakpoint":d,"data-open":o?"":void 0,"data-plume-sidebar-backdrop":"",onClick:()=>l(!1)}),b("div",{className:m(r&&a.sidebar,r&&a[s],r&&a[y],c),"data-breakpoint":d,"data-collapsed":k?"":void 0,"data-open":o?"":void 0,"data-plume-sidebar":"","data-side":v,id:M,ref:N(x,R),style:V(f,C),...D,...P,children:S})]})});I.displayName="Sidebar";export{I as Sidebar};
@@ -0,0 +1 @@
1
+ import{Step as e}from"./step.mjs";import{StepDescription as o}from"./step-description.mjs";import{StepIndicator as i}from"./step-indicator.mjs";import{StepSeparator as a}from"./step-separator.mjs";import{StepTitle as x}from"./step-title.mjs";import{Stepper as f}from"./stepper.mjs";export{e as Step,o as StepDescription,i as StepIndicator,a as StepSeparator,x as StepTitle,f as Stepper};
@@ -0,0 +1 @@
1
+ "use client";import{a as t}from"../../../chunk-T34B4PAZ.mjs";import{forwardRef as a}from"react";import{joinClasses as m}from"../../../overlay/class-names.mjs";import{useStepContext as c,useStepperContext as d}from"./stepper-context.mjs";import{jsx as l}from"react/jsx-runtime";var S=a(({children:e,className:p,style:o,...r},i)=>{let{isStyled:s}=d("StepDescription"),{status:n}=c("StepDescription");return l("span",{className:m(s&&t.description,p),"data-plume-step-description":"","data-state":n,ref:i,style:o,...r,children:e})});S.displayName="StepDescription";export{S as StepDescription};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-T34B4PAZ.mjs";import{forwardRef as l}from"react";import{joinClasses as S}from"../../../overlay/class-names.mjs";import{CheckIcon as u}from"../../../overlay/icons.mjs";import{visuallyHidden as f}from"../../../overlay/visually-hidden.mjs";import{useStepContext as y,useStepperContext as I}from"./stepper-context.mjs";import{jsx as e,jsxs as b}from"react/jsx-runtime";var R=l(({children:p,className:a,style:n,...s},i)=>{let{isStyled:d,statusLabels:m}=I("StepIndicator"),{index:c,status:t}=y("StepIndicator"),o=m[t];return b("span",{className:S(d&&r.indicator,a),"data-plume-step-indicator":"","data-state":t,ref:i,style:n,...s,children:[e("span",{"aria-hidden":"true","data-plume-step-indicator-content":"",children:p??(t==="completed"?e(u,{}):c+1)}),o?e("span",{style:f,children:o}):null]})});R.displayName="StepIndicator";export{R as StepIndicator};
@@ -0,0 +1 @@
1
+ "use client";import{a as e}from"../../../chunk-T34B4PAZ.mjs";import{forwardRef as m}from"react";import{joinClasses as S}from"../../../overlay/class-names.mjs";import{useStepContext as n,useStepperContext as d}from"./stepper-context.mjs";import{jsx as f}from"react/jsx-runtime";var i=m(({className:t,style:r,...o},p)=>{let{isStyled:a}=d("StepSeparator"),{status:s}=n("StepSeparator");return f("span",{"aria-hidden":"true",className:S(a&&e.separator,t),"data-plume-step-separator":"","data-state":s,ref:p,style:r,...o})});i.displayName="StepSeparator";export{i as StepSeparator};
@@ -0,0 +1 @@
1
+ "use client";import{a as t}from"../../../chunk-T34B4PAZ.mjs";import{forwardRef as a}from"react";import{joinClasses as m}from"../../../overlay/class-names.mjs";import{useStepContext as n,useStepperContext as S}from"./stepper-context.mjs";import{jsx as T}from"react/jsx-runtime";var d=a(({children:e,className:p,style:o,...r},i)=>{let{isStyled:s}=S("StepTitle"),{status:l}=n("StepTitle");return T("span",{className:m(s&&t.title,p),"data-plume-step-title":"","data-state":l,ref:i,style:o,...r,children:e})});d.displayName="StepTitle";export{d as StepTitle};
@@ -0,0 +1 @@
1
+ "use client";import{a as p}from"../../../chunk-T34B4PAZ.mjs";import{forwardRef as S,useContext as c,useMemo as l}from"react";import{joinClasses as f}from"../../../overlay/class-names.mjs";import{StepContext as x,StepIndexContext as y,useStepperContext as C}from"./stepper-context.mjs";import{jsx as s}from"react/jsx-runtime";var L=(t,e)=>t<e?"completed":t===e?"current":"upcoming",P=S(({children:t,className:e,style:n,...i},m)=>{let{activeStep:u,isStyled:d}=C("Step"),r=c(y);if(r===void 0)throw new Error("Step must be used within a <Stepper>");let o=L(r,u),a=l(()=>({index:r,status:o}),[r,o]);return s(x.Provider,{value:a,children:s("li",{"aria-current":o==="current"?"step":void 0,className:f(d&&p.step,e),"data-plume-step":"","data-state":o,ref:m,style:n,...i,children:t})})});P.displayName="Step";export{P as Step};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as n,useContext as r}from"react";var o=n(void 0),i=n(void 0),p=n(void 0);function s(t){let e=r(o);if(!e)throw new Error(`${t} must be used within a <Stepper>`);return e}function x(t){let e=r(p);if(!e)throw new Error(`${t} must be used within a <Step>`);return e}export{p as StepContext,i as StepIndexContext,o as StepperContext,x as useStepContext,s as useStepperContext};
@@ -0,0 +1 @@
1
+ "use client";import{a as r}from"../../../chunk-T34B4PAZ.mjs";import{Children as x,forwardRef as b,useMemo as n}from"react";import{joinClasses as v}from"../../../overlay/class-names.mjs";import{StepIndexContext as L,StepperContext as O}from"./stepper-context.mjs";import{jsx as o}from"react/jsx-runtime";var R={completed:"Completed",upcoming:"Not started"},h=(e,p)=>({"--stepper-solid":`var(--plume-color-${e}-solid)`,"--stepper-contrast":`var(--plume-color-${e}-solid-contrast)`,"--stepper-text":`var(--plume-color-${e}-text)`,"--stepper-tint":`var(--plume-color-${e}-tint)`,...p}),M=b(({activeStep:e=0,children:p,className:l,colorScheme:S="primary",orientation:d="horizontal",size:m="md",statusLabels:s,style:u,variant:i="solid",...c},P)=>{let t=i!=="unstyled",a=n(()=>({...R,...s}),[s]),C=n(()=>({activeStep:e,isStyled:t,statusLabels:a}),[e,t,a]);return o(O.Provider,{value:C,children:o("ol",{className:v(t&&r.stepper,t&&r[i],t&&r[m],l),"data-orientation":d,"data-plume-stepper":"",ref:P,style:h(S,u),...c,children:x.map(p,(y,f)=>o(L.Provider,{value:f,children:y}))})})});M.displayName="Stepper";export{M as Stepper};
@@ -1 +1 @@
1
- "use client";import{a as e}from"../../../chunk-LFT6MZ6P.mjs";import{forwardRef as p}from"react";import{OverlayClose as t}from"../../../overlay/overlay-close.mjs";import{usePopoverContext as m}from"./popover-context.mjs";import{jsx as f}from"react/jsx-runtime";var a=p((o,r)=>{let{isStyled:s,setOpen:l}=m("PopoverClose");return f(t,{...o,closeClassName:s?e.close:void 0,onClose:()=>l(!1),ref:r})});a.displayName="PopoverClose";export{a as PopoverClose};
1
+ "use client";import{a as e}from"../../../chunk-4RTWLIQ6.mjs";import{forwardRef as p}from"react";import{OverlayClose as t}from"../../../overlay/overlay-close.mjs";import{usePopoverContext as m}from"./popover-context.mjs";import{jsx as f}from"react/jsx-runtime";var a=p((o,r)=>{let{isStyled:s,setOpen:l}=m("PopoverClose");return f(t,{...o,closeClassName:s?e.close:void 0,onClose:()=>l(!1),ref:r})});a.displayName="PopoverClose";export{a as PopoverClose};
@@ -1 +1 @@
1
- "use client";import{a as e}from"../../../chunk-LFT6MZ6P.mjs";import{forwardRef as T}from"react";import{Portal as H,useFocusTrap as L}from"../../../overlay/index.mjs";import{useFloatingPanel as M}from"../../../overlay/use-floating-panel.mjs";import{mergeRefs as D}from"../../../overlay/trigger.mjs";import{usePopoverContext as F}from"./popover-context.mjs";import{jsx as a}from"react/jsx-runtime";var h=T(({children:s,className:p="",style:l,...m},d)=>{let o=F("PopoverContent"),{contentId:c,flip:f,isStyled:t,offset:P,open:r,placement:u,setOpen:y,shift:g,trigger:i}=o,{isTopmost:v,panel:C,position:n,setPanel:b}=M({anchor:i,enabled:r,flip:f,offset:P,onDismiss:()=>y(!1),placement:u,shift:g});if(L(C,{active:r,isTopmost:v,returnFocus:i}),!r)return null;let R=[t&&e.content,t&&e[o.size],t&&e[o.variant],p].filter(Boolean).join(" ");return a(H,{children:a("dialog",{...m,className:R,"data-placement":n.placement,"data-plume-dialog":"",id:c,open:!0,ref:D(b,d),style:{...n.style,opacity:n.isPositioned?void 0:0,...l},children:s})})});h.displayName="PopoverContent";export{h as PopoverContent};
1
+ "use client";import{a as e}from"../../../chunk-4RTWLIQ6.mjs";import{forwardRef as T}from"react";import{Portal as H,useFocusTrap as L}from"../../../overlay/index.mjs";import{useFloatingPanel as M}from"../../../overlay/use-floating-panel.mjs";import{mergeRefs as D}from"../../../overlay/trigger.mjs";import{usePopoverContext as F}from"./popover-context.mjs";import{jsx as a}from"react/jsx-runtime";var h=T(({children:s,className:p="",style:l,...m},d)=>{let o=F("PopoverContent"),{contentId:c,flip:f,isStyled:t,offset:P,open:r,placement:u,setOpen:y,shift:g,trigger:i}=o,{isTopmost:v,panel:C,position:n,setPanel:b}=M({anchor:i,enabled:r,flip:f,offset:P,onDismiss:()=>y(!1),placement:u,shift:g});if(L(C,{active:r,isTopmost:v,returnFocus:i}),!r)return null;let R=[t&&e.content,t&&e[o.size],t&&e[o.variant],p].filter(Boolean).join(" ");return a(H,{children:a("dialog",{...m,className:R,"data-placement":n.placement,"data-plume-dialog":"",id:c,open:!0,ref:D(b,d),style:{...n.style,opacity:n.isPositioned?void 0:0,...l},children:s})})});h.displayName="PopoverContent";export{h as PopoverContent};
@@ -1 +1 @@
1
- "use client";import{a as o}from"../../../chunk-LWLHCHAV.mjs";import{forwardRef as R,useId as h}from"react";import{joinClasses as i}from"../../../overlay/class-names.mjs";import{CloseIcon as M}from"../../../overlay/icons.mjs";import{tagColorVars as x}from"../shared/tag-vars.mjs";var t={chip:"_chip_plt30_19",disabled:"_disabled_plt30_27",icon:"_icon_plt30_32",label:"_label_plt30_46",remove:"_remove_plt30_53"};import{jsx as a,jsxs as H}from"react/jsx-runtime";var E=R(({children:b,className:u="",classNames:l,colorScheme:C="secondary",disabled:p=!1,icon:r,onRemove:n,removeLabel:s,shape:f="pill",size:y="md",style:_,variant:d="subtle",...v},P)=>{let e=d!=="unstyled",m=h(),c=h(),S=i(e&&t.chip,e&&o[y],e&&o[f],e&&o[d],e&&p&&t.disabled,u);return H("span",{className:S,"data-plume-chip":"",ref:P,style:x("chip",C,_),...v,children:[r?a("span",{"aria-hidden":"true",className:i(e&&t.icon,l?.icon),children:r}):null,a("span",{className:i(e&&t.label,l?.label),id:m,children:b}),n?a("button",{"aria-label":s??"Remove","aria-labelledby":s?void 0:`${c} ${m}`,className:i(e&&t.remove,l?.remove),"data-plume-chip-remove":"",disabled:p,id:c,onClick:n,type:"button",children:a(M,{})}):null]})});E.displayName="Chip";export{E as Chip};
1
+ "use client";import{a as o}from"../../../chunk-LWLHCHAV.mjs";import{forwardRef as w,useId as h}from"react";import{joinClasses as i}from"../../../overlay/class-names.mjs";import{CloseIcon as R}from"../../../overlay/icons.mjs";import{tagColorVars as z}from"../shared/tag-vars.mjs";var t={chip:"_chip_zflwj_19",disabled:"_disabled_zflwj_27",icon:"_icon_zflwj_32",label:"_label_zflwj_46",remove:"_remove_zflwj_53"};import{jsx as a,jsxs as x}from"react/jsx-runtime";var M=w(({children:b,className:u="",classNames:l,colorScheme:f="secondary",disabled:r=!1,icon:p,onRemove:n,removeLabel:s,shape:C="pill",size:y="md",style:_,variant:d="subtle",...v},P)=>{let e=d!=="unstyled",m=h(),c=h(),S=i(e&&t.chip,e&&o[y],e&&o[C],e&&o[d],e&&r&&t.disabled,u);return x("span",{className:S,"data-plume-chip":"",ref:P,style:z("chip",f,_),...v,children:[p?a("span",{"aria-hidden":"true",className:i(e&&t.icon,l?.icon),children:p}):null,a("span",{className:i(e&&t.label,l?.label),id:m,children:b}),n?a("button",{"aria-label":s??"Remove","aria-labelledby":s?void 0:`${c} ${m}`,className:i(e&&t.remove,l?.remove),"data-plume-chip-remove":"",disabled:r,id:c,onClick:n,type:"button",children:a(R,{})}):null]})});M.displayName="Chip";export{M as Chip};