@shtabapp/ui-kit 1.58.0 → 1.59.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.58.0",
3
+ "version": "1.59.0",
4
4
  "description": "Vue 3 component library by Shtab — 30+ typed components, design tokens, light/dark themes",
5
5
  "keywords": [
6
6
  "shtab",
@@ -264,7 +264,7 @@
264
264
  "dependencies": {
265
265
  "chart.js": "^4.5.0",
266
266
  "vue-i18n": "^9.14.5",
267
- "@shtabapp/ui-kit-primitives": "^1.25.0",
267
+ "@shtabapp/ui-kit-primitives": "^1.26.0",
268
268
  "@shtabapp/ui-kit-tokens": "^1.19.0"
269
269
  },
270
270
  "devDependencies": {
@@ -1 +0,0 @@
1
- let e=require("vue");var t=function(e){return e.BLUE=`blue`,e.RED=`red`,e.WHITE=`white`,e.BILLING=`billing`,e}({}),n=function(e){return e.SIZE_20=`20`,e.SIZE_24=`24`,e.SIZE_32=`32`,e}({}),r=[`tabindex`,`aria-disabled`,`inert`],i={class:`s-ui-chip__content`},a={key:0,class:`s-ui-chip__icon`},o={key:1,class:`s-ui-chip__prefix`},s={key:0,class:`s-ui-chip__actions`},c=(0,e.defineComponent)({__name:`SChip`,props:{color:{default:()=>t.BLUE},disabled:{type:Boolean,default:!1},size:{default:()=>n.SIZE_32}},setup(c){let l=(0,e.useSlots)(),u=(0,e.computed)(()=>c.color===t.BILLING),d=(0,e.computed)(()=>c.disabled?!1:u.value),f=(0,e.computed)(()=>c.disabled?-1:0),p=(0,e.computed)(()=>[`s-ui-chip--color-${c.color}`,`s-ui-chip--size-${c.size}`,{"s-ui-chip--disabled":c.disabled}]),m=(0,e.computed)(()=>c.size===n.SIZE_20?`s-ui-typography-label-12-medium`:`s-ui-typography-label-14-medium`),h={[n.SIZE_20]:16,[n.SIZE_24]:20,[n.SIZE_32]:20},g=(0,e.computed)(()=>h[c.size]);return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{class:(0,e.normalizeClass)([`s-ui-chip`,p.value]),tabindex:f.value,role:`group`,"aria-disabled":c.disabled?!0:void 0,inert:c.disabled?!0:void 0},[(0,e.createElementVNode)(`span`,i,[(0,e.unref)(l).icon?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,a,[(0,e.renderSlot)(t.$slots,`icon`,{billing:d.value,disabled:c.disabled,size:g.value})])):(0,e.createCommentVNode)(``,!0),(0,e.unref)(l).prefix?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,o,[(0,e.renderSlot)(t.$slots,`prefix`,{disabled:c.disabled,size:c.size})])):(0,e.createCommentVNode)(``,!0),(0,e.unref)(l).default?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:2,class:(0,e.normalizeClass)([`s-ui-chip__label`,m.value])},[(0,e.renderSlot)(t.$slots,`default`)],2)):(0,e.createCommentVNode)(``,!0)]),(0,e.unref)(l).actions?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,s,[(0,e.renderSlot)(t.$slots,`actions`,{billing:u.value,disabled:c.disabled})])):(0,e.createCommentVNode)(``,!0)],10,r))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,67 +0,0 @@
1
- import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, unref as c, useSlots as l } from "vue";
2
- //#region src/components/SChip/SChip.types.ts
3
- var u = /* @__PURE__ */ function(e) {
4
- return e.BLUE = "blue", e.RED = "red", e.WHITE = "white", e.BILLING = "billing", e;
5
- }({}), d = /* @__PURE__ */ function(e) {
6
- return e.SIZE_20 = "20", e.SIZE_24 = "24", e.SIZE_32 = "32", e;
7
- }({}), f = [
8
- "tabindex",
9
- "aria-disabled",
10
- "inert"
11
- ], p = { class: "s-ui-chip__content" }, m = {
12
- key: 0,
13
- class: "s-ui-chip__icon"
14
- }, h = {
15
- key: 1,
16
- class: "s-ui-chip__prefix"
17
- }, g = {
18
- key: 0,
19
- class: "s-ui-chip__actions"
20
- }, _ = /* @__PURE__ */ i({
21
- __name: "SChip",
22
- props: {
23
- color: { default: () => u.BLUE },
24
- disabled: {
25
- type: Boolean,
26
- default: !1
27
- },
28
- size: { default: () => d.SIZE_32 }
29
- },
30
- setup(i) {
31
- let _ = l(), v = e(() => i.color === u.BILLING), y = e(() => i.disabled ? !1 : v.value), b = e(() => i.disabled ? -1 : 0), x = e(() => [
32
- `s-ui-chip--color-${i.color}`,
33
- `s-ui-chip--size-${i.size}`,
34
- { "s-ui-chip--disabled": i.disabled }
35
- ]), S = e(() => i.size === d.SIZE_20 ? "s-ui-typography-label-12-medium" : "s-ui-typography-label-14-medium"), C = {
36
- [d.SIZE_20]: 16,
37
- [d.SIZE_24]: 20,
38
- [d.SIZE_32]: 20
39
- }, w = e(() => C[i.size]);
40
- return (e, l) => (o(), n("span", {
41
- class: a(["s-ui-chip", x.value]),
42
- tabindex: b.value,
43
- role: "group",
44
- "aria-disabled": i.disabled ? !0 : void 0,
45
- inert: i.disabled ? !0 : void 0
46
- }, [r("span", p, [
47
- c(_).icon ? (o(), n("span", m, [s(e.$slots, "icon", {
48
- billing: y.value,
49
- disabled: i.disabled,
50
- size: w.value
51
- })])) : t("", !0),
52
- c(_).prefix ? (o(), n("span", h, [s(e.$slots, "prefix", {
53
- disabled: i.disabled,
54
- size: i.size
55
- })])) : t("", !0),
56
- c(_).default ? (o(), n("span", {
57
- key: 2,
58
- class: a(["s-ui-chip__label", S.value])
59
- }, [s(e.$slots, "default")], 2)) : t("", !0)
60
- ]), c(_).actions ? (o(), n("span", g, [s(e.$slots, "actions", {
61
- billing: v.value,
62
- disabled: i.disabled
63
- })])) : t("", !0)], 10, f));
64
- }
65
- });
66
- //#endregion
67
- export { u as n, d as r, _ as t };