@wisemen/vue-core-design-system 1.17.0 → 1.18.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.
package/dist/index.cjs CHANGED
@@ -680,10 +680,10 @@ Example: <UIConfigProvider :file-upload-adapter="myAdapter"><UIBaseFileUploadRoo
680
680
  group-focus-visible:opacity-100
681
681
  group-active:h-28 group-active:-translate-x-2 group-active:scale-100
682
682
  group-active:opacity-100 group-active:brightness-95
683
- `},variants:{variant:{"bordered-inline":{pane:`
683
+ `},variants:{variant:{"bordered-inline":{content:`rounded-lg`,pane:`
684
684
  inset-y-2 right-2 rounded-lg border border-secondary shadow-floating
685
685
  max-md:inset-2! max-md:w-auto!
686
- `,resizeHandle:`-inset-y-2`},"bordered-overlay":{pane:`
686
+ `,resizeHandle:`-inset-y-2`},"bordered-overlay":{content:`rounded-lg`,pane:`
687
687
  inset-y-2 right-2 rounded-lg border border-secondary shadow-floating
688
688
  max-md:inset-2! max-md:w-auto!
689
689
  `,resizeHandle:`-inset-y-2`},"full-height-inline":{pane:`
@@ -858,7 +858,7 @@ Example: <UIConfigProvider :file-upload-adapter="myAdapter"><UIBaseFileUploadRoo
858
858
  dark:text-warning-200
859
859
  `},color:`warning`,variant:`translucent`}],slots:{base:`
860
860
  inline-flex min-w-fit items-center justify-center rounded-full border
861
- `,label:`font-medium`},variants:{size:{lg:{base:`h-5 min-w-5 px-xxs`,label:`text-xs`},md:{base:`h-4 min-w-4 px-xxs`,label:`text-[0.625rem]`}},color:{blue:{},brand:{},error:{},gray:{},pink:{},purple:{},success:{},warning:{}},variant:{outline:{base:`bg-transparent`},solid:{},translucent:{}}}}),RE=[`aria-label`],zE=(0,f.defineComponent)({__name:`NumberBadge`,props:{ariaLabel:{default:null},color:{default:`gray`},size:{default:`md`},value:{},variant:{default:`translucent`}},setup(e){let t=e,n=(0,f.computed)(()=>LE({color:t.color,size:t.size,variant:t.variant}));return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(`span`,{class:(0,f.normalizeClass)(n.value.base()),"aria-label":t.ariaLabel??void 0,role:`status`},[(0,f.createVNode)((0,f.unref)(U),{text:t.value,class:(0,f.normalizeClass)(n.value.label())},null,8,[`text`,`class`])],10,RE))}}),BE=(0,f.defineComponent)({__name:`TabsItemContent`,props:{isLabelHidden:{type:Boolean,default:!1},count:{default:null},icon:{default:void 0},label:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,[t.icon==null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{key:0,class:`size-4 shrink-0`})),(0,f.createVNode)((0,f.unref)(U),{text:t.label,class:(0,f.normalizeClass)([{"sr-only":t.isLabelHidden},`text-xs`])},null,8,[`text`,`class`]),t.count==null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(zE),{key:1,value:t.count.toString(),size:`md`},null,8,[`value`]))],64))}}),VE=(0,f.defineComponent)({__name:`TabsItem`,props:{isLabelHidden:{type:Boolean},count:{default:null},disabledReason:{default:null},icon:{default:void 0},label:{},value:{},isDisabled:{type:Boolean,default:!1}},setup(e){let t=e,n=NE();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(W),{"is-disabled":t.disabledReason==null,label:t.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.TabsTrigger),{value:t.value,disabled:t.isDisabled,class:(0,f.normalizeClass)((0,f.unref)(n).variants.value.item())},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(BE,{count:t.count,icon:t.icon,"is-label-hidden":t.isLabelHidden,label:t.label},null,8,[`count`,`icon`,`is-label-hidden`,`label`])]),_:1},8,[`value`,`disabled`,`class`])]),_:1})]),_:1},8,[`is-disabled`,`label`]))}}),HE=(0,f.defineComponent)({__name:`TabsIndicator`,setup(e){let{variants:t}=NE();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TabsIndicator),{class:(0,f.normalizeClass)((0,f.unref)(t).indicator())},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(t).indicatorInner())},null,2)]),_:1},8,[`class`]))}}),UE=[`aria-label`],WE=[`data-orientation`],GE=[`aria-label`],KE=(0,f.defineComponent)({__name:`TabsList`,setup(e){let t=(0,g.useI18n)(),n=(0,f.ref)(null),{hasHorizontalOverflow:r,hasReachedHorizontalEnd:i,isScrolledHorizontally:a,orientation:o,scrollToLeft:s,scrollToRight:c,setScrollContainerRef:l,variants:u}=NE();return(0,f.onMounted)(()=>{if(n.value===null)throw Error(`scrollContainerRef is null`);l(n.value)}),(e,l)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(u).base())},[(0,f.unref)(a)&&(0,f.unref)(r)&&(0,f.unref)(o)===`horizontal`?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,class:(0,f.normalizeClass)([(0,f.unref)(u).scrollEdge(),`left-0 justify-start bg-linear-to-r from-50%`])},[(0,f.createElementVNode)(`button`,{"aria-label":(0,f.unref)(t).t(`component.tabs.scroll_left`),class:(0,f.normalizeClass)((0,f.unref)(u).scrollButton()),tabindex:`-1`,type:`button`,onClick:l[0]||=(...e)=>(0,f.unref)(s)&&(0,f.unref)(s)(...e)},[(0,f.createVNode)((0,f.unref)(ln),{class:`size-3`})],10,UE)],2)):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`div`,{ref_key:`scrollContainerRef`,ref:n,class:(0,f.normalizeClass)((0,f.unref)(u).scrollContainer()),"data-orientation":(0,f.unref)(o)},[(0,f.createVNode)((0,f.unref)(h.TabsList),{class:(0,f.normalizeClass)((0,f.unref)(u).list())},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`),(0,f.createVNode)(HE)]),_:3},8,[`class`])],10,WE),!(0,f.unref)(i)&&(0,f.unref)(r)&&(0,f.unref)(o)===`horizontal`?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:1,class:(0,f.normalizeClass)([(0,f.unref)(u).scrollEdge(),`right-0 justify-end bg-linear-to-l from-50%`])},[(0,f.createElementVNode)(`button`,{"aria-label":(0,f.unref)(t).t(`component.tabs.scroll_right`),class:(0,f.normalizeClass)((0,f.unref)(u).scrollButton()),tabindex:`-1`,type:`button`,onClick:l[1]||=(...e)=>(0,f.unref)(c)&&(0,f.unref)(c)(...e)},[(0,f.createVNode)((0,f.unref)(pn),{class:`size-3`})],10,GE)],2)):(0,f.createCommentVNode)(``,!0)],2))}}),qE=(0,f.defineComponent)({__name:`TabsRouterLink`,props:{isFullWidth:{type:Boolean,default:!1},orientation:{default:`horizontal`},underlineTabsHorizontalListPadding:{default:`none`},variant:{default:`underline`}},setup(e){let t=e;t.underlineTabsHorizontalListPadding!==`none`&&t.variant!==`underline`&&console.warn("[TabsRouterLink] `underlineTabsHorizontalListPadding` only applies to the `underline` variant.");let n=(0,y.useRoute)(),r=(0,y.useRouter)(),i=(0,f.computed)(()=>n.name);function a(e){e!==i.value&&r.replace({name:e})}let{hasHorizontalOverflow:o,hasReachedHorizontalEnd:s,isScrolledHorizontally:c,scrollToActiveTab:l,scrollToLeft:u,scrollToRight:d,setScrollContainerRef:p}=jE({activeValue:i}),m=(0,f.computed)(()=>PE({isFullWidth:t.isFullWidth,underlineTabsHorizontalListPadding:t.underlineTabsHorizontalListPadding,variant:t.variant}));return(0,f.onMounted)(()=>{l()}),ME({activeValue:i,...Xr(t),hasHorizontalOverflow:o,hasReachedHorizontalEnd:s,isScrolledHorizontally:c,scrollToLeft:u,scrollToRight:d,setScrollContainerRef:p,variants:m}),(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TabsRoot),{"model-value":i.value,orientation:t.orientation,"onUpdate:modelValue":a},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(KE,null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]),_:3},8,[`model-value`,`orientation`]))}}),JE=(0,f.defineComponent)({__name:`TabsRouterLinkContent`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,role:`tabpanel`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterView))]),_:1}))}}),YE=(0,f.defineComponent)({__name:`TabsRouterLinkItem`,props:{isLabelHidden:{type:Boolean},count:{default:null},disabledReason:{default:null},icon:{default:void 0},label:{},to:{},isDisabled:{type:Boolean,default:!1}},setup(e){let t=e,n=NE().variants,r=(0,y.useRouter)(),i=(0,f.computed)(()=>r.resolve(t.to).name);return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(W),{"is-disabled":t.disabledReason==null,label:t.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,null,[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.TabsTrigger),{value:i.value,disabled:t.isDisabled,"as-child":!0,class:(0,f.normalizeClass)((0,f.unref)(n).item())},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:t.to,replace:!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(BE,{count:t.count,icon:t.icon,"is-label-hidden":t.isLabelHidden,label:t.label},null,8,[`count`,`icon`,`is-label-hidden`,`label`])]),_:1},8,[`to`])]),_:1},8,[`value`,`disabled`,`class`])]),_:1})])]),_:1},8,[`is-disabled`,`label`]))}}),XE=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabs`,props:{modelValue:{required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=(0,f.useModel)(e,`modelValue`);return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(FE),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"is-full-width":!0,variant:`underline`,"underline-tabs-horizontal-list-padding":`lg`,class:`flex flex-1 flex-col overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`]))}}),ZE=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabsContent`,props:{asChild:{type:Boolean,default:!0},value:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(IE),{"as-child":t.asChild,value:t.value,tabindex:t.asChild?void 0:-1},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Iy),{tabindex:`0`,class:`flex flex-1 flex-col`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]),_:3},8,[`as-child`,`value`,`tabindex`]))}}),QE={class:`sticky top-0 z-10 bg-primary`},$E=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabsList`,setup(e){let{hasTabs:t}=rE();return(0,f.onMounted)(()=>{t.value=!0}),(0,f.onBeforeUnmount)(()=>{t.value=!1}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,QE,[(0,f.createVNode)((0,f.unref)(KE),null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]))}}),eD=(0,f.defineComponent)({__name:`DashboardPageDetailPaneToggle`,setup(e){let{isOpen:t,toggle:n}=hE(),r=(0,g.useI18n)(),i=(0,p.createAction)({id:`toggle-detail-pane`,name:()=>r.t(`action.global.toggle_detail_pane.name`),execute:()=>{n()},group:(0,p.useActionGroup)().navigation,icon:()=>t.value?$n:Vn,keyboardShortcut:{key:`I`,mod:!0},keywords:r.t(`action.global.toggle_detail_pane.keywords`).split(` `)}),a=(0,f.computed)(()=>t.value?r.t(`component.dashboard_page_detail_pane_toggle.collapse`):r.t(`component.dashboard_page_detail_pane_toggle.expand`));return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(W,{label:a.value,"keyboard-shortcut":(0,f.unref)(i).keyboardShortcut},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Cs,{"is-current-context-only":!1,action:(0,f.unref)(i),"group-priority":(0,f.unref)(p.GroupPriority).NAVIGATION},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.Toggle),{"model-value":(0,f.unref)(t),"data-state":(0,f.unref)(t)?`open`:`closed`,"aria-label":a.value,class:`group/toggle -mr-xxs flex size-6 items-center justify-center rounded-sm duration-150 hover:bg-secondary-hover`},{default:(0,f.withCtx)(()=>[...n[0]||=[(0,f.createElementVNode)(`div`,{class:`flex h-3 w-3.5 justify-end rounded-[0.1875rem] border border-fg-tertiary p-[0.09375rem] duration-150 group-data-[state=open]/toggle:border-fg-tertiary dark:group-data-[state=open]/toggle:border-fg-secondary`},[(0,f.createElementVNode)(`div`,{class:`h-full w-0.5 rounded-[1px] bg-fg-tertiary duration-150 group-data-[state=open]/toggle:w-1 group-data-[state=open]/toggle:bg-fg-tertiary dark:group-data-[state=open]/toggle:bg-fg-secondary`})],-1)]]),_:1},8,[`model-value`,`data-state`,`aria-label`])]),_:1})]),_:1},8,[`action`,`group-priority`])]),_:1},8,[`label`,`keyboard-shortcut`]))}}),tD=(0,f.defineComponent)({__name:`DashboardPageHeaderActions`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),nD={class:`border-b border-secondary`},rD={class:`flex h-11 items-center`},iD={key:0,class:`flex h-11 items-center border-t border-secondary`},aD=(0,f.defineComponent)({__name:`DashboardPageHeader`,setup(e){let t=(0,f.useSlots)(),n=(0,m.useBreakpoints)({lg:1024}).smaller(`lg`),r=(0,f.computed)(()=>!!t[`action-right`]);return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`header`,nD,[(0,f.createElementVNode)(`div`,rD,[(0,f.createVNode)(qT,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`between`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{gap:`none`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`action-left`)]),_:3}),(0,f.renderSlot)(e.$slots,`action-center`),(0,f.createVNode)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.unref)(n)?(0,f.createCommentVNode)(``,!0):(0,f.renderSlot)(e.$slots,`action-right`,{key:0}),(0,f.createVNode)(tD,null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`master-actions`)]),_:3})]),_:3})]),_:3})]),_:3})]),(0,f.unref)(n)&&r.value?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,iD,[(0,f.createVNode)(qT,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`end`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`action-right`)]),_:3})]),_:3})]),_:3})])):(0,f.createCommentVNode)(``,!0)]))}}),oD=(0,f.defineComponent)({__name:`DashboardPageHeaderMasterActionButton`,props:{icon:{},label:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(X,{icon:t.icon,label:t.label,variant:`tertiary`},null,8,[`icon`,`label`]))}});function sD({maxDate:e,minDate:t,modelValue:n}){let r=J(),i=(0,f.computed)(()=>r.dateLocale.value??navigator.language),a=S.Temporal.Now.plainDateISO(),o=(0,f.shallowRef)(new x.CalendarDate(a.year,a.month,a.day));function s(e){o.value=e}function c(e){return new x.CalendarDate(e.year,e.month,e.day)}function l(e){return S.Temporal.PlainDate.from({day:e.day,month:e.month,year:e.year})}let u=(0,f.computed)({get:()=>{if(n.value!==null)return c(n.value)},set:e=>{e==null?n.value=null:n.value=l(e)}}),d=(0,f.computed)(()=>{if(t.value!=null)return c(t.value)});return{plainDateToCalendarDate:c,calendarPlaceholder:o,calendarValue:u,locale:i,maxDateValue:(0,f.computed)(()=>{if(e.value!=null)return c(e.value)}),minDateValue:d,setPlaceholder:s}}var cD=V({slots:{field:`flex h-full flex-1 items-center px-sm`,literal:`text-placeholder select-none`,segment:`
861
+ `,label:`font-medium`},variants:{size:{lg:{base:`h-5 min-w-5 px-xxs`,label:`text-xs`},md:{base:`h-4 min-w-4 px-xxs`,label:`text-[0.625rem]`}},color:{blue:{},brand:{},error:{},gray:{},pink:{},purple:{},success:{},warning:{}},variant:{outline:{base:`bg-transparent`},solid:{},translucent:{}}}}),RE=[`aria-label`],zE=(0,f.defineComponent)({__name:`NumberBadge`,props:{ariaLabel:{default:null},color:{default:`gray`},size:{default:`md`},value:{},variant:{default:`translucent`}},setup(e){let t=e,n=(0,f.computed)(()=>LE({color:t.color,size:t.size,variant:t.variant}));return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(`span`,{class:(0,f.normalizeClass)(n.value.base()),"aria-label":t.ariaLabel??void 0,role:`status`},[(0,f.createVNode)((0,f.unref)(U),{text:t.value,class:(0,f.normalizeClass)(n.value.label())},null,8,[`text`,`class`])],10,RE))}}),BE=(0,f.defineComponent)({__name:`TabsItemContent`,props:{isLabelHidden:{type:Boolean,default:!1},config:{default:null},count:{default:null},icon:{default:void 0},label:{}},setup(e){let t=e,n=(0,f.computed)(()=>t.config?.left==null?t.icon==null?{type:`none`}:{icon:t.icon,type:`icon`}:t.config.left),r=(0,f.computed)(()=>t.config?.indicator==null?t.count==null?{type:`none`}:{type:`count`,value:t.count}:t.config.indicator);return(e,i)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,[n.value.type===`icon`?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.value.icon),{key:0,class:`size-4 shrink-0`})):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(U),{text:t.label,class:(0,f.normalizeClass)([{"sr-only":t.isLabelHidden},`text-xs`])},null,8,[`text`,`class`]),r.value.type===`count`?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(zE),{key:1,value:r.value.value.toString(),size:`md`},null,8,[`value`])):r.value.type===`dot`?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Po),{key:2,color:r.value.color??`error`,size:`sm`},null,8,[`color`])):(0,f.createCommentVNode)(``,!0)],64))}}),VE=(0,f.defineComponent)({__name:`TabsItem`,props:{isLabelHidden:{type:Boolean},config:{default:null},count:{default:null},disabledReason:{default:null},icon:{default:void 0},label:{},value:{},isDisabled:{type:Boolean,default:!1}},setup(e){let t=e,n=NE();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(W),{"is-disabled":t.disabledReason==null,label:t.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.TabsTrigger),{value:t.value,disabled:t.isDisabled,class:(0,f.normalizeClass)((0,f.unref)(n).variants.value.item())},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(BE,{config:t.config,count:t.count,icon:t.icon,"is-label-hidden":t.isLabelHidden,label:t.label},null,8,[`config`,`count`,`icon`,`is-label-hidden`,`label`])]),_:1},8,[`value`,`disabled`,`class`])]),_:1})]),_:1},8,[`is-disabled`,`label`]))}}),HE=(0,f.defineComponent)({__name:`TabsIndicator`,setup(e){let{variants:t}=NE();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TabsIndicator),{class:(0,f.normalizeClass)((0,f.unref)(t).indicator())},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(t).indicatorInner())},null,2)]),_:1},8,[`class`]))}}),UE=[`aria-label`],WE=[`data-orientation`],GE=[`aria-label`],KE=(0,f.defineComponent)({__name:`TabsList`,setup(e){let t=(0,g.useI18n)(),n=(0,f.ref)(null),{hasHorizontalOverflow:r,hasReachedHorizontalEnd:i,isScrolledHorizontally:a,orientation:o,scrollToLeft:s,scrollToRight:c,setScrollContainerRef:l,variants:u}=NE();return(0,f.onMounted)(()=>{if(n.value===null)throw Error(`scrollContainerRef is null`);l(n.value)}),(e,l)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(u).base())},[(0,f.unref)(a)&&(0,f.unref)(r)&&(0,f.unref)(o)===`horizontal`?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,class:(0,f.normalizeClass)([(0,f.unref)(u).scrollEdge(),`left-0 justify-start bg-linear-to-r from-50%`])},[(0,f.createElementVNode)(`button`,{"aria-label":(0,f.unref)(t).t(`component.tabs.scroll_left`),class:(0,f.normalizeClass)((0,f.unref)(u).scrollButton()),tabindex:`-1`,type:`button`,onClick:l[0]||=(...e)=>(0,f.unref)(s)&&(0,f.unref)(s)(...e)},[(0,f.createVNode)((0,f.unref)(ln),{class:`size-3`})],10,UE)],2)):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`div`,{ref_key:`scrollContainerRef`,ref:n,class:(0,f.normalizeClass)((0,f.unref)(u).scrollContainer()),"data-orientation":(0,f.unref)(o)},[(0,f.createVNode)((0,f.unref)(h.TabsList),{class:(0,f.normalizeClass)((0,f.unref)(u).list())},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`),(0,f.createVNode)(HE)]),_:3},8,[`class`])],10,WE),!(0,f.unref)(i)&&(0,f.unref)(r)&&(0,f.unref)(o)===`horizontal`?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:1,class:(0,f.normalizeClass)([(0,f.unref)(u).scrollEdge(),`right-0 justify-end bg-linear-to-l from-50%`])},[(0,f.createElementVNode)(`button`,{"aria-label":(0,f.unref)(t).t(`component.tabs.scroll_right`),class:(0,f.normalizeClass)((0,f.unref)(u).scrollButton()),tabindex:`-1`,type:`button`,onClick:l[1]||=(...e)=>(0,f.unref)(c)&&(0,f.unref)(c)(...e)},[(0,f.createVNode)((0,f.unref)(pn),{class:`size-3`})],10,GE)],2)):(0,f.createCommentVNode)(``,!0)],2))}}),qE=(0,f.defineComponent)({__name:`TabsRouterLink`,props:{isFullWidth:{type:Boolean,default:!1},orientation:{default:`horizontal`},underlineTabsHorizontalListPadding:{default:`none`},variant:{default:`underline`}},setup(e){let t=e;t.underlineTabsHorizontalListPadding!==`none`&&t.variant!==`underline`&&console.warn("[TabsRouterLink] `underlineTabsHorizontalListPadding` only applies to the `underline` variant.");let n=(0,y.useRoute)(),r=(0,y.useRouter)(),i=(0,f.computed)(()=>n.name);function a(e){e!==i.value&&r.replace({name:e})}let{hasHorizontalOverflow:o,hasReachedHorizontalEnd:s,isScrolledHorizontally:c,scrollToActiveTab:l,scrollToLeft:u,scrollToRight:d,setScrollContainerRef:p}=jE({activeValue:i}),m=(0,f.computed)(()=>PE({isFullWidth:t.isFullWidth,underlineTabsHorizontalListPadding:t.underlineTabsHorizontalListPadding,variant:t.variant}));return(0,f.onMounted)(()=>{l()}),ME({activeValue:i,...Xr(t),hasHorizontalOverflow:o,hasReachedHorizontalEnd:s,isScrolledHorizontally:c,scrollToLeft:u,scrollToRight:d,setScrollContainerRef:p,variants:m}),(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TabsRoot),{"model-value":i.value,orientation:t.orientation,"onUpdate:modelValue":a},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(KE,null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]),_:3},8,[`model-value`,`orientation`]))}}),JE=(0,f.defineComponent)({__name:`TabsRouterLinkContent`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,role:`tabpanel`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterView))]),_:1}))}}),YE=(0,f.defineComponent)({__name:`TabsRouterLinkItem`,props:{isLabelHidden:{type:Boolean},config:{default:null},count:{default:null},disabledReason:{default:null},icon:{default:void 0},label:{},to:{},isDisabled:{type:Boolean,default:!1}},setup(e){let t=e,n=NE().variants,r=(0,y.useRouter)(),i=(0,f.computed)(()=>r.resolve(t.to).name);return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(W),{"is-disabled":t.disabledReason==null,label:t.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,null,[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.TabsTrigger),{value:i.value,disabled:t.isDisabled,"as-child":!0,class:(0,f.normalizeClass)((0,f.unref)(n).item())},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:t.to,replace:!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(BE,{config:t.config,count:t.count,icon:t.icon,"is-label-hidden":t.isLabelHidden,label:t.label},null,8,[`config`,`count`,`icon`,`is-label-hidden`,`label`])]),_:1},8,[`to`])]),_:1},8,[`value`,`disabled`,`class`])]),_:1})])]),_:1},8,[`is-disabled`,`label`]))}}),XE=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabs`,props:{modelValue:{required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=(0,f.useModel)(e,`modelValue`);return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(FE),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"is-full-width":!0,variant:`underline`,"underline-tabs-horizontal-list-padding":`lg`,class:`flex flex-1 flex-col overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`]))}}),ZE=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabsContent`,props:{asChild:{type:Boolean,default:!0},value:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(IE),{"as-child":t.asChild,value:t.value,tabindex:t.asChild?void 0:-1},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Iy),{tabindex:`0`,class:`flex flex-1 flex-col`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]),_:3},8,[`as-child`,`value`,`tabindex`]))}}),QE={class:`sticky top-0 z-10 bg-primary`},$E=(0,f.defineComponent)({__name:`DashboardPageDetailPaneTabsList`,setup(e){let{hasTabs:t}=rE();return(0,f.onMounted)(()=>{t.value=!0}),(0,f.onBeforeUnmount)(()=>{t.value=!1}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,QE,[(0,f.createVNode)((0,f.unref)(KE),null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]))}}),eD=(0,f.defineComponent)({__name:`DashboardPageDetailPaneToggle`,setup(e){let{isOpen:t,toggle:n}=hE(),r=(0,g.useI18n)(),i=(0,p.createAction)({id:`toggle-detail-pane`,name:()=>r.t(`action.global.toggle_detail_pane.name`),execute:()=>{n()},group:(0,p.useActionGroup)().navigation,icon:()=>t.value?$n:Vn,keyboardShortcut:{key:`I`,mod:!0},keywords:r.t(`action.global.toggle_detail_pane.keywords`).split(` `)}),a=(0,f.computed)(()=>t.value?r.t(`component.dashboard_page_detail_pane_toggle.collapse`):r.t(`component.dashboard_page_detail_pane_toggle.expand`));return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(W,{label:a.value,"keyboard-shortcut":(0,f.unref)(i).keyboardShortcut},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Cs,{"is-current-context-only":!1,action:(0,f.unref)(i),"group-priority":(0,f.unref)(p.GroupPriority).NAVIGATION},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.Toggle),{"model-value":(0,f.unref)(t),"data-state":(0,f.unref)(t)?`open`:`closed`,"aria-label":a.value,class:`group/toggle -mr-xxs flex size-6 items-center justify-center rounded-sm duration-150 hover:bg-secondary-hover`},{default:(0,f.withCtx)(()=>[...n[0]||=[(0,f.createElementVNode)(`div`,{class:`flex h-3 w-3.5 justify-end rounded-[0.1875rem] border border-fg-tertiary p-[0.09375rem] duration-150 group-data-[state=open]/toggle:border-fg-tertiary dark:group-data-[state=open]/toggle:border-fg-secondary`},[(0,f.createElementVNode)(`div`,{class:`h-full w-0.5 rounded-[1px] bg-fg-tertiary duration-150 group-data-[state=open]/toggle:w-1 group-data-[state=open]/toggle:bg-fg-tertiary dark:group-data-[state=open]/toggle:bg-fg-secondary`})],-1)]]),_:1},8,[`model-value`,`data-state`,`aria-label`])]),_:1})]),_:1},8,[`action`,`group-priority`])]),_:1},8,[`label`,`keyboard-shortcut`]))}}),tD=(0,f.defineComponent)({__name:`DashboardPageHeaderActions`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),nD={class:`border-b border-secondary`},rD={class:`flex h-11 items-center`},iD={key:0,class:`flex h-11 items-center border-t border-secondary`},aD=(0,f.defineComponent)({__name:`DashboardPageHeader`,setup(e){let t=(0,f.useSlots)(),n=(0,m.useBreakpoints)({lg:1024}).smaller(`lg`),r=(0,f.computed)(()=>!!t[`action-right`]);return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`header`,nD,[(0,f.createElementVNode)(`div`,rD,[(0,f.createVNode)(qT,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`between`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{gap:`none`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`action-left`)]),_:3}),(0,f.renderSlot)(e.$slots,`action-center`),(0,f.createVNode)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.unref)(n)?(0,f.createCommentVNode)(``,!0):(0,f.renderSlot)(e.$slots,`action-right`,{key:0}),(0,f.createVNode)(tD,null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`master-actions`)]),_:3})]),_:3})]),_:3})]),_:3})]),(0,f.unref)(n)&&r.value?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,iD,[(0,f.createVNode)(qT,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`end`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`action-right`)]),_:3})]),_:3})]),_:3})])):(0,f.createCommentVNode)(``,!0)]))}}),oD=(0,f.defineComponent)({__name:`DashboardPageHeaderMasterActionButton`,props:{icon:{},label:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(X,{icon:t.icon,label:t.label,variant:`tertiary`},null,8,[`icon`,`label`]))}});function sD({maxDate:e,minDate:t,modelValue:n}){let r=J(),i=(0,f.computed)(()=>r.dateLocale.value??navigator.language),a=n.value??S.Temporal.Now.plainDateISO(),o=(0,f.shallowRef)(new x.CalendarDate(a.year,a.month,a.day));function s(e){o.value=e}(0,f.watch)(n,e=>{e!==null&&(o.value=new x.CalendarDate(e.year,e.month,e.day))});function c(e){return new x.CalendarDate(e.year,e.month,e.day)}function l(e){return S.Temporal.PlainDate.from({day:e.day,month:e.month,year:e.year})}let u=(0,f.computed)({get:()=>{if(n.value!==null)return c(n.value)},set:e=>{e==null?n.value=null:n.value=l(e)}}),d=(0,f.computed)(()=>{if(t.value!=null)return c(t.value)});return{plainDateToCalendarDate:c,calendarPlaceholder:o,calendarValue:u,locale:i,maxDateValue:(0,f.computed)(()=>{if(e.value!=null)return c(e.value)}),minDateValue:d,setPlaceholder:s}}var cD=V({slots:{field:`flex h-full flex-1 items-center px-sm`,literal:`text-placeholder select-none`,segment:`
862
862
  rounded-xs px-xxs text-primary tabular-nums caret-transparent outline-none
863
863
  group-data-disabled/field-wrapper:pointer-events-none
864
864
  hover:bg-secondary-hover hover:text-primary
@@ -1016,9 +1016,9 @@ Example: <UIConfigProvider :file-upload-adapter="myAdapter"><UIBaseFileUploadRoo
1016
1016
  outline-none
1017
1017
  disabled:cursor-not-allowed
1018
1018
  `}}),vA=(0,f.defineComponent)({__name:`RadioGroupIndicator`,setup(e){let{radioGroupStyle:t}=gA();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.RadioGroupIndicator),{class:(0,f.normalizeClass)((0,f.unref)(t).indicator()),"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.Motion),{initial:{opacity:0,scale:1.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.5},transition:{duration:.3,type:`spring`,bounce:0}})]),_:1},8,[`class`])]),_:1}))}}),yA=(0,f.defineComponent)({__name:`BaseRadioGroup`,props:{id:{},isLabelHidden:{type:Boolean,default:!1},description:{default:null},label:{},value:{},isDisabled:{type:Boolean,default:!1},disabledReason:{default:null}},emits:[`blur`,`focus`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>_A());return hA({radioGroupStyle:i}),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":!n.isDisabled||n.disabledReason==null,label:n.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.RadioGroupItem),{id:n.id??void 0,disabled:n.isDisabled,value:n.value,class:(0,f.normalizeClass)(i.value.root()),onBlur:t[0]||=e=>r(`blur`),onFocus:t[1]||=e=>r(`focus`)},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{align:`start`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)(i.value.control())},[(0,f.createVNode)(vA)],2),(0,f.createVNode)(G,{class:(0,f.normalizeClass)(n.isLabelHidden&&`sr-only`),gap:`none`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(U),{text:n.label,class:(0,f.normalizeClass)(i.value.label())},null,8,[`text`,`class`]),n.description?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:0,text:n.description,class:(0,f.normalizeClass)(i.value.description())},null,8,[`text`,`class`])):(0,f.createCommentVNode)(``,!0)]),_:1},8,[`class`])]),_:1})]),_:1},8,[`id`,`disabled`,`value`,`class`])]),_:1},8,[`is-disabled`,`label`]))}}),bA=(0,f.defineComponent)({__name:`RadioGroupItem`,props:(0,f.mergeDefaults)({id:{},isLabelHidden:{type:Boolean},description:{},label:{},value:{},isDisabled:{type:Boolean},disabledReason:{}},{...mA}),setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(yA,(0,f.normalizeProps)((0,f.guardReactiveProps)(t)),null,16))}}),[xA,SA]=F(`radioGroupContext`),CA=(0,f.defineComponent)({__name:`RadioGroupRoot`,props:(0,f.mergeModels)({orientation:{default:`vertical`},id:{},isReadonly:{type:Boolean},isRequired:{type:Boolean},name:{},class:{},style:{},isDisabled:{type:Boolean,default:!1},disabledReason:{default:null},isErrorMessageHidden:{type:Boolean,default:!1},isHorizontal:{type:Boolean},isLabelHidden:{type:Boolean},errorMessage:{},for:{},helpText:{},hideErrorMessage:{type:Boolean,default:!1},hint:{},label:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=(0,f.useModel)(e,`modelValue`);return xA({isDisabled:(0,f.computed)(()=>t.isDisabled),modelValue:n,orientation:(0,f.computed)(()=>t.orientation)}),(e,r)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":!t.isDisabled||t.disabledReason==null,label:t.disabledReason},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.RadioGroupRoot),{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,orientation:t.orientation,disabled:t.isDisabled},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`orientation`,`disabled`])]),_:3},8,[`is-disabled`,`label`]))}}),wA=/Mobi|Android/i;function TA(){return wA.test(navigator.userAgent)}var EA=(0,f.defineComponent)({__name:`RelativeDateTime`,props:{dateTime:{},leadingText:{default:null}},setup(e){let t=e,n=(0,f.useAttrs)(),r=S.Temporal.Now.instant(),i=(0,C.useDateTimeFormat)(),a=(0,f.ref)(!0);function o(){TA()&&(a.value=!a.value)}return(e,s)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(W),{label:(0,f.unref)(i).toDateTime(t.dateTime,!0)},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,(0,f.normalizeProps)((0,f.guardReactiveProps)((0,f.unref)(n))),[(0,f.createTextVNode)((0,f.toDisplayString)(t.leadingText)+` `,1),(0,f.createVNode)(sO,{value:(0,f.unref)(i).toDateTime(t.dateTime,!0),class:`whitespace-nowrap`,onClick:o},{default:(0,f.withCtx)(()=>[a.value?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:0},[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(i).toRelativeTime(t.dateTime,(0,f.unref)(r))),1)],64)):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(i).toDateTime(t.dateTime,!0)),1)],64))]),_:1},8,[`value`])],16)]),_:1},8,[`label`]))}});function DA(){return process.env.ENVIRONMENT!==`production`}new class{prefix;constructor(e={}){this.prefix=e.prefix??``}buildArgs(e,t){return typeof e==`string`?[`${this.prefix.length>0?`${this.prefix} `:``}${e}`,...t]:this.prefix.length>0?[this.prefix,e,...t]:[e,...t]}log(e,t,...n){let r=this.buildArgs(t,n);switch(e){case`debug`:console.debug(...r);break;case`info`:console.info(...r);break;case`warn`:console.warn(...r);break;case`error`:console.error(...r);break}}debug(e,...t){DA()&&this.log(`debug`,e,...t)}error(e,...t){this.log(`error`,e,...t)}info(e,...t){DA()&&this.log(`info`,e,...t)}warn(e,...t){this.log(`warn`,e,...t)}};var OA=/([a-z])([A-Z])/g,kA=/([A-Z]+)([A-Z][a-z])/g,AA=/[\u0300-\u036F]/g,jA=/[^\w\s-]/g,MA=/[\s_]+/g,NA=/^-+|-+$/g,PA=/<[^>]*>/g,FA=class{static camelToKebab(e){return e.replace(OA,`$1-$2`).replace(kA,`$1-$2`).toLowerCase()}static capitalize(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}static isEmpty(e){return e==null||e.trim().length===0}static slugify(e){return e.toLowerCase().trim().normalize(`NFD`).replace(AA,``).replace(jA,``).replace(MA,`-`).replace(NA,``)}static stripHtml(e){return e.replace(PA,``)}static trimOrNull(e){return e?.trim()||null}static trimOrUndefined(e){return e?.trim()||void 0}static truncate(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}},IA=(0,f.defineComponent)({__name:`SearchField`,props:{search:{}},setup(e){let t=e,n=(0,f.useTemplateRef)(`textField`),r=(0,f.useId)(),i=(0,g.useI18n)();return ut(`Mod+F`,()=>{n.value?.input?.focus()},{preventDefault:!0}),(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(vb),{id:(0,f.unref)(r),ref:`textField`,"model-value":t.search.search.value,placeholder:(0,f.unref)(i).t(`component.search_input.placeholder`),"icon-left":(0,f.unref)(hr),"aria-label":(0,f.unref)(i).t(`component.search_input.placeholder`),size:`sm`,class:`w-44`,"onUpdate:modelValue":n[1]||=e=>t.search.updateSearch(e??``)},{right:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.AnimatePresence),{initial:!1},{default:(0,f.withCtx)(()=>[(0,f.unref)(FA).isEmpty(t.search.search.value)?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:0,transition:{duration:.2,type:`spring`,bounce:0},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:`mr-xxs flex items-center justify-center`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(X),{label:(0,f.unref)(i).t(`component.search_input.clear`),icon:(0,f.unref)(zr),variant:`tertiary`,size:`xs`,onClick:n[0]||=e=>t.search.clear()},null,8,[`label`,`icon`])]),_:1}))]),_:1})]),_:1},8,[`id`,`model-value`,`placeholder`,`icon-left`,`aria-label`]))}}),LA=50,RA=`search`;function zA(e){let t=e?.persistInUrl===!1?!1:e?.persistInUrl??RA,n=t===!0||typeof t==`string`?(0,b.useRouteQuery)(`search`,``,{mode:`replace`}):(0,f.ref)(``),r=(0,f.ref)(n.value),i=(0,f.ref)(!1),a=(0,f.computed)(()=>!FA.isEmpty(r.value)),o=null;function s(){n.value=``,r.value=``,i.value=!1,o&&clearTimeout(o)}(0,f.watch)(n,t=>{o&&clearTimeout(o),i.value=!0,o=setTimeout(()=>{r.value=t,i.value=!1},e?.debounceMs??LA)},{immediate:!0});function c(e,t=!1){n.value=e,t&&(o&&clearTimeout(o),r.value=e,i.value=!1)}return{isActive:a,isDebouncing:i,clear:s,debouncedSearch:r,search:n,updateSearch:c}}var[BA,VA]=F(`switchContext`),HA=V({slots:{root:`
1019
- group/switch relative isolate h-5 w-8 overflow-hidden rounded-full border
1020
- border-solid border-gray-200 bg-quaternary px-xxs outline-offset-3
1021
- outline-brand-600 duration-200
1019
+ group/switch relative isolate h-5 w-8 shrink-0 overflow-hidden
1020
+ rounded-full border border-solid border-gray-200 bg-quaternary px-xxs
1021
+ outline-offset-3 outline-brand-600 duration-200
1022
1022
  disabled:cursor-not-allowed disabled:border-disabled-subtle
1023
1023
  disabled:bg-disabled
1024
1024
  data-invalid:bg-error-secondary data-invalid:outline-error-600
package/dist/index.js CHANGED
@@ -29207,10 +29207,12 @@ var SA = /* @__PURE__ */ h({
29207
29207
  },
29208
29208
  variants: { variant: {
29209
29209
  "bordered-inline": {
29210
+ content: "rounded-lg",
29210
29211
  pane: "\n inset-y-2 right-2 rounded-lg border border-secondary shadow-floating\n max-md:inset-2! max-md:w-auto!\n ",
29211
29212
  resizeHandle: "-inset-y-2"
29212
29213
  },
29213
29214
  "bordered-overlay": {
29215
+ content: "rounded-lg",
29214
29216
  pane: "\n inset-y-2 right-2 rounded-lg border border-secondary shadow-floating\n max-md:inset-2! max-md:w-auto!\n ",
29215
29217
  resizeHandle: "-inset-y-2"
29216
29218
  },
@@ -29934,32 +29936,44 @@ var [ej, tj] = K("tabsContext"), nj = pu({
29934
29936
  type: Boolean,
29935
29937
  default: !1
29936
29938
  },
29939
+ config: { default: null },
29937
29940
  count: { default: null },
29938
29941
  icon: { default: void 0 },
29939
29942
  label: {}
29940
29943
  },
29941
29944
  setup(e) {
29942
- let t = e;
29943
- return (e, n) => (A(), l(i, null, [
29944
- t.icon == null ? c("", !0) : (A(), s(F(t.icon), {
29945
+ let t = e, n = o(() => t.config?.left == null ? t.icon == null ? { type: "none" } : {
29946
+ icon: t.icon,
29947
+ type: "icon"
29948
+ } : t.config.left), r = o(() => t.config?.indicator == null ? t.count == null ? { type: "none" } : {
29949
+ type: "count",
29950
+ value: t.count
29951
+ } : t.config.indicator);
29952
+ return (e, a) => (A(), l(i, null, [
29953
+ n.value.type === "icon" ? (A(), s(F(n.value.icon), {
29945
29954
  key: 0,
29946
29955
  class: "size-4 shrink-0"
29947
- })),
29956
+ })) : c("", !0),
29948
29957
  m(R(Q), {
29949
29958
  text: t.label,
29950
29959
  class: E([{ "sr-only": t.isLabelHidden }, "text-xs"])
29951
29960
  }, null, 8, ["text", "class"]),
29952
- t.count == null ? c("", !0) : (A(), s(R(sj), {
29961
+ r.value.type === "count" ? (A(), s(R(sj), {
29953
29962
  key: 1,
29954
- value: t.count.toString(),
29963
+ value: r.value.value.toString(),
29955
29964
  size: "md"
29956
- }, null, 8, ["value"]))
29965
+ }, null, 8, ["value"])) : r.value.type === "dot" ? (A(), s(R(Ju), {
29966
+ key: 2,
29967
+ color: r.value.color ?? "error",
29968
+ size: "sm"
29969
+ }, null, 8, ["color"])) : c("", !0)
29957
29970
  ], 64));
29958
29971
  }
29959
29972
  }), lj = /* @__PURE__ */ h({
29960
29973
  __name: "TabsItem",
29961
29974
  props: {
29962
29975
  isLabelHidden: { type: Boolean },
29976
+ config: { default: null },
29963
29977
  count: { default: null },
29964
29978
  disabledReason: { default: null },
29965
29979
  icon: { default: void 0 },
@@ -29983,11 +29997,13 @@ var [ej, tj] = K("tabsContext"), nj = pu({
29983
29997
  class: E(R(n).variants.value.item())
29984
29998
  }, {
29985
29999
  default: H(() => [m(cj, {
30000
+ config: t.config,
29986
30001
  count: t.count,
29987
30002
  icon: t.icon,
29988
30003
  "is-label-hidden": t.isLabelHidden,
29989
30004
  label: t.label
29990
30005
  }, null, 8, [
30006
+ "config",
29991
30007
  "count",
29992
30008
  "icon",
29993
30009
  "is-label-hidden",
@@ -30114,6 +30130,7 @@ var [ej, tj] = K("tabsContext"), nj = pu({
30114
30130
  __name: "TabsRouterLinkItem",
30115
30131
  props: {
30116
30132
  isLabelHidden: { type: Boolean },
30133
+ config: { default: null },
30117
30134
  count: { default: null },
30118
30135
  disabledReason: { default: null },
30119
30136
  icon: { default: void 0 },
@@ -30142,11 +30159,13 @@ var [ej, tj] = K("tabsContext"), nj = pu({
30142
30159
  replace: !0
30143
30160
  }, {
30144
30161
  default: H(() => [m(cj, {
30162
+ config: t.config,
30145
30163
  count: t.count,
30146
30164
  icon: t.icon,
30147
30165
  "is-label-hidden": t.isLabelHidden,
30148
30166
  label: t.label
30149
30167
  }, null, 8, [
30168
+ "config",
30150
30169
  "count",
30151
30170
  "icon",
30152
30171
  "is-label-hidden",
@@ -30339,10 +30358,13 @@ var [ej, tj] = K("tabsContext"), nj = pu({
30339
30358
  //#endregion
30340
30359
  //#region src/composables/datePicker.composable.ts
30341
30360
  function kj({ maxDate: e, minDate: t, modelValue: n }) {
30342
- let r = v_(), i = o(() => r.dateLocale.value ?? navigator.language), a = Kr.Now.plainDateISO(), s = ie(new Ur(a.year, a.month, a.day));
30361
+ let r = v_(), i = o(() => r.dateLocale.value ?? navigator.language), a = n.value ?? Kr.Now.plainDateISO(), s = ie(new Ur(a.year, a.month, a.day));
30343
30362
  function c(e) {
30344
30363
  s.value = e;
30345
30364
  }
30365
+ V(n, (e) => {
30366
+ e !== null && (s.value = new Ur(e.year, e.month, e.day));
30367
+ });
30346
30368
  function l(e) {
30347
30369
  return new Ur(e.year, e.month, e.day);
30348
30370
  }
@@ -34826,7 +34848,7 @@ function sF(e) {
34826
34848
  //#endregion
34827
34849
  //#region src/ui/switch/switch.context.ts
34828
34850
  var [cF, lF] = K("switchContext"), uF = Z({ slots: {
34829
- root: "\n group/switch relative isolate h-5 w-8 overflow-hidden rounded-full border\n border-solid border-gray-200 bg-quaternary px-xxs outline-offset-3\n outline-brand-600 duration-200\n disabled:cursor-not-allowed disabled:border-disabled-subtle\n disabled:bg-disabled\n data-invalid:bg-error-secondary data-invalid:outline-error-600\n data-[state=checked]:border-brand-600 data-[state=checked]:bg-brand-solid\n disabled:data-[state=checked]:border-disabled-subtle\n disabled:data-[state=checked]:bg-disabled\n data-invalid:data-[state=checked]:border-error\n data-invalid:data-[state=checked]:bg-error-solid\n data-invalid:data-[state=unchecked]:border-error\n dark:border-gray-700\n ",
34851
+ root: "\n group/switch relative isolate h-5 w-8 shrink-0 overflow-hidden\n rounded-full border border-solid border-gray-200 bg-quaternary px-xxs\n outline-offset-3 outline-brand-600 duration-200\n disabled:cursor-not-allowed disabled:border-disabled-subtle\n disabled:bg-disabled\n data-invalid:bg-error-secondary data-invalid:outline-error-600\n data-[state=checked]:border-brand-600 data-[state=checked]:bg-brand-solid\n disabled:data-[state=checked]:border-disabled-subtle\n disabled:data-[state=checked]:bg-disabled\n data-invalid:data-[state=checked]:border-error\n data-invalid:data-[state=checked]:bg-error-solid\n data-invalid:data-[state=unchecked]:border-error\n dark:border-gray-700\n ",
34830
34852
  thumb: "\n flex size-3.5 items-center justify-center overflow-hidden rounded-full\n bg-white shadow-xs duration-200\n data-[state=checked]:translate-x-3\n ",
34831
34853
  thumbIcon: "\n size-2.5 text-gray-800\n group-data-[state=checked]/switch:text-brand-600\n "
34832
34854
  } }), dF = /* @__PURE__ */ h({
@@ -1,10 +1,12 @@
1
1
  export declare const createDetailPaneStyle: import('tailwind-variants').TVReturnType<{
2
2
  variant: {
3
3
  'bordered-inline': {
4
+ content: string;
4
5
  pane: string;
5
6
  resizeHandle: string;
6
7
  };
7
8
  'bordered-overlay': {
9
+ content: string;
8
10
  pane: string;
9
11
  resizeHandle: string;
10
12
  };
@@ -26,10 +28,12 @@ export declare const createDetailPaneStyle: import('tailwind-variants').TVReturn
26
28
  }, undefined, {
27
29
  variant: {
28
30
  'bordered-inline': {
31
+ content: string;
29
32
  pane: string;
30
33
  resizeHandle: string;
31
34
  };
32
35
  'bordered-overlay': {
36
+ content: string;
33
37
  pane: string;
34
38
  resizeHandle: string;
35
39
  };
@@ -51,10 +55,12 @@ export declare const createDetailPaneStyle: import('tailwind-variants').TVReturn
51
55
  }, import('tailwind-variants').TVReturnType<{
52
56
  variant: {
53
57
  'bordered-inline': {
58
+ content: string;
54
59
  pane: string;
55
60
  resizeHandle: string;
56
61
  };
57
62
  'bordered-overlay': {
63
+ content: string;
58
64
  pane: string;
59
65
  resizeHandle: string;
60
66
  };
@@ -4,5 +4,6 @@ declare const _default: import('vue').DefineComponent<TabsItemProps, {}, {}, {},
4
4
  disabledReason: string | null;
5
5
  icon: import('vue').Component;
6
6
  count: number | null;
7
+ config: import('./tabs.type').TabsItemConfig | null;
7
8
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
9
  export default _default;
@@ -1,13 +1,18 @@
1
1
  import { Component } from 'vue';
2
+ import { TabsItemConfig } from './tabs.type';
2
3
  type __VLS_Props = {
3
4
  isLabelHidden?: boolean;
5
+ config?: TabsItemConfig | null;
6
+ /** @deprecated Use `config.indicator` instead. */
4
7
  count?: number | null;
8
+ /** @deprecated Use `config.left` instead. */
5
9
  icon?: Component;
6
10
  label: string;
7
11
  };
8
12
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
13
  icon: Component;
10
14
  count: number | null;
15
+ config: TabsItemConfig | null;
11
16
  isLabelHidden: boolean;
12
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
18
  export default _default;
@@ -4,5 +4,6 @@ declare const _default: import('vue').DefineComponent<TabsRouterLinkItemProps, {
4
4
  disabledReason: string | null;
5
5
  icon: import('vue').Component;
6
6
  count: number | null;
7
+ config: import('./tabs.type').TabsItemConfig | null;
7
8
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
9
  export default _default;
@@ -1,4 +1,5 @@
1
1
  export type { TabsContentProps as UITabsContentProps, TabsItemProps as UITabsItemProps, TabsProps as UITabsProps, TabsRouterLinkItemProps as UITabsRouterLinkItemProps, } from './tabs.props';
2
+ export type { TabsItemConfig as UITabsItemConfig, TabsItemIndicatorConfig as UITabsItemIndicatorConfig, TabsItemLeftConfig as UITabsItemLeftConfig, } from './tabs.type';
2
3
  export { default as UITabs } from './Tabs';
3
4
  export { default as UITabsContent } from './TabsContent';
4
5
  export { default as UITabsItem } from './TabsItem';
@@ -1,6 +1,7 @@
1
1
  import { Component } from 'vue';
2
2
  import { RegisteredRouteLocationRaw } from '../../register';
3
3
  import { DisabledWithReason } from '../../types/disabledWithReason.type';
4
+ import { TabsItemConfig } from './tabs.type';
4
5
  export type TabsVariant = 'button-border' | 'button-brand' | 'underline';
5
6
  export type TabsHorizontalListPadding = 'lg' | 'md' | 'none' | 'sm' | 'xl';
6
7
  export interface TabsProps {
@@ -30,8 +31,14 @@ export interface TabsItemProps extends DisabledWithReason {
30
31
  * @default false
31
32
  */
32
33
  isLabelHidden?: boolean;
34
+ /**
35
+ * Configuration object for the tab's left content and indicator.
36
+ */
37
+ config?: TabsItemConfig | null;
33
38
  /**
34
39
  * A count to display as a badge on the right side of the tab.
40
+ *
41
+ * @deprecated Use `config.indicator` instead.
35
42
  */
36
43
  count?: number | null;
37
44
  /**
@@ -42,6 +49,8 @@ export interface TabsItemProps extends DisabledWithReason {
42
49
  disabledReason?: string | null;
43
50
  /**
44
51
  * An optional icon to be displayed alongside the tab label.
52
+ *
53
+ * @deprecated Use `config.left` instead.
45
54
  */
46
55
  icon?: Component;
47
56
  /**
@@ -71,8 +80,14 @@ export interface TabsRouterLinkItemProps extends DisabledWithReason {
71
80
  * @default false
72
81
  */
73
82
  isLabelHidden?: boolean;
83
+ /**
84
+ * Configuration object for the tab's left content and indicator.
85
+ */
86
+ config?: TabsItemConfig | null;
74
87
  /**
75
88
  * A count to display as a badge on the right side of the tab.
89
+ *
90
+ * @deprecated Use `config.indicator` instead.
76
91
  */
77
92
  count?: number | null;
78
93
  /**
@@ -83,6 +98,8 @@ export interface TabsRouterLinkItemProps extends DisabledWithReason {
83
98
  disabledReason?: string | null;
84
99
  /**
85
100
  * An optional icon to be displayed alongside the tab label.
101
+ *
102
+ * @deprecated Use `config.left` instead.
86
103
  */
87
104
  icon?: Component;
88
105
  /**
@@ -0,0 +1,31 @@
1
+ import { Component } from 'vue';
2
+ import { DotColor } from '../dot/dot.props';
3
+ export interface TabsItemLeftConfig {
4
+ icon: Component;
5
+ type: 'icon';
6
+ }
7
+ export type TabsItemIndicatorConfig = {
8
+ /**
9
+ * The color of the dot.
10
+ * @default 'error'
11
+ */
12
+ color?: DotColor;
13
+ type: 'dot';
14
+ } | {
15
+ type: 'count';
16
+ /**
17
+ * The number to display inside the badge.
18
+ */
19
+ value: number;
20
+ };
21
+ export interface TabsItemConfig {
22
+ /**
23
+ * An indicator displayed on the right side of the tab.
24
+ * Supports a dot (e.g. to flag a form error) or a count badge. Supersedes `count` when set.
25
+ */
26
+ indicator?: TabsItemIndicatorConfig | null;
27
+ /**
28
+ * Content displayed to the left of the label. Supersedes `icon` when set.
29
+ */
30
+ left?: TabsItemLeftConfig | null;
31
+ }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "1.17.0",
7
+ "version": "1.18.0",
8
8
  "license": "SEE LICENSE IN LICENSE.md",
9
9
  "repository": {
10
10
  "type": "git",
@@ -66,9 +66,9 @@
66
66
  "vue-component-type-helpers": "3.3.0",
67
67
  "vue-sonner": "2.0.9",
68
68
  "@wisemen/vue-core-api-utils": "2.0.5",
69
- "@wisemen/vue-core-icons": "0.0.3",
69
+ "@wisemen/vue-core-utils": "0.1.1",
70
70
  "@wisemen/vue-core-dates": "1.1.0",
71
- "@wisemen/vue-core-utils": "0.1.1"
71
+ "@wisemen/vue-core-icons": "0.0.3"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@chromatic-com/storybook": "5.0.2",