@scalar/components 0.13.14 → 0.13.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AAqHA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,KAAK,IAAI,EAAiB,MAAM,KAAK,CAAA;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAsF9C,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;QAlIhD,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;QAVR,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;;;;;;EA6HT;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AAyHA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,KAAK,IAAI,EAAiB,MAAM,KAAK,CAAA;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA0F9C,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;QAtIhD,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;QAVR,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;;;;;;EAiIT;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -16,11 +16,15 @@ const I = /* @__PURE__ */ z({
16
16
  setup(c) {
17
17
  const t = c, n = f(null), r = f(null), i = a(() => {
18
18
  var e;
19
- if (typeof t.target == "string") {
20
- const o = document.getElementById(t.target);
21
- if (o) return o;
22
- console.warn(`ScalarFloating: Target with id="${t.target}" not found`);
23
- } else if (t.target instanceof HTMLElement) return t.target;
19
+ if (typeof window < "u") {
20
+ if (typeof t.target == "string") {
21
+ const o = document.getElementById(t.target);
22
+ if (o) return o;
23
+ console.warn(
24
+ `ScalarFloating: Target with id="${t.target}" not found`
25
+ );
26
+ } else if (t.target instanceof HTMLElement) return t.target;
27
+ }
24
28
  if (r.value)
25
29
  return ((e = r.value.children) == null ? void 0 : e[0]) || r.value;
26
30
  }), s = T(i, {
@@ -29,7 +33,7 @@ const I = /* @__PURE__ */ z({
29
33
  () => g(t.placement || "bottom") === "y" ? s.width.value : void 0
30
34
  ), h = a(
31
35
  () => g(t.placement || "bottom") === "x" ? s.height.value : void 0
32
- ), { floatingStyles: v, middlewareData: y } = x(i, n, {
36
+ ), { floatingStyles: y, middlewareData: v } = x(i, n, {
33
37
  placement: a(() => t.placement),
34
38
  whileElementsMounted: C,
35
39
  middleware: a(() => [
@@ -65,10 +69,10 @@ const I = /* @__PURE__ */ z({
65
69
  ref_key: "floatingRef",
66
70
  ref: n,
67
71
  class: "relative z-overlay",
68
- style: R(l(v))
72
+ style: R(l(y))
69
73
  }, [
70
74
  p(e.$slots, "floating", {
71
- data: l(y),
75
+ data: l(v),
72
76
  height: h.value,
73
77
  width: u.value
74
78
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuTeamPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"names":[],"mappings":"AAkGA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAK9D,KAAK,WAAW,GAAG;IACjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACvC,uCAAuC;IACvC,KAAK,EAAE,oBAAoB,EAAE,CAAA;CAC9B,CAAC;;;;;;;;AAwLF,wBAOG"}
1
+ {"version":3,"file":"ScalarMenuTeamPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"names":[],"mappings":"AAkGA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAK9D,KAAK,WAAW,GAAG;IACjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACvC,uCAAuC;IACvC,KAAK,EAAE,oBAAoB,EAAE,CAAA;CAC9B,CAAC;;;;;;;;AAyLF,wBAOG"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as o, createVNode as a, mergeProps as v, createElementVNode as k, createElementBlock as x, Fragment as C, renderList as S, createTextVNode as w } from "vue";
2
- import { DropdownMenu as m } from "radix-vue/namespaced";
1
+ import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as r, createVNode as a, mergeProps as v, createElementVNode as k, createElementBlock as x, Fragment as C, renderList as S, createTextVNode as w } from "vue";
2
+ import { DropdownMenu as s } from "radix-vue/namespaced";
3
3
  import V from "./ScalarMenuTeamProfile.vue.js";
4
4
  import $ from "./ScalarMenuLink.vue.js";
5
5
  import B from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
6
- import p from "../ScalarDropdown/ScalarDropdownButton.vue.js";
6
+ import c from "../ScalarDropdown/ScalarDropdownButton.vue.js";
7
7
  import I from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
8
- import f from "../ScalarIcon/ScalarIcon.vue.js";
8
+ import p from "../ScalarIcon/ScalarIcon.vue.js";
9
9
  const M = /* @__PURE__ */ g({
10
10
  inheritAttrs: !1,
11
11
  __name: "ScalarMenuTeamPicker",
@@ -14,26 +14,26 @@ const M = /* @__PURE__ */ g({
14
14
  teams: {}
15
15
  },
16
16
  emits: ["update:team", "add"],
17
- setup(c, { emit: _ }) {
18
- const i = c, d = _, s = b({
17
+ setup(f, { emit: _ }) {
18
+ const i = f, d = _, m = b({
19
19
  get: () => {
20
- var r;
21
- return (r = i.team) == null ? void 0 : r.id;
20
+ var o;
21
+ return (o = i.team) == null ? void 0 : o.id;
22
22
  },
23
- set: (r) => d(
23
+ set: (o) => d(
24
24
  "update:team",
25
- i.teams.find((t) => t.id === r)
25
+ i.teams.find((t) => t.id === o)
26
26
  )
27
27
  });
28
- return (r, t) => (n(), u(e(m).Sub, null, {
29
- default: o(() => [
28
+ return (o, t) => (n(), u(e(s).Sub, null, {
29
+ default: r(() => [
30
30
  a(e($), v({
31
- is: e(m).SubTrigger,
31
+ is: e(s).SubTrigger,
32
32
  icon: "UserSwitch"
33
- }, r.$attrs), {
34
- default: o(() => [
33
+ }, o.$attrs), {
34
+ default: r(() => [
35
35
  t[2] || (t[2] = k("div", null, "Change team", -1)),
36
- a(e(f), {
36
+ a(e(p), {
37
37
  class: "ml-auto text-c-2 -mr-0.25",
38
38
  icon: "ChevronRight",
39
39
  size: "sm"
@@ -41,27 +41,27 @@ const M = /* @__PURE__ */ g({
41
41
  ]),
42
42
  _: 1
43
43
  }, 16, ["is"]),
44
- a(e(m).Portal, null, {
45
- default: o(() => [
46
- a(e(m).SubContent, {
44
+ a(e(s).Portal, null, {
45
+ default: r(() => [
46
+ a(e(s).SubContent, {
47
47
  as: e(B),
48
48
  class: "max-h-radix-popper",
49
49
  sideOffset: 3
50
50
  }, {
51
- default: o(() => [
52
- a(e(m).RadioGroup, {
53
- modelValue: s.value,
54
- "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value = l),
55
- as: "template"
51
+ default: r(() => [
52
+ a(e(s).RadioGroup, {
53
+ modelValue: m.value,
54
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => m.value = l),
55
+ class: "contents"
56
56
  }, {
57
- default: o(() => [
58
- (n(!0), x(C, null, S(r.teams, (l) => (n(), u(e(m).RadioItem, {
57
+ default: r(() => [
58
+ (n(!0), x(C, null, S(o.teams, (l) => (n(), u(e(s).RadioItem, {
59
59
  key: l.id,
60
- as: e(p),
60
+ as: e(c),
61
61
  class: "group/item",
62
62
  value: l.id
63
63
  }, {
64
- default: o(() => [
64
+ default: r(() => [
65
65
  a(V, {
66
66
  class: "-ml-0.75 flex-1 min-w-0",
67
67
  label: l.label,
@@ -69,7 +69,7 @@ const M = /* @__PURE__ */ g({
69
69
  }, null, 8, ["label", "src"]),
70
70
  a(e(I), {
71
71
  class: "ml-auto",
72
- selected: l.id === s.value
72
+ selected: l.id === m.value
73
73
  }, null, 8, ["selected"])
74
74
  ]),
75
75
  _: 2
@@ -77,12 +77,12 @@ const M = /* @__PURE__ */ g({
77
77
  ]),
78
78
  _: 1
79
79
  }, 8, ["modelValue"]),
80
- a(e(m).Item, {
81
- as: e(p),
80
+ a(e(s).Item, {
81
+ as: e(c),
82
82
  onClick: t[1] || (t[1] = (l) => d("add"))
83
83
  }, {
84
- default: o(() => [
85
- a(e(f), {
84
+ default: r(() => [
85
+ a(e(p), {
86
86
  class: "bg-b-3 -ml-0.75 rounded p-0.75 size-5 text-c-3",
87
87
  icon: "Add",
88
88
  thickness: "1.75"
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuTeamProfile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamProfile.vue"],"names":[],"mappings":"AAyCA,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;AA4FF,wBAMG"}
1
+ {"version":3,"file":"ScalarMenuTeamProfile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamProfile.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;AA4FF,wBAMG"}
@@ -1,10 +1,11 @@
1
- import { defineComponent as n, openBlock as r, createElementBlock as s, normalizeProps as a, guardReactiveProps as i, unref as t, Fragment as c, createTextVNode as m, toDisplayString as l, createBlock as d, createCommentVNode as u } from "vue";
2
- import { useBindCx as f } from "../../hooks/useBindCx.js";
3
- import p from "../ScalarIcon/ScalarIcon.vue.js";
4
- const b = ["src"], g = {
1
+ import { defineComponent as n, openBlock as r, createElementBlock as t, normalizeProps as a, guardReactiveProps as i, unref as s, Fragment as c, createTextVNode as m, toDisplayString as l, createBlock as d, createCommentVNode as u } from "vue";
2
+ import { useBindCx as p } from "../../hooks/useBindCx.js";
3
+ import f from "../ScalarIcon/ScalarIcon.vue.js";
4
+ const b = ["src"], h = {
5
5
  key: 1,
6
+ "aria-hidden": "true",
6
7
  class: "flex items-center justify-center text-3xs font-medium text-c-3 size-5 bg-b-3 rounded"
7
- }, h = {
8
+ }, g = {
8
9
  key: 2,
9
10
  class: "flex-1 truncate"
10
11
  }, z = /* @__PURE__ */ n({
@@ -15,22 +16,23 @@ const b = ["src"], g = {
15
16
  label: {}
16
17
  },
17
18
  setup(k) {
18
- const { cx: o } = f();
19
- return (e, y) => (r(), s("div", a(i(t(o)("flex h-full items-center gap-1"))), [
20
- e.src ? (r(), s("img", {
19
+ const { cx: o } = p();
20
+ return (e, y) => (r(), t("div", a(i(s(o)("flex h-full items-center gap-1"))), [
21
+ e.src ? (r(), t("img", {
21
22
  key: 0,
22
23
  class: "size-5 rounded",
24
+ role: "presentation",
23
25
  src: e.src
24
- }, null, 8, b)) : (r(), s("div", g, [
25
- e.label && e.label.length > 0 ? (r(), s(c, { key: 0 }, [
26
+ }, null, 8, b)) : (r(), t("div", h, [
27
+ e.label && e.label.length > 0 ? (r(), t(c, { key: 0 }, [
26
28
  m(l(e.label[0]), 1)
27
- ], 64)) : (r(), d(t(p), {
29
+ ], 64)) : (r(), d(s(f), {
28
30
  key: 1,
29
31
  icon: "Users",
30
32
  size: "xs"
31
33
  }))
32
34
  ])),
33
- e.label && e.label.length > 0 ? (r(), s("div", h, l(e.label), 1)) : u("", !0)
35
+ e.label && e.label.length > 0 ? (r(), t("div", g, l(e.label), 1)) : u("", !0)
34
36
  ], 16));
35
37
  }
36
38
  });
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/components"
12
12
  },
13
- "version": "0.13.14",
13
+ "version": "0.13.16",
14
14
  "engines": {
15
15
  "node": ">=18"
16
16
  },
@@ -38,9 +38,9 @@
38
38
  "radix-vue": "^1.9.3",
39
39
  "tailwind-merge": "^2.5.5",
40
40
  "vue": "^3.5.12",
41
- "@scalar/themes": "0.9.60",
42
- "@scalar/code-highlight": "0.0.19",
43
- "@scalar/use-hooks": "0.1.14",
41
+ "@scalar/code-highlight": "0.0.20",
42
+ "@scalar/themes": "0.9.61",
43
+ "@scalar/use-hooks": "0.1.15",
44
44
  "@scalar/use-toasts": "0.7.8"
45
45
  },
46
46
  "devDependencies": {
@@ -72,7 +72,7 @@
72
72
  "@scalar/build-tooling": "0.1.12"
73
73
  },
74
74
  "scripts": {
75
- "build": "pnpm typegen:icons && pnpm build-only",
75
+ "build": "pnpm typegen:icons && pnpm build:storybook && pnpm build-only",
76
76
  "build-only": "scalar-build-vite",
77
77
  "build:storybook": "storybook build",
78
78
  "dev": "storybook dev -p 5100 --ci",