@shtabapp/ui-kit 1.78.4 → 1.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{SButton-DIWMMCSc.js → SButton-B21hubD2.js} +46 -33
  3. package/dist/SButton-BxsPvcET.cjs +1 -0
  4. package/dist/{SChip-BCB1bvua.cjs → SChip-no4cGQNB.cjs} +1 -1
  5. package/dist/{SChip-C6d9oIYL.js → SChip-suCSzJ9O.js} +1 -1
  6. package/dist/{SColorPicker-CIAkM4kx.js → SColorPicker-C5pA54Q3.js} +2 -2
  7. package/dist/{SColorPicker-Dac8mDye.cjs → SColorPicker-DHjY2NVd.cjs} +1 -1
  8. package/dist/{SInput-CGlUBCkW.js → SInput-DRV4XHWh.js} +1 -1
  9. package/dist/{SInput-fT-S-Tko.cjs → SInput-Doale-L0.cjs} +1 -1
  10. package/dist/{SList-Vg9nx1oe.cjs → SList-B98BGyt8.cjs} +1 -1
  11. package/dist/{SList-BuuCfuHg.js → SList-DuSCQL0t.js} +1 -1
  12. package/dist/{SListItem-CDlsjhA3.js → SListItem-B3MQgu4Q.js} +1 -1
  13. package/dist/{SListItem-DMjtJXxV.cjs → SListItem-CZtR8bgI.cjs} +1 -1
  14. package/dist/{SPhotoEdit-BxxycqvA.js → SPhotoEdit-CuVHNypX.js} +1 -1
  15. package/dist/{SPhotoEdit-B4ujF5Dh.cjs → SPhotoEdit-D3a1Ptp0.cjs} +1 -1
  16. package/dist/{SSelect-BznJn8Q8.js → SSelect-BU4eSrVf.js} +4 -4
  17. package/dist/{SSelect-CB2XQ4dU.cjs → SSelect-CPQIcGhK.cjs} +1 -1
  18. package/dist/{STable-BgbWclBb.js → STable-BTKXjbrB.js} +2 -2
  19. package/dist/{STable-CNl_VYLc.cjs → STable-RmVTPyg2.cjs} +1 -1
  20. package/dist/{STabs-BYbsRtvi.js → STabs-B07Q6QYO.js} +1 -1
  21. package/dist/{STabs-DDP-2p6T.cjs → STabs-JtF4ca3o.cjs} +1 -1
  22. package/dist/{STag-DWjv_Za8.js → STag-BKLs0RRY.js} +1 -1
  23. package/dist/{STag-nqzlv8OZ.cjs → STag-Btut_n-4.cjs} +1 -1
  24. package/dist/{STagGroup-DEPpEU5C.js → STagGroup-CNZVwrG2.js} +1 -1
  25. package/dist/{STagGroup-CYEI9OXO.cjs → STagGroup-Ddeb_8Ot.cjs} +1 -1
  26. package/dist/components/SButton/SButton.types.d.ts +5 -1
  27. package/dist/components/SButton/SButton.types.d.ts.map +1 -1
  28. package/dist/components/SButton/SButton.vue.d.ts.map +1 -1
  29. package/dist/components/SButton/utils/useButtonBadge.d.ts +2 -1
  30. package/dist/components/SButton/utils/useButtonBadge.d.ts.map +1 -1
  31. package/dist/entries/button.cjs +1 -1
  32. package/dist/entries/button.js +1 -1
  33. package/dist/entries/chip.cjs +1 -1
  34. package/dist/entries/chip.js +1 -1
  35. package/dist/entries/color-picker.cjs +1 -1
  36. package/dist/entries/color-picker.js +1 -1
  37. package/dist/entries/input.cjs +1 -1
  38. package/dist/entries/input.js +1 -1
  39. package/dist/entries/list-item.cjs +1 -1
  40. package/dist/entries/list-item.js +1 -1
  41. package/dist/entries/list.cjs +1 -1
  42. package/dist/entries/list.js +1 -1
  43. package/dist/entries/photo-edit.cjs +1 -1
  44. package/dist/entries/photo-edit.js +1 -1
  45. package/dist/entries/select.cjs +1 -1
  46. package/dist/entries/select.js +1 -1
  47. package/dist/entries/table.cjs +1 -1
  48. package/dist/entries/table.js +1 -1
  49. package/dist/entries/tabs.cjs +1 -1
  50. package/dist/entries/tabs.js +1 -1
  51. package/dist/entries/tag-group.cjs +1 -1
  52. package/dist/entries/tag-group.js +2 -2
  53. package/dist/entries/tag.cjs +1 -1
  54. package/dist/entries/tag.js +1 -1
  55. package/dist/index.cjs +1 -1
  56. package/dist/index.js +12 -12
  57. package/dist/uikit-components.css +1 -1
  58. package/package.json +1 -1
  59. package/dist/SButton-BCgdXE_B.cjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shtabapp/ui-kit",
3
- "version": "1.78.4",
3
+ "version": "1.79.0",
4
4
  "description": "Vue 3 component library by Shtab — 30+ typed components, design tokens, light/dark themes",
5
5
  "keywords": [
6
6
  "shtab",
@@ -1 +0,0 @@
1
- const e=require("./SBadge-d1GOPFP-.cjs"),t=require("./context-kCi2xRHY.cjs"),n=require("./useSelectionGroup-NJvi3hNo.cjs"),r=require("./useSelectLink-DZIAhQ2J.cjs"),i=require("./useLink-1LLWpdDZ.cjs");let a=require("vue"),o=require("@shtabapp/ui-kit-primitives");var s=function(e){return e.MAJOR=`major`,e.MINOR=`minor`,e.SURFACE=`surface`,e.OUTLINED=`outlined`,e.BARE=`bare`,e}({}),c=function(e){return e.MAIN=`main`,e.NEUTRAL=`neutral`,e.DANGER=`danger`,e.SUCCESS=`success`,e.BILLING=`billing`,e}({}),l=function(e){return e.SMALL=`small`,e.MEDIUM=`medium`,e.LARGE=`large`,e}({}),u={offsetX:1,offsetY:-1},d={[l.SMALL]:{offsetX:-6,offsetY:6},[l.MEDIUM]:{offsetX:-7,offsetY:7},[l.LARGE]:{offsetX:-8,offsetY:8}},f={[l.SMALL]:e.i.SMALL,[l.MEDIUM]:e.i.SMALL,[l.LARGE]:e.i.MEDIUM},p=({color:t,counterValue:n})=>{if(typeof n==`number`)return{anchored:!0,color:t,offsetX:u.offsetX,offsetY:u.offsetY,placement:e.r.TOP_END,size:e.i.MEDIUM,value:n}},m=({buttonSize:t,color:n,indicator:r})=>{if(!r)return;let i=d[t];return{anchored:!0,color:n,offsetX:i.offsetX,offsetY:i.offsetY,placement:e.r.TOP_END,size:f[t]}},h=({badgeColor:t,counter:n,indicator:r,size:i})=>({buttonBadgeProps:(0,a.computed)(()=>{let o=(0,a.toValue)(t)||e.n.MAIN;return p({color:o,counterValue:(0,a.toValue)(n)})||m({buttonSize:(0,a.toValue)(i),color:o,indicator:(0,a.toValue)(r)})})}),g=[`aria-hidden`],_={key:0,class:`s-ui-button__spinner`,"aria-hidden":`true`},v=(0,a.defineComponent)({inheritAttrs:!1,__name:`SButton`,props:{appearance:{},badgeColor:{},counter:{},disabled:{type:Boolean,default:!1},icon:{},iconLeft:{},iconRight:{},indicator:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{},value:{},variant:{},link:{},exact:{type:Boolean,default:!1},replace:{type:Boolean,default:!1}},setup(u){let d=(0,a.inject)(t.t,null),f=(0,a.useAttrs)(),p=(0,a.computed)(()=>n.a(u.appearance,d?(0,a.toValue)(d.appearance):void 0,s.MAJOR)),m=(0,a.computed)(()=>n.a(u.variant,d?(0,a.toValue)(d.variant):void 0,c.MAIN)),v=(0,a.computed)(()=>n.a(u.size,d?(0,a.toValue)(d.size):void 0,l.MEDIUM)),y=(0,a.computed)(()=>u.disabled||!!(d&&(0,a.toValue)(d.disabled))),b=(0,a.useTemplateRef)(`buttonRootRef`),{buttonBadgeProps:x}=h({badgeColor:()=>u.badgeColor,counter:()=>u.counter,indicator:()=>u.indicator,size:()=>v.value}),S=i.t(()=>u.link,()=>u.exact,()=>u.replace),C=S.linkPresentation;r.t({isRouterLink:S.isRouterLink,isActive:S.isActive,group:()=>d,value:()=>u.value});let w=(0,a.computed)(()=>{let e=C.value;return e.mode===`none`?`button`:e.rootTag}),T=(0,a.computed)(()=>w.value===`button`),E=(0,a.computed)(()=>y.value||u.loading),D=r.n({group:d,value:()=>u.value,el:b,disabled:y,interactive:()=>!E.value}),O=(0,a.computed)(()=>S.isRouterLink.value?S.isActive.value:D.isActive.value),k=(0,a.computed)(()=>[`s-ui-button`,`s-ui-button--tab-focus`,`s-ui-button--appearance-${p.value}`,`s-ui-button--variant-${m.value}`,`s-ui-button--size-${v.value}`,{"s-ui-button--disabled":y.value,"s-ui-button--loading":u.loading,"s-ui-button--icon-only":u.icon,"s-ui-button--full-width":u.fullWidth,"s-ui-button--active":O.value,"s-ui-button--link":C.value.mode!==`none`}]),A=(0,a.computed)(()=>({disabled:T.value?E.value:void 0,"aria-busy":u.loading?!0:void 0,role:D.ariaChecked.value?`radio`:void 0,"aria-pressed":D.ariaPressed.value,"aria-checked":D.ariaChecked.value,tabindex:D.tabIndex.value,...i.n(C.value,{replace:u.replace})})),j=(0,a.computed)(()=>({...A.value,...f})),M={[l.SMALL]:`s-ui-typography-label-12-medium`,[l.MEDIUM]:`s-ui-typography-label-14-medium`,[l.LARGE]:`s-ui-typography-label-16-medium`},N=(0,a.computed)(()=>M[v.value]),P={[l.SMALL]:16,[l.MEDIUM]:20,[l.LARGE]:24},F=(0,a.computed)(()=>P[v.value]),I=(0,a.computed)(()=>y.value||u.loading?!1:m.value===c.BILLING&&p.value!==s.MAJOR),L=(0,a.computed)(()=>m.value===c.BILLING&&p.value!==s.MAJOR),R=e=>{if(!E.value){if(S.isRouterLink.value&&(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)){e.preventDefault(),S.navigate();return}D.handleKeydown(e)}},z=e=>{if(E.value){e.preventDefault(),e.stopPropagation();return}S.isRouterLink.value||D.handleClick()};return(t,n)=>((0,a.openBlock)(),(0,a.createBlock)((0,a.resolveDynamicComponent)(w.value),(0,a.mergeProps)({ref_key:`buttonRootRef`,ref:b,class:k.value},j.value,{onClick:z,onKeydown:R}),{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`span`,{class:`s-ui-button__inner`,"aria-hidden":u.loading?!0:void 0},[u.icon?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.SIcon),{key:0,name:u.icon,size:F.value,billing:I.value},null,8,[`name`,`size`,`billing`])):((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:1},[u.iconLeft?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.SIcon),{key:0,name:u.iconLeft,size:F.value,billing:I.value},null,8,[`name`,`size`,`billing`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`s-ui-button__label`,N.value])},[(0,a.renderSlot)(t.$slots,`default`)],2),u.iconRight?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.SIcon),{key:1,name:u.iconRight,size:F.value,billing:I.value},null,8,[`name`,`size`,`billing`])):(0,a.createCommentVNode)(``,!0)],64))],8,g),u.loading?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,_,[(0,a.createVNode)((0,a.unref)(o.SSpinner),{billing:L.value,size:F.value},null,8,[`billing`,`size`])])):(0,a.createCommentVNode)(``,!0),(0,a.unref)(x)?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(e.t),(0,a.normalizeProps)((0,a.mergeProps)({key:1},(0,a.unref)(x))),null,16)):(0,a.createCommentVNode)(``,!0)]),_:3},16,[`class`]))}});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return v}});