@shtabapp/ui-kit 1.82.1 → 1.83.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shtabapp/ui-kit",
3
- "version": "1.82.1",
3
+ "version": "1.83.0",
4
4
  "description": "Vue 3 component library by Shtab — 30+ typed components, design tokens, light/dark themes",
5
5
  "keywords": [
6
6
  "shtab",
@@ -279,8 +279,8 @@
279
279
  "dependencies": {
280
280
  "chart.js": "^4.5.0",
281
281
  "vue-i18n": "^9.14.5",
282
- "@shtabapp/ui-kit-primitives": "^1.37.0",
283
- "@shtabapp/ui-kit-tokens": "^1.24.0"
282
+ "@shtabapp/ui-kit-primitives": "^1.38.0",
283
+ "@shtabapp/ui-kit-tokens": "^1.25.0"
284
284
  },
285
285
  "devDependencies": {
286
286
  "@atlaskit/pragmatic-drag-and-drop": "^3.0.0",
@@ -1 +0,0 @@
1
- const e=require("./useLink-1LLWpdDZ.cjs"),t=require("./SCheckbox-Dkbk21Id.cjs");let n=require("vue"),r=require("@shtabapp/ui-kit-primitives");var i=function(e){return e.CARD=`card`,e.LIST=`list`,e}({}),a={key:0,class:`s-ui-card__content s-ui-card__content--skeleton`},o={class:`s-ui-card__content`},s={class:`s-ui-card__icon`,"aria-hidden":`true`},c={class:`s-ui-card__text`},l={key:0,class:`s-ui-card__title s-ui-typography-heading-h6-semibold`},u={key:1,class:`s-ui-card__subtitle s-ui-typography-body-12-regular`},d={key:0,class:`s-ui-card__meta s-ui-typography-label-12-medium`},f={key:0,class:`s-ui-card__selected-indicator`,"aria-hidden":`true`,inert:``},p=(0,n.defineComponent)({inheritAttrs:!1,__name:`SCard`,props:(0,n.mergeModels)({layout:{default:()=>i.CARD},title:{},subtitle:{},icon:{default:`page`},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},link:{},exact:{type:Boolean,default:!1},replace:{type:Boolean,default:!1}},{selected:{type:Boolean,default:!1},selectedModifiers:{}}),emits:(0,n.mergeModels)([`click`,`keydown`],[`update:selected`]),setup(p,{emit:m}){let h=(0,n.useModel)(p,`selected`),g=m,_=(0,n.useSlots)(),v=(0,n.useAttrs)(),y=e.t(()=>p.link,()=>p.exact,()=>p.replace),b=y.linkPresentation,x=(0,n.computed)(()=>p.disabled||p.skeleton),S=y.isLink,C=(0,n.computed)(()=>b.value.mode===`none`?`div`:b.value.rootTag),w=(0,n.computed)(()=>{if(x.value)return-1;if(!S.value)return 0}),T=(0,n.computed)(()=>({"aria-busy":p.skeleton?!0:void 0,"aria-disabled":x.value?!0:void 0,"aria-pressed":p.selectable&&!x.value&&!S.value&&h.value?!0:void 0,role:x.value||S.value?void 0:`button`,tabindex:w.value,...e.n(b.value,{replace:p.replace})})),E=(0,n.computed)(()=>({...T.value,...v})),D=(0,n.computed)(()=>p.selectable&&!x.value),O=(0,n.computed)(()=>p.layout===i.LIST?r.ESSkeletonType.S_CARD_LIST:r.ESSkeletonType.S_CARD),k=(0,n.computed)(()=>[`s-ui-card--layout-${p.layout}`,{"s-ui-card--selected":h.value,"s-ui-card--selectable":p.selectable,"s-ui-card--disabled":p.disabled,"s-ui-card--skeleton":p.skeleton,"s-ui-card--link":S.value,"s-ui-card--with-subtitle":!!(p.subtitle||_.subtitle)}]),A=e=>{if(x.value){e.preventDefault();return}if(y.isRouterLink.value){g(`click`,e);return}p.selectable&&(h.value=!h.value),g(`click`,e)},j=[`Enter`,` `,`Spacebar`],M=[`Enter`,` `],N=e=>{if(!x.value){if(g(`keydown`,e),y.isRouterLink.value&&j.includes(e.key)){e.preventDefault(),y.navigate();return}S.value||M.includes(e.key)&&(e.preventDefault(),e.currentTarget instanceof HTMLElement&&e.currentTarget.click())}};return(e,i)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(C.value),(0,n.mergeProps)({class:[`s-ui-card`,k.value]},E.value,{onClick:A,onKeydown:N}),{default:(0,n.withCtx)(()=>[p.skeleton?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,a,[(0,n.createVNode)((0,n.unref)(r.SSkeleton),{class:`s-ui-card__skeleton`,type:O.value},null,8,[`type`])])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createElementVNode)(`div`,o,[(0,n.createElementVNode)(`span`,s,[(0,n.renderSlot)(e.$slots,`icon`,{},()=>[(0,n.createVNode)((0,n.unref)(r.SIcon),{name:p.icon,size:16},null,8,[`name`])])]),(0,n.createElementVNode)(`span`,c,[p.title||_.title?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,l,[(0,n.renderSlot)(e.$slots,`title`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(p.title),1)])])):(0,n.createCommentVNode)(``,!0),p.subtitle||_.subtitle?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,u,[(0,n.renderSlot)(e.$slots,`subtitle`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(p.subtitle),1)])])):(0,n.createCommentVNode)(``,!0)]),_.meta?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,d,[(0,n.renderSlot)(e.$slots,`meta`)])):(0,n.createCommentVNode)(``,!0)]),D.value?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,f,[(0,n.renderSlot)(e.$slots,`selected-indicator`,{},()=>[(0,n.createVNode)((0,n.unref)(t.t),{"model-value":h.value,size:(0,n.unref)(t.i).EXTRA_SMALL},null,8,[`model-value`,`size`])])])):(0,n.createCommentVNode)(``,!0)],64))]),_:3},16,[`class`]))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});