modular-ui-kit-vue 1.0.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/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # modular-ui-kit
2
+
3
+ [![GitHub Clones](https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/eugenia-vitinschii/2e6247835bbf3928be881ca260cad051/raw/clone.json&logo=github)](https://github.com/MShawon/github-clone-count-badge)
4
+
5
+ `modular-ui-kit` is a lightweight library of independent frontend components designed for rapid development and clean code. No heavy backend logic: just pure, flexible, and responsive UI elements ready to be dropped into any web application.
6
+
7
+ ## Features
8
+
9
+ ➜ flexible UI Kit: fully typed base components with customizable variants, design tokens, and SASS mixins for quick theme changes.
10
+
11
+ ➜ auth module ready: pre-built Login, Registration, and Error pages (401, 403, 500) with smooth routing.
12
+
13
+ ➜ API layer set up: includes a pre-configured Axios instance with Request/Response Interceptors for automatic auth headers and seamless error handling.
14
+
15
+ ### Install dependencies:
16
+
17
+ ```sh
18
+ npm install
19
+ ```
20
+
21
+ ### Create a .env file in the project root:
22
+
23
+ ```sh
24
+ VITE_API_URL=http://localhost:3000/api
25
+
26
+ ```
27
+
28
+ ### Run:
29
+
30
+ ```sh
31
+ npm run dev
32
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("vue-router")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`vue-router`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ModularUiKit={},e.Vue,e.VueRouter))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r={class:`base-checkbox`},i=[`for`],a={class:`base-checkbox__data`},o=[`id`,`checked`,`disabled`,`aria-invalid`,`aria-describedby`],s={key:0,class:`form-label form-label--side`},c={class:`base-checkbox__info`},l=[`id`],u=[`id`],d=(0,t.defineComponent)({__name:`BaseCheckbox`,props:{modelValue:{type:Boolean,default:!1},label:{},hint:{},error:{},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let d=(0,t.useId)(),f=n;function p(e){let t=e.target;f(`update:modelValue`,t.checked)}return(n,f)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createElementVNode)(`label`,{class:`base-checkbox__wrapper`,for:(0,t.unref)(d)},[(0,t.createElementVNode)(`div`,a,[(0,t.createElementVNode)(`input`,{type:`checkbox`,class:`base-checkbox__field`,id:(0,t.unref)(d),checked:e.modelValue,disabled:e.disabled,onChange:p,"aria-invalid":!!e.error,"aria-describedby":e.error?`${(0,t.unref)(d)}-error`:e.hint?`${(0,t.unref)(d)}-hint`:void 0},null,40,o),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`base-checkbox__box`,{"is-error":!!e.error}])},[...f[0]||=[(0,t.createElementVNode)(`span`,{class:`base-checkbox__check`},`✓`,-1)]],2),e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,s,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)(``,!0)])],8,i),(0,t.createElementVNode)(`div`,c,[e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:`form-error`,id:`${(0,t.unref)(d)}-error`},(0,t.toDisplayString)(e.error),9,l)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`form-hint`,id:`${(0,t.unref)(d)}-hint`},(0,t.toDisplayString)(e.hint),9,u)):(0,t.createCommentVNode)(``,!0)])]))}}),f={class:`base-input`},p=[`for`],m=[`id`,`type`,`placeholder`,`disabled`,`value`,`autocomplete`,`aria-invalid`,`aria-describedby`],h=[`id`],g=[`id`],_=(0,t.defineComponent)({__name:`BaseInput`,props:{modelValue:{},label:{},placeholder:{},hint:{},error:{},disabled:{type:Boolean},type:{default:`text`},autocomplete:{}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useId)(),i=n;function a(e){let t=e.target;i(`update:modelValue`,t.type===`number`&&t.value!==``?Number(t.value):t.value)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,f,[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:`form-label form-label--top`,for:(0,t.unref)(r)},(0,t.toDisplayString)(e.label),9,p)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`input`,{class:(0,t.normalizeClass)([`base-input__control`,{"is-error":!!e.error}]),id:(0,t.unref)(r),type:e.type,placeholder:e.placeholder,disabled:e.disabled,value:e.modelValue,autocomplete:e.autocomplete,onInput:a,"aria-invalid":!!e.error,"aria-describedby":e.error?`${(0,t.unref)(r)}-error`:e.hint?`${(0,t.unref)(r)}-hint`:void 0},null,42,m),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`form-error`,id:`${(0,t.unref)(r)}-error`},(0,t.toDisplayString)(e.error),9,h)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:2,class:`form-hint`,id:`${(0,t.unref)(r)}-hint`},(0,t.toDisplayString)(e.hint),9,g)):(0,t.createCommentVNode)(``,!0)]))}}),v={class:`base-radio`},ee=[`for`],y={class:`base-radio__data`},b=[`id`,`checked`,`disabled`,`name`,`aria-invalid`,`aria-describedby`],x={key:0,class:`form-label form-label--side`},S={class:`base-radio__info`},C=[`id`],w=[`id`],T=(0,t.defineComponent)({__name:`BaseRadio`,props:{modelValue:{type:[Boolean,String,Number,null]},value:{type:[Boolean,String,Number]},label:{},name:{},hint:{},error:{},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useId)(),i=e,a=n;function o(e){a(`update:modelValue`,i.value)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,v,[(0,t.createElementVNode)(`label`,{class:`base-radio__wrapper`,for:(0,t.unref)(r)},[(0,t.createElementVNode)(`div`,y,[(0,t.createElementVNode)(`input`,{type:`radio`,class:`base-radio__field`,id:(0,t.unref)(r),checked:e.modelValue===e.value,disabled:e.disabled,name:e.name,onChange:o,"aria-invalid":!!e.error,"aria-describedby":e.error?`${(0,t.unref)(r)}-error`:e.hint?`${(0,t.unref)(r)}-hint`:void 0},null,40,b),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`base-radio__box`,{"is-error":!!e.error}])},[...i[0]||=[(0,t.createElementVNode)(`span`,{class:`base-radio__circle`,"aria-hidden":`true`},null,-1)]],2),e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,x,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)(``,!0)])],8,ee),(0,t.createElementVNode)(`div`,S,[e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:`form-error`,id:`${(0,t.unref)(r)}-error`},(0,t.toDisplayString)(e.error),9,C)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`form-hint`,id:`${(0,t.unref)(r)}-hint`},(0,t.toDisplayString)(e.hint),9,w)):(0,t.createCommentVNode)(``,!0)])]))}}),E={class:`base-select`},D=[`for`],O={class:`base-select__wrapper`},k=[`id`,`value`,`disabled`,`aria-invalid`,`aria-describedby`],A={key:0,value:``,disabled:``},j=[`value`],M=[`id`],N=[`id`],P=(0,t.defineComponent)({__name:`BaseSelect`,props:{modelValue:{default:``},label:{},placeholder:{},options:{},error:{},hint:{},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useId)(),i=n;function a(e){let t=e.target;i(`update:modelValue`,t.value)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,E,[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:`form-label form-label--top`,for:(0,t.unref)(r)},(0,t.toDisplayString)(e.label),9,D)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,O,[(0,t.createElementVNode)(`select`,{class:(0,t.normalizeClass)([`base-select__field`,{"is-error":!!e.error}]),id:(0,t.unref)(r),value:e.modelValue,disabled:e.disabled,onChange:a,"aria-invalid":!!e.error,"aria-describedby":e.error?`${(0,t.unref)(r)}-error`:e.hint?`${(0,t.unref)(r)}-hint`:void 0},[e.placeholder?((0,t.openBlock)(),(0,t.createElementBlock)(`option`,A,(0,t.toDisplayString)(e.placeholder),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:e.value,value:e.value},(0,t.toDisplayString)(e.label),9,j))),128))],42,k),i[0]||=(0,t.createElementVNode)(`span`,{class:`base-select__icon`,"feat(ui):":``,add:``,a11y:``,to:``,form:``,"elements,":``,"buttons,":``,and:``,links:``},`↓`,-1)]),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`form-error`,id:`${(0,t.unref)(r)}-error`},(0,t.toDisplayString)(e.error),9,M)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:2,class:`form-hint`,id:`${(0,t.unref)(r)}-hint`},(0,t.toDisplayString)(e.hint),9,N)):(0,t.createCommentVNode)(``,!0)]))}}),F={class:`base-textarea`},I=[`for`],L=[`id`,`placeholder`,`value`,`rows`,`disabled`,`aria-invalid`,`aria-describedby`],R=[`id`],z=[`id`],B=(0,t.defineComponent)({__name:`BaseTextarea`,props:{modelValue:{default:``},label:{},placeholder:{},error:{},hint:{},disabled:{type:Boolean,default:!1},rows:{default:6}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useId)(),i=n;function a(e){let t=e.target;i(`update:modelValue`,t.value)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,F,[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:`form-label form-label--top`,for:(0,t.unref)(r)},(0,t.toDisplayString)(e.label),9,I)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`textarea`,{class:(0,t.normalizeClass)([`base-textarea__field`,{"is-error":!!e.error}]),id:(0,t.unref)(r),placeholder:e.placeholder,value:e.modelValue,rows:e.rows,disabled:e.disabled,onInput:a,"aria-invalid":!!e.error,"aria-describedby":e.error?`${(0,t.unref)(r)}-error`:e.hint?`${(0,t.unref)(r)}-hint`:void 0},` `,42,L),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`form-error`,id:`${(0,t.unref)(r)}-error`},(0,t.toDisplayString)(e.error),9,R)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:2,class:`form-hint`,id:`${(0,t.unref)(r)}-hint`},(0,t.toDisplayString)(e.hint),9,z)):(0,t.createCommentVNode)(``,!0)]))}}),V=[`disabled`,`type`,`aria-busy`],H={key:0,class:`btn__content`},U=(0,t.defineComponent)({__name:`BaseButton`,props:{variant:{default:`primary`},size:{default:`lg`},type:{default:`button`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{class:(0,t.normalizeClass)([`btn`,[`btn--${e.variant}`,`btn--${e.size}`,{"is-loading":e.loading}]]),disabled:e.disabled,type:e.type,"aria-busy":e.loading},[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[r[0]||=(0,t.createElementVNode)(`span`,{class:`btn-spinner`,"aria-hidden":`true`},null,-1),r[1]||=(0,t.createElementVNode)(`span`,{class:`visually-hidden`},`Loading`,-1)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,H,[(0,t.renderSlot)(n.$slots,`default`)]))],10,V))}}),W=[`disabled`,`type`,`aria-busy`,`aria-label`],G={key:0,class:`btn-icon__content`,"aria-hidden":`true`},K=(0,t.defineComponent)({__name:`BaseIconButton`,props:{ariaLabel:{},variant:{default:`primary`},type:{default:`button`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:`lg`}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{class:(0,t.normalizeClass)([`btn-icon`,[`btn-icon--${e.variant}`,`btn-icon--${e.size}`,{"is-loading":e.loading}]]),disabled:e.disabled,type:e.type,"aria-busy":e.loading,"aria-label":e.ariaLabel?String(e.ariaLabel):void 0},[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[r[0]||=(0,t.createElementVNode)(`span`,{class:`btn-spinner`,"aria-hidden":`true`},null,-1),r[1]||=(0,t.createElementVNode)(`span`,{class:`visually-hidden`},`Loading`,-1)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,G,[(0,t.renderSlot)(n.$slots,`default`)]))],10,W))}}),te=(0,t.defineComponent)({__name:`BaseSkeleton`,props:{type:{default:`text`},width:{},height:{},shimmer:{type:Boolean,default:!0}},setup(e){let n=e,r=(0,t.computed)(()=>{let e={};if(n.width!==void 0&&n.width!==``){let t=typeof n.width==`number`?`${n.width}px`:n.width;e.width=t,n.type===`circle`&&!n.height&&(e.height=t)}if(n.height!==void 0&&n.height!==``){let t=typeof n.height==`number`?`${n.height}px`:n.height;e.height=t,n.type===`circle`&&!n.width&&(e.height=t)}return e});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`base-skeleton`,[`base-skeleton__${e.type}`,{shimmer:e.shimmer}]]),style:(0,t.normalizeStyle)(r.value)},null,6))}}),q=(0,t.defineComponent)({__name:`BaseText`,props:{variant:{default:`secondary`},as:{default:`p`},type:{default:`body-text`},align:{default:`left`}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.as),{class:(0,t.normalizeClass)([e.type,`txt--${e.align}`,`txt--${e.variant}`])},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),_:3},8,[`class`]))}}),J=(0,t.ref)([]);function Y(){return{toasts:J,addToast:(e,t=`secondary`,n=3e3)=>{let r=Date.now().toString()+Math.random().toString().slice(2,6);J.value.push({id:r,message:e,variant:t,duration:n})},removeToast:e=>{J.value=J.value.filter(t=>t.id!==e)}}}var X={class:`base-toast__wrapper`},Z={class:`base-toast__message`},Q=(0,t.defineComponent)({__name:`BaseToast`,props:{toast:{}},setup(e){let n=e,{removeToast:r}=Y(),i=(0,t.ref)(100),a=null,o=n.toast.duration,s=Date.now();function c(){r(n.toast.id)}function l(){let e=Date.now()-s;i.value=100-e/n.toast.duration*100,e>=o&&c()}function u(){a&&clearInterval(a),o-=Date.now()-s}function d(){s=Date.now(),a=window.setInterval(l,16)}return(0,t.onMounted)(()=>{a=window.setInterval(l,16)}),(0,t.onUnmounted)(()=>{a&&clearInterval(a)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`base-toast`,`base-toast--${e.toast.variant}`]),onMouseenter:u,onMouseleave:d},[(0,t.createElementVNode)(`div`,X,[(0,t.createElementVNode)(`div`,Z,[(0,t.createVNode)(q,{type:`body-text`,variant:e.toast.variant},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.toast.message),1)]),_:1},8,[`variant`])]),(0,t.createVNode)(K,{onClick:c,variant:e.toast.variant,"aria-label":`close toast`},{default:(0,t.withCtx)(()=>[...r[0]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`},[(0,t.createElementVNode)(`path`,{d:`m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z`})],-1)]]),_:1},8,[`variant`])]),(0,t.createElementVNode)(`div`,{class:`base-toast__progress`,style:(0,t.normalizeStyle)({width:i.value+`%`})},null,4)],34))}}),ne={class:`base-toast-container`},re=(0,t.defineComponent)({__name:`BaseToastContainer`,setup(e){let{toasts:n}=Y();return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ne,[(0,t.createVNode)(t.TransitionGroup,{name:`toast`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(n),e=>((0,t.openBlock)(),(0,t.createBlock)(Q,{key:e.id,toast:e},null,8,[`toast`]))),128))]),_:1})]))}}),ie={class:`empty-state__text`},ae={class:`empty-state__actions`},oe=(0,t.defineComponent)({__name:`EmptyState`,props:{title:{default:`No data available`},description:{default:`There is nothing to display here at the moment. Please try refreshing the page`},variant:{default:`secondary`}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`empty-state`,`empty-state--${e.variant}`])},[(0,t.createElementVNode)(`div`,ie,[(0,t.createVNode)(q,{type:`subheading`,as:`h3`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:1}),(0,t.createVNode)(q,{type:`body-text`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.description),1)]),_:1})]),(0,t.createElementVNode)(`div`,ae,[(0,t.renderSlot)(n.$slots,`action`)])],2))}}),se={class:`error-state`},ce={class:`error-state__text`},le={class:`error-state__action`},ue=(0,t.defineComponent)({__name:`ErrorState`,props:{title:{default:`Oops! Something went wrong`},description:{default:`Failed to fetch data. Please try again.`}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,se,[(0,t.createElementVNode)(`div`,ce,[(0,t.createVNode)(q,{type:`subheading`,as:`h3`,align:`center`,variant:`danger`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:1}),(0,t.createVNode)(q,{type:`body-text`,align:`center`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.description),1)]),_:1})]),(0,t.createElementVNode)(`div`,le,[(0,t.renderSlot)(n.$slots,`action`)])]))}}),de={class:`container`},fe={key:0,class:`base-breadcrumbs`},pe={class:`base-breadcrumbs__list`},$=(0,t.defineComponent)({__name:`BaseBreadcrumbs`,setup(e){let r=(0,n.useRoute)(),i=(0,n.useRouter)(),a=(0,t.computed)(()=>{let e=r.matched.filter(e=>e.meta&&e.meta.title).map(e=>{let t=typeof e.meta.title==`function`?e.meta.title(r):e.meta.title,n=e.path;return Object.keys(r.params).forEach(e=>{n=n.replace(`:${e}`,r.params[e])}),{label:t,to:n}});return r.path!==`/`&&e.unshift({label:`Home`,to:`/`}),e});return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,de,[(0,t.unref)(r).path===`/`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`nav`,fe,[(0,t.createElementVNode)(`ul`,pe,[(0,t.createVNode)(K,{onClick:n[0]||=e=>(0,t.unref)(i).back(),"aria-label":`Go back`},{default:(0,t.withCtx)(()=>[...n[1]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`},[(0,t.createElementVNode)(`path`,{d:`M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z`})],-1)]]),_:1}),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.value,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{class:`base-breadcrumbs__item`,key:r},[r===a.value.length-1?((0,t.openBlock)(),(0,t.createBlock)(q,{key:0,as:`span`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),_:2},1024)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createVNode)(q,{as:`router-link`,to:e.to,align:`center`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),_:2},1032,[`to`]),(0,t.createVNode)(q,{as:`span`,class:`base-breadcrumbs__item-separator`},{default:(0,t.withCtx)(()=>[...n[2]||=[(0,t.createTextVNode)(`/`,-1)]]),_:1})],64))]))),128))])]))]))}}),me={class:`base-pagination`},he={class:`base-pagination__desktop`},ge={class:`base-pagination__mobile`},_e=(0,t.defineComponent)({__name:`BasePagination`,props:{page:{},totalPages:{}},emits:[`change`],setup(e,{emit:n}){let r=e,i=(0,t.computed)(()=>{let e=r.totalPages,t=r.page,n=Math.floor((t-1)/5)*5+1,i=Math.min(e,n+5-1),a=[];n>1&&(a.push(1),n>2&&a.push(`...`));for(let e=n;e<=i;e++)a.push(e);return i<e&&(i<e-1&&a.push(`...`),a.push(e)),a});return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,me,[(0,t.createVNode)(K,{disabled:e.page===1,onClick:r[0]||=t=>n.$emit(`change`,e.page-1),"aria-label":`Previous page`},{default:(0,t.withCtx)(()=>[...r[2]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`},[(0,t.createElementVNode)(`path`,{d:`M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z`})],-1)]]),_:1},8,[`disabled`]),(0,t.createElementVNode)(`div`,he,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,r=>((0,t.openBlock)(),(0,t.createBlock)(K,{key:r+``,disabled:r===`...`,class:(0,t.normalizeClass)({"is-active":r===e.page}),onClick:e=>typeof r==`number`&&n.$emit(`change`,r),"aria-label":r},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(q,null,{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r),1)]),_:2},1024)]),_:2},1032,[`disabled`,`class`,`onClick`,`aria-label`]))),128))]),(0,t.createElementVNode)(`div`,ge,[(0,t.createVNode)(q,null,{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.page)+` / `+(0,t.toDisplayString)(e.totalPages),1)]),_:1})]),(0,t.createVNode)(K,{disabled:e.page===e.totalPages,onClick:r[1]||=t=>n.$emit(`change`,e.page+1),"aria-label":`Next page`},{default:(0,t.withCtx)(()=>[...r[3]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`},[(0,t.createElementVNode)(`path`,{d:`m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z`})],-1)]]),_:1},8,[`disabled`])]))}}),ve={key:0,class:`base-modal__header`},ye={class:`base-modal__content`},be={class:`base-modal__footer`},xe=(0,t.defineComponent)({__name:`BaseModal`,props:{open:{type:Boolean},title:{},variant:{default:`secondary`}},emits:[`update:open`],setup(e,{emit:n}){let r=n,i=()=>{r(`update:open`,!1)};return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`modal-fade`},{default:(0,t.withCtx)(()=>[e.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`base-modal-backdrop`,onClick:i},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`base-modal`,`base-modal--${e.variant}`]),onClick:r[0]||=(0,t.withModifiers)(()=>{},[`stop`])},[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ve,[(0,t.createVNode)(q,{type:`subheading`,variant:e.variant},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:1},8,[`variant`])])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,ye,[(0,t.renderSlot)(n.$slots,`content`)]),(0,t.createElementVNode)(`div`,be,[(0,t.renderSlot)(n.$slots,`actions`)])],2)])):(0,t.createCommentVNode)(``,!0)]),_:3})]))}});e.BaseBreadcrumbs=$,e.BaseButton=U,e.BaseCheckbox=d,e.BaseIconButton=K,e.BaseInput=_,e.BaseModal=xe,e.BasePagination=_e,e.BaseRadio=T,e.BaseSelect=P,e.BaseSkeleton=te,e.BaseText=q,e.BaseTextarea=B,e.BaseToast=Q,e.BaseToastContainer=re,e.EmptyState=oe,e.ErrorState=ue,e.useToast=Y});
package/dist/index.mjs ADDED
@@ -0,0 +1,715 @@
1
+ import { Fragment as e, Teleport as t, Transition as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, onMounted as ee, onUnmounted as te, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useId as x, withCtx as S, withModifiers as ne } from "vue";
2
+ import { useRoute as re, useRouter as ie } from "vue-router";
3
+ //#region src/components/ui/form/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
4
+ var ae = { class: "base-checkbox" }, oe = ["for"], C = { class: "base-checkbox__data" }, w = [
5
+ "id",
6
+ "checked",
7
+ "disabled",
8
+ "aria-invalid",
9
+ "aria-describedby"
10
+ ], T = {
11
+ key: 0,
12
+ class: "form-label form-label--side"
13
+ }, E = { class: "base-checkbox__info" }, D = ["id"], O = ["id"], k = /* @__PURE__ */ d({
14
+ __name: "BaseCheckbox",
15
+ props: {
16
+ modelValue: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ label: {},
21
+ hint: {},
22
+ error: {},
23
+ disabled: {
24
+ type: Boolean,
25
+ default: !1
26
+ }
27
+ },
28
+ emits: ["update:modelValue"],
29
+ setup(e, { emit: t }) {
30
+ let n = x(), r = t;
31
+ function i(e) {
32
+ let t = e.target;
33
+ r("update:modelValue", t.checked);
34
+ }
35
+ return (t, r) => (m(), s("div", ae, [c("label", {
36
+ class: "base-checkbox__wrapper",
37
+ for: b(n)
38
+ }, [c("div", C, [
39
+ c("input", {
40
+ type: "checkbox",
41
+ class: "base-checkbox__field",
42
+ id: b(n),
43
+ checked: e.modelValue,
44
+ disabled: e.disabled,
45
+ onChange: i,
46
+ "aria-invalid": !!e.error,
47
+ "aria-describedby": e.error ? `${b(n)}-error` : e.hint ? `${b(n)}-hint` : void 0
48
+ }, null, 40, w),
49
+ c("span", { class: f(["base-checkbox__box", { "is-error": !!e.error }]) }, [...r[0] ||= [c("span", { class: "base-checkbox__check" }, "✓", -1)]], 2),
50
+ e.label ? (m(), s("span", T, y(e.label), 1)) : o("", !0)
51
+ ])], 8, oe), c("div", E, [e.error ? (m(), s("p", {
52
+ key: 0,
53
+ class: "form-error",
54
+ id: `${b(n)}-error`
55
+ }, y(e.error), 9, D)) : e.hint ? (m(), s("p", {
56
+ key: 1,
57
+ class: "form-hint",
58
+ id: `${b(n)}-hint`
59
+ }, y(e.hint), 9, O)) : o("", !0)])]));
60
+ }
61
+ }), A = { class: "base-input" }, j = ["for"], M = [
62
+ "id",
63
+ "type",
64
+ "placeholder",
65
+ "disabled",
66
+ "value",
67
+ "autocomplete",
68
+ "aria-invalid",
69
+ "aria-describedby"
70
+ ], N = ["id"], P = ["id"], F = /* @__PURE__ */ d({
71
+ __name: "BaseInput",
72
+ props: {
73
+ modelValue: {},
74
+ label: {},
75
+ placeholder: {},
76
+ hint: {},
77
+ error: {},
78
+ disabled: { type: Boolean },
79
+ type: { default: "text" },
80
+ autocomplete: {}
81
+ },
82
+ emits: ["update:modelValue"],
83
+ setup(e, { emit: t }) {
84
+ let n = x(), r = t;
85
+ function i(e) {
86
+ let t = e.target;
87
+ r("update:modelValue", t.type === "number" && t.value !== "" ? Number(t.value) : t.value);
88
+ }
89
+ return (t, r) => (m(), s("div", A, [
90
+ e.label ? (m(), s("label", {
91
+ key: 0,
92
+ class: "form-label form-label--top",
93
+ for: b(n)
94
+ }, y(e.label), 9, j)) : o("", !0),
95
+ c("input", {
96
+ class: f(["base-input__control", { "is-error": !!e.error }]),
97
+ id: b(n),
98
+ type: e.type,
99
+ placeholder: e.placeholder,
100
+ disabled: e.disabled,
101
+ value: e.modelValue,
102
+ autocomplete: e.autocomplete,
103
+ onInput: i,
104
+ "aria-invalid": !!e.error,
105
+ "aria-describedby": e.error ? `${b(n)}-error` : e.hint ? `${b(n)}-hint` : void 0
106
+ }, null, 42, M),
107
+ e.error ? (m(), s("p", {
108
+ key: 1,
109
+ class: "form-error",
110
+ id: `${b(n)}-error`
111
+ }, y(e.error), 9, N)) : e.hint ? (m(), s("p", {
112
+ key: 2,
113
+ class: "form-hint",
114
+ id: `${b(n)}-hint`
115
+ }, y(e.hint), 9, P)) : o("", !0)
116
+ ]));
117
+ }
118
+ }), I = { class: "base-radio" }, L = ["for"], R = { class: "base-radio__data" }, z = [
119
+ "id",
120
+ "checked",
121
+ "disabled",
122
+ "name",
123
+ "aria-invalid",
124
+ "aria-describedby"
125
+ ], B = {
126
+ key: 0,
127
+ class: "form-label form-label--side"
128
+ }, V = { class: "base-radio__info" }, H = ["id"], U = ["id"], W = /* @__PURE__ */ d({
129
+ __name: "BaseRadio",
130
+ props: {
131
+ modelValue: { type: [
132
+ Boolean,
133
+ String,
134
+ Number,
135
+ null
136
+ ] },
137
+ value: { type: [
138
+ Boolean,
139
+ String,
140
+ Number
141
+ ] },
142
+ label: {},
143
+ name: {},
144
+ hint: {},
145
+ error: {},
146
+ disabled: {
147
+ type: Boolean,
148
+ default: !1
149
+ }
150
+ },
151
+ emits: ["update:modelValue"],
152
+ setup(e, { emit: t }) {
153
+ let n = x(), r = e, i = t;
154
+ function a(e) {
155
+ i("update:modelValue", r.value);
156
+ }
157
+ return (t, r) => (m(), s("div", I, [c("label", {
158
+ class: "base-radio__wrapper",
159
+ for: b(n)
160
+ }, [c("div", R, [
161
+ c("input", {
162
+ type: "radio",
163
+ class: "base-radio__field",
164
+ id: b(n),
165
+ checked: e.modelValue === e.value,
166
+ disabled: e.disabled,
167
+ name: e.name,
168
+ onChange: a,
169
+ "aria-invalid": !!e.error,
170
+ "aria-describedby": e.error ? `${b(n)}-error` : e.hint ? `${b(n)}-hint` : void 0
171
+ }, null, 40, z),
172
+ c("span", { class: f(["base-radio__box", { "is-error": !!e.error }]) }, [...r[0] ||= [c("span", {
173
+ class: "base-radio__circle",
174
+ "aria-hidden": "true"
175
+ }, null, -1)]], 2),
176
+ e.label ? (m(), s("span", B, y(e.label), 1)) : o("", !0)
177
+ ])], 8, L), c("div", V, [e.error ? (m(), s("p", {
178
+ key: 0,
179
+ class: "form-error",
180
+ id: `${b(n)}-error`
181
+ }, y(e.error), 9, H)) : e.hint ? (m(), s("p", {
182
+ key: 1,
183
+ class: "form-hint",
184
+ id: `${b(n)}-hint`
185
+ }, y(e.hint), 9, U)) : o("", !0)])]));
186
+ }
187
+ }), G = { class: "base-select" }, K = ["for"], q = { class: "base-select__wrapper" }, se = [
188
+ "id",
189
+ "value",
190
+ "disabled",
191
+ "aria-invalid",
192
+ "aria-describedby"
193
+ ], ce = {
194
+ key: 0,
195
+ value: "",
196
+ disabled: ""
197
+ }, le = ["value"], ue = ["id"], de = ["id"], fe = /* @__PURE__ */ d({
198
+ __name: "BaseSelect",
199
+ props: {
200
+ modelValue: { default: "" },
201
+ label: {},
202
+ placeholder: {},
203
+ options: {},
204
+ error: {},
205
+ hint: {},
206
+ disabled: {
207
+ type: Boolean,
208
+ default: !1
209
+ }
210
+ },
211
+ emits: ["update:modelValue"],
212
+ setup(t, { emit: n }) {
213
+ let r = x(), i = n;
214
+ function a(e) {
215
+ let t = e.target;
216
+ i("update:modelValue", t.value);
217
+ }
218
+ return (n, i) => (m(), s("div", G, [
219
+ t.label ? (m(), s("label", {
220
+ key: 0,
221
+ class: "form-label form-label--top",
222
+ for: b(r)
223
+ }, y(t.label), 9, K)) : o("", !0),
224
+ c("div", q, [c("select", {
225
+ class: f(["base-select__field", { "is-error": !!t.error }]),
226
+ id: b(r),
227
+ value: t.modelValue,
228
+ disabled: t.disabled,
229
+ onChange: a,
230
+ "aria-invalid": !!t.error,
231
+ "aria-describedby": t.error ? `${b(r)}-error` : t.hint ? `${b(r)}-hint` : void 0
232
+ }, [t.placeholder ? (m(), s("option", ce, y(t.placeholder), 1)) : o("", !0), (m(!0), s(e, null, g(t.options, (e) => (m(), s("option", {
233
+ key: e.value,
234
+ value: e.value
235
+ }, y(e.label), 9, le))), 128))], 42, se), i[0] ||= c("span", {
236
+ class: "base-select__icon",
237
+ "feat(ui):": "",
238
+ add: "",
239
+ a11y: "",
240
+ to: "",
241
+ form: "",
242
+ "elements,": "",
243
+ "buttons,": "",
244
+ and: "",
245
+ links: ""
246
+ }, "↓", -1)]),
247
+ t.error ? (m(), s("p", {
248
+ key: 1,
249
+ class: "form-error",
250
+ id: `${b(r)}-error`
251
+ }, y(t.error), 9, ue)) : t.hint ? (m(), s("p", {
252
+ key: 2,
253
+ class: "form-hint",
254
+ id: `${b(r)}-hint`
255
+ }, y(t.hint), 9, de)) : o("", !0)
256
+ ]));
257
+ }
258
+ }), pe = { class: "base-textarea" }, me = ["for"], he = [
259
+ "id",
260
+ "placeholder",
261
+ "value",
262
+ "rows",
263
+ "disabled",
264
+ "aria-invalid",
265
+ "aria-describedby"
266
+ ], ge = ["id"], _e = ["id"], ve = /* @__PURE__ */ d({
267
+ __name: "BaseTextarea",
268
+ props: {
269
+ modelValue: { default: "" },
270
+ label: {},
271
+ placeholder: {},
272
+ error: {},
273
+ hint: {},
274
+ disabled: {
275
+ type: Boolean,
276
+ default: !1
277
+ },
278
+ rows: { default: 6 }
279
+ },
280
+ emits: ["update:modelValue"],
281
+ setup(e, { emit: t }) {
282
+ let n = x(), r = t;
283
+ function i(e) {
284
+ let t = e.target;
285
+ r("update:modelValue", t.value);
286
+ }
287
+ return (t, r) => (m(), s("div", pe, [
288
+ e.label ? (m(), s("label", {
289
+ key: 0,
290
+ class: "form-label form-label--top",
291
+ for: b(n)
292
+ }, y(e.label), 9, me)) : o("", !0),
293
+ c("textarea", {
294
+ class: f(["base-textarea__field", { "is-error": !!e.error }]),
295
+ id: b(n),
296
+ placeholder: e.placeholder,
297
+ value: e.modelValue,
298
+ rows: e.rows,
299
+ disabled: e.disabled,
300
+ onInput: i,
301
+ "aria-invalid": !!e.error,
302
+ "aria-describedby": e.error ? `${b(n)}-error` : e.hint ? `${b(n)}-hint` : void 0
303
+ }, " ", 42, he),
304
+ e.error ? (m(), s("p", {
305
+ key: 1,
306
+ class: "form-error",
307
+ id: `${b(n)}-error`
308
+ }, y(e.error), 9, ge)) : e.hint ? (m(), s("p", {
309
+ key: 2,
310
+ class: "form-hint",
311
+ id: `${b(n)}-hint`
312
+ }, y(e.hint), 9, _e)) : o("", !0)
313
+ ]));
314
+ }
315
+ }), ye = [
316
+ "disabled",
317
+ "type",
318
+ "aria-busy"
319
+ ], be = {
320
+ key: 0,
321
+ class: "btn__content"
322
+ }, xe = /* @__PURE__ */ d({
323
+ __name: "BaseButton",
324
+ props: {
325
+ variant: { default: "primary" },
326
+ size: { default: "lg" },
327
+ type: { default: "button" },
328
+ loading: {
329
+ type: Boolean,
330
+ default: !1
331
+ },
332
+ disabled: {
333
+ type: Boolean,
334
+ default: !1
335
+ }
336
+ },
337
+ setup(t) {
338
+ return (n, r) => (m(), s("button", {
339
+ class: f(["btn", [
340
+ `btn--${t.variant}`,
341
+ `btn--${t.size}`,
342
+ { "is-loading": t.loading }
343
+ ]]),
344
+ disabled: t.disabled,
345
+ type: t.type,
346
+ "aria-busy": t.loading
347
+ }, [t.loading ? (m(), s(e, { key: 1 }, [r[0] ||= c("span", {
348
+ class: "btn-spinner",
349
+ "aria-hidden": "true"
350
+ }, null, -1), r[1] ||= c("span", { class: "visually-hidden" }, "Loading", -1)], 64)) : (m(), s("span", be, [_(n.$slots, "default")]))], 10, ye));
351
+ }
352
+ }), Se = [
353
+ "disabled",
354
+ "type",
355
+ "aria-busy",
356
+ "aria-label"
357
+ ], Ce = {
358
+ key: 0,
359
+ class: "btn-icon__content",
360
+ "aria-hidden": "true"
361
+ }, J = /* @__PURE__ */ d({
362
+ __name: "BaseIconButton",
363
+ props: {
364
+ ariaLabel: {},
365
+ variant: { default: "primary" },
366
+ type: { default: "button" },
367
+ loading: {
368
+ type: Boolean,
369
+ default: !1
370
+ },
371
+ disabled: {
372
+ type: Boolean,
373
+ default: !1
374
+ },
375
+ size: { default: "lg" }
376
+ },
377
+ setup(t) {
378
+ return (n, r) => (m(), s("button", {
379
+ class: f(["btn-icon", [
380
+ `btn-icon--${t.variant}`,
381
+ `btn-icon--${t.size}`,
382
+ { "is-loading": t.loading }
383
+ ]]),
384
+ disabled: t.disabled,
385
+ type: t.type,
386
+ "aria-busy": t.loading,
387
+ "aria-label": t.ariaLabel ? String(t.ariaLabel) : void 0
388
+ }, [t.loading ? (m(), s(e, { key: 1 }, [r[0] ||= c("span", {
389
+ class: "btn-spinner",
390
+ "aria-hidden": "true"
391
+ }, null, -1), r[1] ||= c("span", { class: "visually-hidden" }, "Loading", -1)], 64)) : (m(), s("span", Ce, [_(n.$slots, "default")]))], 10, Se));
392
+ }
393
+ }), we = /* @__PURE__ */ d({
394
+ __name: "BaseSkeleton",
395
+ props: {
396
+ type: { default: "text" },
397
+ width: {},
398
+ height: {},
399
+ shimmer: {
400
+ type: Boolean,
401
+ default: !0
402
+ }
403
+ },
404
+ setup(e) {
405
+ let t = e, n = i(() => {
406
+ let e = {};
407
+ if (t.width !== void 0 && t.width !== "") {
408
+ let n = typeof t.width == "number" ? `${t.width}px` : t.width;
409
+ e.width = n, t.type === "circle" && !t.height && (e.height = n);
410
+ }
411
+ if (t.height !== void 0 && t.height !== "") {
412
+ let n = typeof t.height == "number" ? `${t.height}px` : t.height;
413
+ e.height = n, t.type === "circle" && !t.width && (e.height = n);
414
+ }
415
+ return e;
416
+ });
417
+ return (t, r) => (m(), s("div", {
418
+ class: f(["base-skeleton", [`base-skeleton__${e.type}`, { shimmer: e.shimmer }]]),
419
+ style: p(n.value)
420
+ }, null, 6));
421
+ }
422
+ }), Y = /* @__PURE__ */ d({
423
+ __name: "BaseText",
424
+ props: {
425
+ variant: { default: "secondary" },
426
+ as: { default: "p" },
427
+ type: { default: "body-text" },
428
+ align: { default: "left" }
429
+ },
430
+ setup(e) {
431
+ return (t, n) => (m(), a(v(e.as), { class: f([
432
+ e.type,
433
+ `txt--${e.align}`,
434
+ `txt--${e.variant}`
435
+ ]) }, {
436
+ default: S(() => [_(t.$slots, "default")]),
437
+ _: 3
438
+ }, 8, ["class"]));
439
+ }
440
+ }), X = h([]);
441
+ function Z() {
442
+ return {
443
+ toasts: X,
444
+ addToast: (e, t = "secondary", n = 3e3) => {
445
+ let r = Date.now().toString() + Math.random().toString().slice(2, 6);
446
+ X.value.push({
447
+ id: r,
448
+ message: e,
449
+ variant: t,
450
+ duration: n
451
+ });
452
+ },
453
+ removeToast: (e) => {
454
+ X.value = X.value.filter((t) => t.id !== e);
455
+ }
456
+ };
457
+ }
458
+ //#endregion
459
+ //#region src/components/ui/feedback/BaseToast.vue?vue&type=script&setup=true&lang.ts
460
+ var Te = { class: "base-toast__wrapper" }, Ee = { class: "base-toast__message" }, Q = /* @__PURE__ */ d({
461
+ __name: "BaseToast",
462
+ props: { toast: {} },
463
+ setup(e) {
464
+ let t = e, { removeToast: n } = Z(), r = h(100), i = null, a = t.toast.duration, o = Date.now();
465
+ function d() {
466
+ n(t.toast.id);
467
+ }
468
+ function g() {
469
+ let e = Date.now() - o;
470
+ r.value = 100 - e / t.toast.duration * 100, e >= a && d();
471
+ }
472
+ function _() {
473
+ i && clearInterval(i), a -= Date.now() - o;
474
+ }
475
+ function v() {
476
+ o = Date.now(), i = window.setInterval(g, 16);
477
+ }
478
+ return ee(() => {
479
+ i = window.setInterval(g, 16);
480
+ }), te(() => {
481
+ i && clearInterval(i);
482
+ }), (t, n) => (m(), s("div", {
483
+ class: f(["base-toast", `base-toast--${e.toast.variant}`]),
484
+ onMouseenter: _,
485
+ onMouseleave: v
486
+ }, [c("div", Te, [c("div", Ee, [u(Y, {
487
+ type: "body-text",
488
+ variant: e.toast.variant
489
+ }, {
490
+ default: S(() => [l(y(e.toast.message), 1)]),
491
+ _: 1
492
+ }, 8, ["variant"])]), u(J, {
493
+ onClick: d,
494
+ variant: e.toast.variant,
495
+ "aria-label": "close toast"
496
+ }, {
497
+ default: S(() => [...n[0] ||= [c("svg", {
498
+ xmlns: "http://www.w3.org/2000/svg",
499
+ viewBox: "0 -960 960 960"
500
+ }, [c("path", { d: "m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" })], -1)]]),
501
+ _: 1
502
+ }, 8, ["variant"])]), c("div", {
503
+ class: "base-toast__progress",
504
+ style: p({ width: r.value + "%" })
505
+ }, null, 4)], 34));
506
+ }
507
+ }), De = { class: "base-toast-container" }, Oe = /* @__PURE__ */ d({
508
+ __name: "BaseToastContainer",
509
+ setup(t) {
510
+ let { toasts: n } = Z();
511
+ return (t, i) => (m(), s("div", De, [u(r, { name: "toast" }, {
512
+ default: S(() => [(m(!0), s(e, null, g(b(n), (e) => (m(), a(Q, {
513
+ key: e.id,
514
+ toast: e
515
+ }, null, 8, ["toast"]))), 128))]),
516
+ _: 1
517
+ })]));
518
+ }
519
+ }), ke = { class: "empty-state__text" }, Ae = { class: "empty-state__actions" }, je = /* @__PURE__ */ d({
520
+ __name: "EmptyState",
521
+ props: {
522
+ title: { default: "No data available" },
523
+ description: { default: "There is nothing to display here at the moment. Please try refreshing the page" },
524
+ variant: { default: "secondary" }
525
+ },
526
+ setup(e) {
527
+ return (t, n) => (m(), s("div", { class: f(["empty-state", `empty-state--${e.variant}`]) }, [c("div", ke, [u(Y, {
528
+ type: "subheading",
529
+ as: "h3"
530
+ }, {
531
+ default: S(() => [l(y(e.title), 1)]),
532
+ _: 1
533
+ }), u(Y, { type: "body-text" }, {
534
+ default: S(() => [l(y(e.description), 1)]),
535
+ _: 1
536
+ })]), c("div", Ae, [_(t.$slots, "action")])], 2));
537
+ }
538
+ }), Me = { class: "error-state" }, Ne = { class: "error-state__text" }, Pe = { class: "error-state__action" }, $ = /* @__PURE__ */ d({
539
+ __name: "ErrorState",
540
+ props: {
541
+ title: { default: "Oops! Something went wrong" },
542
+ description: { default: "Failed to fetch data. Please try again." }
543
+ },
544
+ setup(e) {
545
+ return (t, n) => (m(), s("div", Me, [c("div", Ne, [u(Y, {
546
+ type: "subheading",
547
+ as: "h3",
548
+ align: "center",
549
+ variant: "danger"
550
+ }, {
551
+ default: S(() => [l(y(e.title), 1)]),
552
+ _: 1
553
+ }), u(Y, {
554
+ type: "body-text",
555
+ align: "center"
556
+ }, {
557
+ default: S(() => [l(y(e.description), 1)]),
558
+ _: 1
559
+ })]), c("div", Pe, [_(t.$slots, "action")])]));
560
+ }
561
+ }), Fe = { class: "container" }, Ie = {
562
+ key: 0,
563
+ class: "base-breadcrumbs"
564
+ }, Le = { class: "base-breadcrumbs__list" }, Re = /* @__PURE__ */ d({
565
+ __name: "BaseBreadcrumbs",
566
+ setup(t) {
567
+ let n = re(), r = ie(), d = i(() => {
568
+ let e = n.matched.filter((e) => e.meta && e.meta.title).map((e) => {
569
+ let t = typeof e.meta.title == "function" ? e.meta.title(n) : e.meta.title, r = e.path;
570
+ return Object.keys(n.params).forEach((e) => {
571
+ r = r.replace(`:${e}`, n.params[e]);
572
+ }), {
573
+ label: t,
574
+ to: r
575
+ };
576
+ });
577
+ return n.path !== "/" && e.unshift({
578
+ label: "Home",
579
+ to: "/"
580
+ }), e;
581
+ });
582
+ return (t, i) => (m(), s("div", Fe, [b(n).path === "/" ? o("", !0) : (m(), s("nav", Ie, [c("ul", Le, [u(J, {
583
+ onClick: i[0] ||= (e) => b(r).back(),
584
+ "aria-label": "Go back"
585
+ }, {
586
+ default: S(() => [...i[1] ||= [c("svg", {
587
+ xmlns: "http://www.w3.org/2000/svg",
588
+ viewBox: "0 -960 960 960"
589
+ }, [c("path", { d: "M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z" })], -1)]]),
590
+ _: 1
591
+ }), (m(!0), s(e, null, g(d.value, (t, n) => (m(), s("li", {
592
+ class: "base-breadcrumbs__item",
593
+ key: n
594
+ }, [n === d.value.length - 1 ? (m(), a(Y, {
595
+ key: 0,
596
+ as: "span"
597
+ }, {
598
+ default: S(() => [l(y(t.label), 1)]),
599
+ _: 2
600
+ }, 1024)) : (m(), s(e, { key: 1 }, [u(Y, {
601
+ as: "router-link",
602
+ to: t.to,
603
+ align: "center"
604
+ }, {
605
+ default: S(() => [l(y(t.label), 1)]),
606
+ _: 2
607
+ }, 1032, ["to"]), u(Y, {
608
+ as: "span",
609
+ class: "base-breadcrumbs__item-separator"
610
+ }, {
611
+ default: S(() => [...i[2] ||= [l("/", -1)]]),
612
+ _: 1
613
+ })], 64))]))), 128))])]))]));
614
+ }
615
+ }), ze = { class: "base-pagination" }, Be = { class: "base-pagination__desktop" }, Ve = { class: "base-pagination__mobile" }, He = /* @__PURE__ */ d({
616
+ __name: "BasePagination",
617
+ props: {
618
+ page: {},
619
+ totalPages: {}
620
+ },
621
+ emits: ["change"],
622
+ setup(t, { emit: n }) {
623
+ let r = t, o = i(() => {
624
+ let e = r.totalPages, t = r.page, n = Math.floor((t - 1) / 5) * 5 + 1, i = Math.min(e, n + 5 - 1), a = [];
625
+ n > 1 && (a.push(1), n > 2 && a.push("..."));
626
+ for (let e = n; e <= i; e++) a.push(e);
627
+ return i < e && (i < e - 1 && a.push("..."), a.push(e)), a;
628
+ });
629
+ return (n, r) => (m(), s("div", ze, [
630
+ u(J, {
631
+ disabled: t.page === 1,
632
+ onClick: r[0] ||= (e) => n.$emit("change", t.page - 1),
633
+ "aria-label": "Previous page"
634
+ }, {
635
+ default: S(() => [...r[2] ||= [c("svg", {
636
+ xmlns: "http://www.w3.org/2000/svg",
637
+ viewBox: "0 -960 960 960"
638
+ }, [c("path", { d: "M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z" })], -1)]]),
639
+ _: 1
640
+ }, 8, ["disabled"]),
641
+ c("div", Be, [(m(!0), s(e, null, g(o.value, (e) => (m(), a(J, {
642
+ key: e + "",
643
+ disabled: e === "...",
644
+ class: f({ "is-active": e === t.page }),
645
+ onClick: (t) => typeof e == "number" && n.$emit("change", e),
646
+ "aria-label": e
647
+ }, {
648
+ default: S(() => [u(Y, null, {
649
+ default: S(() => [l(y(e), 1)]),
650
+ _: 2
651
+ }, 1024)]),
652
+ _: 2
653
+ }, 1032, [
654
+ "disabled",
655
+ "class",
656
+ "onClick",
657
+ "aria-label"
658
+ ]))), 128))]),
659
+ c("div", Ve, [u(Y, null, {
660
+ default: S(() => [l(y(t.page) + " / " + y(t.totalPages), 1)]),
661
+ _: 1
662
+ })]),
663
+ u(J, {
664
+ disabled: t.page === t.totalPages,
665
+ onClick: r[1] ||= (e) => n.$emit("change", t.page + 1),
666
+ "aria-label": "Next page"
667
+ }, {
668
+ default: S(() => [...r[3] ||= [c("svg", {
669
+ xmlns: "http://www.w3.org/2000/svg",
670
+ viewBox: "0 -960 960 960"
671
+ }, [c("path", { d: "m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z" })], -1)]]),
672
+ _: 1
673
+ }, 8, ["disabled"])
674
+ ]));
675
+ }
676
+ }), Ue = {
677
+ key: 0,
678
+ class: "base-modal__header"
679
+ }, We = { class: "base-modal__content" }, Ge = { class: "base-modal__footer" }, Ke = /* @__PURE__ */ d({
680
+ __name: "BaseModal",
681
+ props: {
682
+ open: { type: Boolean },
683
+ title: {},
684
+ variant: { default: "secondary" }
685
+ },
686
+ emits: ["update:open"],
687
+ setup(e, { emit: r }) {
688
+ let i = r, d = () => {
689
+ i("update:open", !1);
690
+ };
691
+ return (r, i) => (m(), a(t, { to: "body" }, [u(n, { name: "modal-fade" }, {
692
+ default: S(() => [e.open ? (m(), s("div", {
693
+ key: 0,
694
+ class: "base-modal-backdrop",
695
+ onClick: d
696
+ }, [c("div", {
697
+ class: f(["base-modal", `base-modal--${e.variant}`]),
698
+ onClick: i[0] ||= ne(() => {}, ["stop"])
699
+ }, [
700
+ e.title ? (m(), s("div", Ue, [u(Y, {
701
+ type: "subheading",
702
+ variant: e.variant
703
+ }, {
704
+ default: S(() => [l(y(e.title), 1)]),
705
+ _: 1
706
+ }, 8, ["variant"])])) : o("", !0),
707
+ c("div", We, [_(r.$slots, "content")]),
708
+ c("div", Ge, [_(r.$slots, "actions")])
709
+ ], 2)])) : o("", !0)]),
710
+ _: 3
711
+ })]));
712
+ }
713
+ });
714
+ //#endregion
715
+ export { Re as BaseBreadcrumbs, xe as BaseButton, k as BaseCheckbox, J as BaseIconButton, F as BaseInput, Ke as BaseModal, He as BasePagination, W as BaseRadio, fe as BaseSelect, we as BaseSkeleton, Y as BaseText, ve as BaseTextarea, Q as BaseToast, Oe as BaseToastContainer, je as EmptyState, $ as ErrorState, Z as useToast };
@@ -0,0 +1,2 @@
1
+ @import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";:root{--ui-text:#eceef2;--ui-text-muted:#8a93a6;--ui-bg:#0b0d11;--ui-bg-soft:#12151c;--ui-bg-card:#171b24;--ui-bg-code:#1e2330;--ui-primary:#6366f1;--ui-primary-hover:#4f46e5;--ui-danger:#ff4a6b;--ui-success:#10b981;--ui-warning:#f59e0b;--ui-font-heading:26px;--ui-font-subheading:19px;--ui-font-body:16px;--ui-font-heading-md:24px;--ui-font-subheading-md:18px;--ui-font-body-md:15px;--ui-font-heading-sm:20px;--ui-font-subheading-sm:16px;--ui-font-body-sm:14px;--ui-border-color:#eceef214;--ui-border-width:1px;--ui-border-style:solid;--ui-border-radius:0px;--ui-space-content-sm:6px;--ui-space-content-md:10px;--ui-space-content-lg:14px;--ui-space-container-sm:16px;--ui-space-container-md:24px;--ui-space-container-lg:32px;--ui-transition:all .3s ease-out;--ui-opacity:.4}*,:before,:after{box-sizing:border-box}:focus,:active,a:focus,a:active{outline:none}nav,footer,aside{display:block}html,body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;background:#232222;height:100%;margin:0;padding:0;font-family:Inter,sans-serif;font-size:100%;line-height:1.5}input,textarea,button,select{font-family:inherit}input::-ms-clear{display:none}button{cursor:pointer;background:0 0;border:none}button::-moz-focus-inner{border:0;padding:0}a,a:visited{cursor:pointer;text-decoration:none}button,a:hover{text-decoration:none}h1,h2,h3,h4,h5,h6{font-weight:400}ul{padding-inline-start:0}ul li{margin:0;list-style:none}img{max-width:100%;display:block}.heading{font-size:26px;font-weight:600;line-height:34px}.subheading{font-size:19px;font-weight:500;line-height:28px}.body-text{font-size:16px;font-weight:400;line-height:24px}@media (width<=1024px){.heading{font-size:24px;line-height:30px}.subheading{font-size:18px;line-height:24px}.body-text{font-size:15px;line-height:22px}}@media (width<=767px){.heading{font-size:20px;line-height:26px}.subheading{font-size:16px;line-height:22px}.body-text{font-size:14px;line-height:20px}}a{text-underline-offset:4px;transition:all .3s ease-out;display:block}a:hover{opacity:.8}a:active{opacity:.6;filter:brightness(.9)}.shimmer{position:relative;overflow:hidden}.shimmer:before{content:"";background:linear-gradient(90deg,#0000 0%,#8a93a6 50%,#0000 100%);width:150px;height:100%;animation:2.6s infinite loading;position:absolute;top:0;left:-150px}@keyframes loading{0%{left:-150px}to{left:100%}}.fade-enter-active,.fade-leave-active{transition:opacity .25s}.fade-enter-from,.fade-leave-to{opacity:0}.visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.btn{-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer;border:none;outline:none;justify-content:center;align-items:center;gap:8px;font-family:inherit;font-weight:500;line-height:1.2;transition:all .3s ease-out;display:inline-flex}.btn--sm{--spinner-size:14px;height:38px;padding:3px 14px;font-size:14px}.btn--md{--spinner-size:18px;height:44px;padding:3px 16px;font-size:15px}.btn--lg{--spinner-size:22px;height:50px;padding:3px 18px;font-size:16px}.btn--primary{color:#eceef2;--spinner-color:#6366f1;background:#171b24;border:1px solid #6366f1;border-radius:10px}.btn--primary:hover:not(:disabled):not(.is-loading){background:#6366f1}.btn--primary:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--primary:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--primary.is-loading{cursor:wait}.btn--secondary{color:#eceef2;--spinner-color:#8a93a6;background:#171b24;border:1px solid #8a93a6;border-radius:10px}.btn--secondary:hover:not(:disabled):not(.is-loading){background:#8a93a6}.btn--secondary:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--secondary:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--secondary.is-loading{cursor:wait}.btn--success{color:#eceef2;--spinner-color:#10b981;background:#171b24;border:1px solid #10b981;border-radius:10px}.btn--success:hover:not(:disabled):not(.is-loading){background:#10b981}.btn--success:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--success:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--success.is-loading{cursor:wait}.btn--warning{color:#eceef2;--spinner-color:#f59e0b;background:#171b24;border:1px solid #f59e0b;border-radius:10px}.btn--warning:hover:not(:disabled):not(.is-loading){background:#f59e0b}.btn--warning:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--warning:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--warning.is-loading{cursor:wait}.btn--danger{color:#eceef2;--spinner-color:#ff4a6b;background:#171b24;border:1px solid #ff4a6b;border-radius:10px}.btn--danger:hover:not(:disabled):not(.is-loading){background:#ff4a6b}.btn--danger:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--danger:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--danger.is-loading{cursor:wait}.btn--ghost{color:#8a93a6;--spinner-color:#0b0d11;background:#171b24;border:1px solid #0b0d11;border-radius:10px}.btn--ghost:hover:not(:disabled):not(.is-loading){filter:brightness(1.1)}.btn--ghost:active:not(:disabled):not(.is-loading){filter:brightness(.9);transform:scale(.97)}.btn--ghost:disabled{cursor:not-allowed;opacity:.4;transform:none}.btn--ghost.is-loading{cursor:wait}.btn-spinner{width:var(--spinner-size,18px);height:var(--spinner-size,18px);border:2px solid var(--spinner-color,currentColor);border-right-color:#0000;border-radius:50%;flex-shrink:0;animation:.8s linear infinite spin;display:inline-block}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-icon{cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin:0;padding:0;transition:all .3s ease-out;display:inline-flex}.btn-icon svg{transition:all .3s ease-out}.btn-icon--sm{width:32px;min-width:32px;height:32px;min-height:32px}.btn-icon--sm svg{width:18px;height:18px}.btn-icon--sm{--spinner-size:14px}.btn-icon--md{width:40px;min-width:40px;height:40px;min-height:40px}.btn-icon--md svg{width:22px;height:22px}.btn-icon--md{--spinner-size:18px}.btn-icon--lg{width:48px;min-width:48px;height:48px;min-height:48px}.btn-icon--lg svg{width:26px;height:26px}.btn-icon--lg{--spinner-size:22px}.btn-icon--primary{color:#6366f1;background:0 0}.btn-icon--primary svg{fill:currentColor}.btn-icon--primary:hover:not(:disabled):not(.is-loading){color:#4f46e5}.btn-icon--primary:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--primary:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--primary.is-loading{cursor:wait}.btn-icon--secondary{color:#eceef2;background:0 0}.btn-icon--secondary svg{fill:currentColor}.btn-icon--secondary:hover:not(:disabled):not(.is-loading){color:#4f46e5}.btn-icon--secondary:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--secondary:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--secondary.is-loading{cursor:wait}.btn-icon--success{color:#10b981;background:0 0}.btn-icon--success svg{fill:currentColor}.btn-icon--success:hover:not(:disabled):not(.is-loading){filter:brightness(1.2)}.btn-icon--success:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--success:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--success.is-loading{cursor:wait}.btn-icon--warning{color:#f59e0b;background:0 0}.btn-icon--warning svg{fill:currentColor}.btn-icon--warning:hover:not(:disabled):not(.is-loading){filter:brightness(1.2)}.btn-icon--warning:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--warning:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--warning.is-loading{cursor:wait}.btn-icon--danger{color:#ff4a6b;background:0 0}.btn-icon--danger svg{fill:currentColor}.btn-icon--danger:hover:not(:disabled):not(.is-loading){filter:brightness(1.2)}.btn-icon--danger:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--danger:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--danger.is-loading{cursor:wait}.btn-icon--ghost{color:#8a93a6;background:0 0}.btn-icon--ghost svg{fill:currentColor}.btn-icon--ghost:hover:not(:disabled):not(.is-loading){color:#eceef2}.btn-icon--ghost:active:not(:disabled):not(.is-loading){transform:scale(.92)}.btn-icon--ghost:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-icon--ghost.is-loading{cursor:wait}.form-error{color:#ff4a6b;font-size:13px}.form-hint,.form-label{color:#8a93a6;font-size:13px}.form-label--top{margin:0 0 10px}.form-label--side{margin:10px}.form__item{background:#171b24;width:100%;margin:14px 0;padding:14px;transition:all .3s ease-out}@media (width<=1024px){.form__item{margin:10px 0;padding:10px}}@media (width<=768px){.form__item{margin:6px 0;padding:6px}}.form__actions{background:#171b24;width:100%;margin:14px 0;padding:14px;transition:all .3s ease-out}@media (width<=1024px){.form__actions{margin:10px 0;padding:10px}}@media (width<=768px){.form__actions{margin:6px 0;padding:6px}}.form__actions{flex-direction:row;justify-content:start;align-items:center;gap:10px;display:flex}.base-input{flex-direction:column;display:flex}.base-input__control{color:#eceef2;background:#12151c;border:1px solid #0b0d11;border-radius:0;margin-top:5px;padding:10px;transition:all .3s ease-out}.base-input__control:focus,.base-input__control:focus-visible{border-color:#4f46e5;outline:none;box-shadow:0 0 0 4px #6366f126}.base-input__control:disabled{opacity:.4;cursor:not-allowed}.base-input__control.is-error{border-color:#ff4a6b}.base-input__control.is-error:focus,.base-input__control.is-error:focus-visible{box-shadow:0 0 0 4px #ff4a6b26;border-color:#ff4a6b!important}input[type=date]::-webkit-calendar-picker-indicator{filter:invert(98%)sepia(1%)saturate(678%)hue-rotate(181deg)brightness(98%)contrast(94%)}.base-select{flex-direction:column;display:flex}.base-select__wrapper{position:relative}.base-select__field{color:#eceef2;background:#12151c;border:1px solid #0b0d11;border-radius:0;margin-top:5px;padding:10px;transition:all .3s ease-out}.base-select__field:focus,.base-select__field:focus-visible{border-color:#4f46e5;outline:none;box-shadow:0 0 0 4px #6366f126}.base-select__field:disabled{opacity:.4;cursor:not-allowed}.base-select__field.is-error{border-color:#ff4a6b}.base-select__field.is-error:focus,.base-select__field.is-error:focus-visible{box-shadow:0 0 0 4px #ff4a6b26;border-color:#ff4a6b!important}.base-select__field{appearance:none;cursor:pointer;border-radius:0;width:100%}.base-select__icon{pointer-events:none;color:#8a93a6;font-size:14px;position:absolute;top:50%;right:14px;transform:translateY(-50%)}.base-textarea{flex-direction:column;display:flex}.base-textarea__field{color:#eceef2;background:#12151c;border:1px solid #0b0d11;border-radius:0;margin-top:5px;padding:10px;transition:all .3s ease-out}.base-textarea__field:focus,.base-textarea__field:focus-visible{border-color:#4f46e5;outline:none;box-shadow:0 0 0 4px #6366f126}.base-textarea__field:disabled{opacity:.4;cursor:not-allowed}.base-textarea__field.is-error{border-color:#ff4a6b}.base-textarea__field.is-error:focus,.base-textarea__field.is-error:focus-visible{box-shadow:0 0 0 4px #ff4a6b26;border-color:#ff4a6b!important}.base-textarea__field{resize:vertical;min-height:120px}.base-textarea__field::placeholder{color:#8a93a6}.base-checkbox{position:relative}.base-checkbox__wrapper{cursor:pointer;flex-direction:column;width:100%;display:flex}.base-checkbox__data{-webkit-user-select:none;user-select:none;align-items:center;margin-bottom:6px;display:inline-flex}.base-checkbox__field{opacity:0;appearance:none;width:0;height:0;position:absolute}.base-checkbox__field:focus-visible+.base-checkbox__box{border-color:#4f46e5}.base-checkbox__field:checked+.base-checkbox__box{border-color:#6366f1}.base-checkbox__field:checked+.base-checkbox__box .base-checkbox__check{transform:scale(1)}.base-checkbox__field:disabled+.base-checkbox__box{opacity:.4;cursor:not-allowed}.base-checkbox__box{color:#eceef2;background:#12151c;border:1px solid #0b0d11;border-radius:0;margin-top:5px;padding:10px;transition:all .3s ease-out}.base-checkbox__box:focus,.base-checkbox__box:focus-visible{border-color:#4f46e5;outline:none;box-shadow:0 0 0 4px #6366f126}.base-checkbox__box:disabled{opacity:.4;cursor:not-allowed}.base-checkbox__box.is-error{border-color:#ff4a6b}.base-checkbox__box.is-error:focus,.base-checkbox__box.is-error:focus-visible{box-shadow:0 0 0 4px #ff4a6b26;border-color:#ff4a6b!important}.base-checkbox__box{flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;margin-bottom:4px;display:flex}.base-checkbox__check{color:#eceef2;border-radius:50%;transition:all .3s ease-out;transform:scale(0)}.base-radio{position:relative}.base-radio__wrapper{cursor:pointer;flex-direction:column;width:100%;display:flex}.base-radio__data{-webkit-user-select:none;user-select:none;align-items:center;margin-bottom:6px;display:inline-flex;position:relative}.base-radio__field{opacity:0;appearance:none;width:0;height:0;position:absolute}.base-radio__field:checked+.base-radio__box{border-color:#6366f1}.base-radio__field:checked+.base-radio__box .base-radio__circle{background:#eceef2;transform:scale(1)}.base-radio__field:disabled+.base-radio__box{opacity:.4;cursor:not-allowed}.base-radio__box{color:#eceef2;background:#12151c;border:1px solid #0b0d11;border-radius:0;margin-top:5px;padding:10px;transition:all .3s ease-out}.base-radio__box:focus,.base-radio__box:focus-visible{border-color:#4f46e5;outline:none;box-shadow:0 0 0 4px #6366f126}.base-radio__box:disabled{opacity:.4;cursor:not-allowed}.base-radio__box.is-error{border-color:#ff4a6b}.base-radio__box.is-error:focus,.base-radio__box.is-error:focus-visible{box-shadow:0 0 0 4px #ff4a6b26;border-color:#ff4a6b!important}.base-radio__box{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;margin-bottom:5px;display:flex}.base-radio__circle{background:0 0;border-radius:50%;flex-shrink:0;width:10px;height:10px;transition:all .3s ease-out;display:block;transform:scale(0)}.base-breadcrumbs{white-space:nowrap;max-width:100%;overflow:auto scroll}.base-breadcrumbs__list{align-items:center;list-style:none;display:flex}.base-breadcrumbs__item{align-items:center;display:flex}.base-breadcrumbs__item a,.base-breadcrumbs__item span{margin-top:0;padding-top:0}.base-breadcrumbs__item a:hover{color:#4f46e5}.base-breadcrumbs__item-separator{margin:0 8px}.base-pagination{justify-content:center;align-items:center;gap:8px;width:100%;display:flex}.base-pagination p{padding-top:0;transition:all .3s ease-out;cursor:pointer!important}.base-pagination p:hover{color:#4f46e5}.base-pagination .btn-icon.is-active p{font-weight:700;color:#6366f1!important}.base-pagination__desktop{align-items:center;gap:5px;display:flex}@media (width<=640px){.base-pagination__desktop{display:none}}.base-pagination__mobile{display:none}@media (width<=640px){.base-pagination__mobile{align-items:center;display:flex}}.empty-state{border:1px solid #0b0d11;border-radius:0;padding:10px}.empty-state__text p,.empty-state__text h3{text-align:center}.empty-state__actions{justify-content:center;display:flex}.empty-state--secondary{border-color:#eceef2}.empty-state--primary{border-color:#6366f1}.empty-state--primary p,.empty-state--primary h3,.empty-state--primary a{color:#6366f1}.error-state{border:1px dotted #ff4a6b;border-radius:0;padding:10px}.error-state__action{justify-content:center;display:flex}.base-skeleton{opacity:.4;background:#0b0d11;border-radius:0}.base-skeleton__circle{border-radius:50%;width:50px;height:50px}.base-skeleton__text{width:100%;height:20px}.base-skeleton__rect{width:100%;height:100px}.base-toast-container{z-index:99999;pointer-events:none;position:fixed;top:20px;right:20px}.base-toast{pointer-events:auto;background:#0b0d11;border:1px solid #0b0d11;border-radius:0;width:300px;margin-top:5px;padding:10px;animation:.25s fadeIn;position:relative;overflow:hidden}.base-toast__wrapper{flex-direction:row;justify-content:space-between;align-items:center;display:flex}.base-toast__wrapper p{margin:0;padding:0}.base-toast__progress{pointer-events:none;background:#ffffffb3;height:4px;transition:width .1s linear;position:absolute;bottom:0;left:0}.base-toast--primary{border-color:#6366f1}.base-toast--secondary{border-color:#eceef2}.base-toast--success{border-color:#10b981}.base-toast--warning{border-color:#f59e0b}.base-toast--danger{border-color:#ff4a6b}.toast-enter-active,.toast-leave-active{transition:all .25s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(30px)}.base-modal-backdrop{z-index:10000;pointer-events:auto;background:#00000080;justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;position:fixed;top:0;left:0}.base-modal{background:#171b24;border:1px solid #0b0d11;border-radius:0;width:100%;max-width:450px;padding:24px}.base-modal__header{margin-bottom:16px}.base-modal__content{flex-direction:column;gap:16px;margin-bottom:24px;display:flex}.base-modal__footer{justify-content:flex-end;gap:12px;display:flex}@media (width<=500px){.base-modal{max-width:100%}}.modal-fade-enter-active,.modal-fade-leave-active{transition:opacity .25s}.modal-fade-enter-active .base-modal,.modal-fade-leave-active .base-modal{transition:transform .25s}.modal-fade-enter-from,.modal-fade-leave-to{opacity:0}.modal-fade-enter-from .base-modal,.modal-fade-leave-to .base-modal{transform:translateY(-20px)}.base-modal--primary{border-color:#6366f1}.base-modal--secondary{border-color:#eceef2}.base-modal--success{border-color:#10b981}.base-modal--warning{border-color:#f59e0b}.base-modal--danger{border-color:#ff4a6b}.txt--primary{color:#6366f1}.txt--danger{color:#ff4a6b}.txt--warning{color:#f59e0b}.txt--success{color:#10b981}.txt--secondary{color:#eceef2}.txt--muted{color:#8a93a6}.txt--left{text-align:left}.txt--center{text-align:center}.txt--right{text-align:right}
2
+ /*$vite$:1*/
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "modular-ui-kit-vue",
3
+ "version": "1.0.0",
4
+ "author": "vitinschii.eugenia@gmail.com",
5
+ "description": "A modular, lightweight UI kit built with Vue 3, Pinia, and TypeScript.",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./dist/style.css": "./dist/modular-ui-kit.css",
16
+ "./dist/modular-ui-kit.css": "./dist/modular-ui-kit.css"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "run-p type-check \"build-only {@}\" --",
24
+ "preview": "vite preview",
25
+ "build-only": "vite build",
26
+ "type-check": "vue-tsc --build",
27
+ "lint": "run-s \"lint:*\"",
28
+ "lint:oxlint": "oxlint . --fix",
29
+ "lint:eslint": "eslint . --fix --cache",
30
+ "format": "prettier --write --experimental-cli src/"
31
+ },
32
+ "peerDependencies": {
33
+ "pinia": "^3.0.4",
34
+ "vue": "^3.5.38",
35
+ "vue-router": "^4.6.4"
36
+ },
37
+ "dependencies": {
38
+ "axios": "^1.18.0"
39
+ },
40
+ "devDependencies": {
41
+ "@tsconfig/node24": "^24.0.4",
42
+ "@types/node": "^24.13.2",
43
+ "@vitejs/plugin-vue": "^6.0.7",
44
+ "@vue/eslint-config-typescript": "^14.8.0",
45
+ "@vue/tsconfig": "^0.9.1",
46
+ "eslint": "^10.5.0",
47
+ "eslint-config-prettier": "^10.1.8",
48
+ "eslint-plugin-oxlint": "~1.69.0",
49
+ "eslint-plugin-vue": "~10.9.2",
50
+ "jiti": "^2.7.0",
51
+ "npm-run-all2": "^9.0.2",
52
+ "oxlint": "~1.69.0",
53
+ "prettier": "3.8.4",
54
+ "sass": "^1.101.0",
55
+ "typescript": "~6.0.0",
56
+ "vite": "^8.0.16",
57
+ "vite-plugin-vue-devtools": "^8.1.2",
58
+ "vue-eslint-parser": "^10.4.1",
59
+ "vue-tsc": "^3.3.5"
60
+ },
61
+ "engines": {
62
+ "node": "^22.18.0 || >=24.12.0"
63
+ }
64
+ }